コード例 #1
0
    //actual projectile should call this
    public void launch(float angle)
    {
        setKinematic(false);
        TrajectoryAngle = Throwable.ComputeTrajectoryAngle(angle);
        GetComponent <Rigidbody2D> ().AddForce(350 * TrajectoryAngle);

        this.transform.parent = null;
        LaunchTime            = Time.time;
        IsLaunched            = true;

        //store initial position/velocity
        UpdateTrail();
    }