예제 #1
0
        public override void action(IUsersInput input, ObjectMotionController obj)
        {
            float dv = Mathf.Sin(angles[input.nActual - 1] - Mathf.Atan2(input.GetVertical(), input.GetHorizontal())) * input.speed;

            angles[input.nActual - 1] = Mathf.Atan2(input.GetVertical(), input.GetHorizontal());
            obj.velocity.x           += dv;
        }
예제 #2
0
        protected float dv(IUsersInput input)
        {
            float dv = Mathf.Sin(angles[input.nActual - 1] - Mathf.Atan2(input.GetVertical(), input.GetHorizontal())) * input.speed;

            angles[input.nActual - 1] = Mathf.Atan2(input.GetVertical(), input.GetHorizontal());
            return(dv);
        }
예제 #3
0
 public override void action(IUsersInput input, ObjectMotionController obj)
 {
     if (indicationScript != null)
     {
         indicationScript.enableFrontBack(input, -input.GetVertical());
     }
     obj.velocity.z += -input.GetVertical() * input.speed;
 }
예제 #4
0
 public override void action(IUsersInput input, ObjectMotionController obj)
 {
     if (indicationScript != null)
     {
         indicationScript.enableOrY(input, input.GetVertical() * input.speed);
     }
     obj.rotation.z += input.GetVertical() * input.speed;
 }
예제 #5
0
 public override void actionCam(IUsersInput input, CameraMotionController obj)
 {
     obj.MoveDistanceFromObject(input.GetButtonX() - input.GetButtonY());
     obj.MoveDown(input.GetVertical() * input.speed);
     obj.MoveRight(input.GetHorizontal() * input.speed);
 }