public override void action(IUsersInput input, ObjectMotionController obj) { if (indicationScript != null) { indicationScript.enableLeftRight(input, input.GetHorizontal()); } obj.velocity.x += input.GetHorizontal() * input.speed; }
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); }
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; }
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); }