anonymous No title
No License C#
2020年10月14日
Copy Clone
public class CarController : MonoBehaviour
{
    float speed = 0;
    Vector2 startPos;
    float starttime = 0f;
    float endtime = 0f;

    // Start is called before the first frame update
    void Start()
    {
       
    }

    // Update is called once per frame
    void Update()
    {
        //スワイプの長さを決める(追加)
        if (Input.GetMouseButtonDown(0))
        {
            //マウスをクリックした座標
            this.startPos = Input.mousePosition;

            //マウスをクリックした時間
            starttime = Time.time;
        }
        else if (Input.GetMouseButtonUp(0))
        {
            //マウスを離した座標
            Vector2 endPos = Input.mousePosition;
            float swipeLength = endPos.x - this.startPos.x;

            //マウスを離した時間
            endtime = Time.time;

            //経過時間
            float timespan = (endtime - starttime) * 1000;

            //スワイプの長さを初速度に変換する
            speed = swipeLength / timespan;
        }

        transform.Translate(speed, 0, 0); //移動
        speed *= 0.98f; //速度
    }
}
public class CarController : MonoBehaviour
{
    float speed = 0;
    Vector2 startPos;
    float starttime = 0f;
    float endtime = 0f;

    // Start is called before the first frame update
    void Start()
    {
       
    }

    // Update is called once per frame
    void Update()
    {
        //スワイプの長さを決める(追加)
        if (Input.GetMouseButtonDown(0))
        {
            //マウスをクリックした座標
            this.startPos = Input.mousePosition;

            //マウスをクリックした時間
            starttime = Time.time;
        }
        else if (Input.GetMouseButtonUp(0))
        {
            //マウスを離した座標
            Vector2 endPos = Input.mousePosition;
            float swipeLength = endPos.x - this.startPos.x;

            //マウスを離した時間
            endtime = Time.time;

            //経過時間
            float timespan = (endtime - starttime) * 1000;

            //スワイプの長さを初速度に変換する
            speed = swipeLength / timespan;
        }

        transform.Translate(speed, 0, 0); //移動
        speed *= 0.98f; //速度
    }
}
anonymous
Anonymous
2021年04月19日
Pills information for patients. Drug Class. <a href="https://pregabalin24x7.top">how can i get generic lyrica pills</a> in US Some trends of medicament. Get here.
anonymous
Anonymous
2021年04月28日
Drug information leaflet. Effects of Drug Abuse. <a href="https://lyricainfo.top">where buy generic pregabalin for sale</a> in US Actual what you want to know about medicament. Read information here.
anonymous
Anonymous
2021年04月30日
cialis and lisinopril <a href="https://mycialistabs.com/">what is cialis for</a> cialis side effects a wife's perspective
anonymous
Anonymous
2021年04月30日
cialis for daily use cost <a href="https://mycialistabs.com/">sildenafil vs cialis</a> black cialis
anonymous
Anonymous
2021年05月02日
cialis dosing <a href="https://toptadalafiltabs.com/">generic tadalafil</a> cheap cialis canada
anonymous
Anonymous
2021年05月02日
how long before sex should i take cialis <a href="https://toptadalafiltabs.com/">free trial cialis</a> cialis manufacturer coupon 2018
anonymous
Anonymous
2021年05月04日
how to write a concluding paragraph for an essay <a href="https://topessaywriterfas.com/">essay contest college students</a> how to write an extended essay proposal
anonymous
Anonymous
2021年05月04日
how to write an essay conclusion <a href="https://topessaywriterfas.com/">https://www.topessaywriterfas.com/</a> how to write a thematic essay for global history regents
anonymous
Anonymous
2021年05月06日
assertive essay service <a href="http://writemyessayslfd.com/">write an analysis essay</a> 500 word essay on customer service
anonymous
Anonymous
2021年05月06日
essay on cleanliness is service in hindi <a href="http://writemyessayslfd.com/">website that write essays for you</a> online essay writing service benefits
anonymous
Anonymous
2021年05月07日
sildenafil 20 mg <a href="https://mrviagrashop.com">buy generic 100mg viagra online</a> viagra pill
anonymous
Anonymous
2021年05月07日
viagra price <a href="https://mrviagrashop.com">natural viagra</a> generic sildenafil
anonymous
Anonymous
2021年05月07日
sildenafil canada <a href="https://mysildenafilkr.com/">viagra alternatives</a> chewable viagra
anonymous
Anonymous
2021年05月07日
sildenafil walgreens <a href="https://mysildenafilkr.com/">female viagra pill</a> sildenafil citrate 100mg tablet
anonymous
Anonymous
2021年05月11日
is cialis generic <a href="http://tadalafilled.com/">maxim peptide tadalafil</a> cialis side effect
anonymous
Anonymous
2021年05月11日
communication skills resume <a href="http://coverletterforresumetop.com/">build my resume</a> theatre resume
anonymous
Anonymous
2021年05月11日
cialis 20 mg <a href="http://tadalafilled.com/">when will cialis become generic</a> cialis price per pill
anonymous
Anonymous
2021年05月11日
good resume fonts <a href="http://coverletterforresumetop.com/">resume writers near me</a> list of good skills to put on a resume
anonymous
Anonymous
2021年05月12日
cover letter vs resume <a href="https://writingacoverletteronline.com/">resume assistance</a> high school student resume with no work experience
anonymous
Anonymous
2021年05月13日
resume guide <a href="https://writingacoverletteronline.com/">cover letter help</a> graphic designer cover letter
anonymous
Anonymous
2021年05月13日
viagra canadian pharmacy ezzz <a href="https://edviagramaster.net/">buy viagra</a> where to buy female viagra
anonymous
Anonymous
2021年05月13日
teva sildenafil <a href="https://edviagramaster.net/">cheap viagra online</a> sildenafil 100mg online
anonymous
Anonymous
2021年05月15日
viagra pill <a href="https://sildenafilviagratop.com">sildenafil 20 mg</a> generic viagra online
anonymous
Anonymous
2021年05月15日
where to buy female viagra <a href="https://sildenafilviagratop.com">viagra canadian pharmacy ezzz</a> sildenafil price walmart
anonymous
Anonymous
2021年05月15日
cialis price <a href="https://cialisortadalafil.com/">cialis vs viagra</a> cialis 80 mg dosage
anonymous
Anonymous
2021年05月15日
cialis daily dosage <a href="https://cialisortadalafil.com/">canadian pharmacy cialis 20mg</a> cialis price cvs
anonymous
Anonymous
2021年05月16日
buying cialis cheap <a href="https://topcialistabs.com/">tadalafil 20 mg</a> cialis logo
anonymous
Anonymous
2021年05月16日
cialis 20mg price <a href="https://topcialistabs.com/">free cialis samples</a> reddit cialis
anonymous
Anonymous
2021年05月18日
Medicament prescribing information. Effects of Drug Abuse. <a href="https://doxycycline2021.top">can i purchase generic doxycycline</a> in Canada All what you want to know about medicines. Read information here.
anonymous
Anonymous
2021年05月18日
Drugs information for patients. Long-Term Effects. <a href="https://protonix4u.top">protonix pill</a> in US All trends of drug. Get here.
anonymous
Anonymous
2021年05月21日
<a href="https://5bz.ru/">база предприятий россии excel скачать торрент бесплатно</a>
anonymous
Anonymous
2021年05月21日
<a href="https://5bz.ru/">база предприятий беларуси</a>