Ejemplo n.º 1
0
    // Update is called once per frame
    void Update()
    {
        InputHelper helper = Helper.GetComponent <InputHelper> ();
        float       time   = helper.time;

        if (time > 0 && !isMove)
        {
            Vector3 forceVec = helper.Get();
            forceVec.z = 0;
            float force = forceVec.magnitude;
            GetComponent <Rigidbody> ().AddForce(force * forceVec.normalized * FORCE);
            isMove = true;
            PlanetManager.NextState();
        }
    }