コード例 #1
0
    public FloatEvent OnDirectionChanged; // Acceleration direction changes

    private void Start()
    {
        currentOrientation = InitialDirection;
        FollowCamera.CameraTargetChanged(this);

        PlayerInputSender.RegisterInputAction(PInput.HORIZONTAL, PInputType.FOCUS, onHorizontalMovement);
    }
コード例 #2
0
 private void Start()
 {
     if (RegisterInputFire)
     {
         PlayerInputSender.RegisterInputAction(PInput.FIRE, PInputType.FOCUS, TryToFire);
     }
 }
コード例 #3
0
 private void registerInputs()
 {
     PlayerInputSender.RegisterInputAction(PInput.HORIZONTAL, PInputType.FOCUS, Accelerate);
     PlayerInputSender.RegisterInputAction(PInput.VERTICAL, PInputType.FOCUS, Strafe);
 }