예제 #1
0
 public void Update()
 {
     if (Input.GetKeyUp(KeyCode.D))
     {
         _Player.SwitchState(new Idle(_Player));
     }
     if (Input.GetKeyDown(KeyCode.A))
     {
         _Player.SwitchState(new FWalk(_Player));
     }
     if (Input.GetKeyDown(KeyCode.W))
     {
         _Player.SwitchState(new Jump(_Player));
     }
 }
예제 #2
0
파일: Sol.cs 프로젝트: AkliDev/CuhrayzeeBtu
 public void Update()
 {
     if (_Player._Collision._Grounded == true)
     {
         _Player.SwitchState(new Idle(_Player));
     }
 }
예제 #3
0
파일: Sol.cs 프로젝트: AkliDev/CuhrayzeeBtu
 public void Update()
 {
     if (_Player._Collision._Grounded == false && _Player._Velocity.y < 0)
     {
         _Player.SwitchState(new Falling(_Player));
     }
 }
예제 #4
0
 public void Update()
 {
     if (Input.GetKeyUp(KeyCode.S))
     {
         _Player.SwitchState(new Idle(_Player));
     }
 }
예제 #5
0
파일: Sol.cs 프로젝트: AkliDev/CuhrayzeeBtu
    public void Update()
    {
        switch (GameManager.instance.InputManager.GetDirection(_Player.m_ControllerId).notation)
        {
        case DirectionNotaton.Up:
            _Player.SwitchState(new Jump(_Player));
            break;

        case DirectionNotaton.UpLeft:
            _Player.SwitchState(new FWalk(_Player));
            break;

        case DirectionNotaton.UpRight:
            _Player.SwitchState(new BWalk(_Player));
            break;

        case DirectionNotaton.Neutral:
            _Player.SwitchState(new Idle(_Player));
            break;

        case DirectionNotaton.Left:
            _Player.SwitchState(new FWalk(_Player));
            break;

        case DirectionNotaton.Right:
            _Player.SwitchState(new BWalk(_Player));
            break;
        }
    }
예제 #6
0
    public void Update()
    {
        if (Input.GetKeyDown(KeyCode.S))
        {
            _Player.SwitchState(new Crouch(_Player));
        }

        if (Input.GetKeyDown(KeyCode.A) || Input.GetKey(KeyCode.A))
        {
            _Player.SwitchState(new FWalk(_Player));
        }

        if (Input.GetKeyDown(KeyCode.D) || Input.GetKey(KeyCode.D))
        {
            _Player.SwitchState(new BWalk(_Player));
        }

        if (Input.GetKeyDown(KeyCode.W))
        {
            _Player.SwitchState(new Jump(_Player));
        }
    }