Beispiel #1
0
    public override bool Equition(Charactor _obj, ModeBase _mode)
    {
        if (_obj.tag.ToString() == "Player")
        {
            TestPlayer _player = _obj.GetComponent <TestPlayer>();
            float      f       = Input.GetAxis("MyHorizontal");
            if (f != 0)

            {
                if (_mode.IsInputReception(_obj))
                {
                    return(true);
                }
            }

            if (Input.GetButton("MyLeft") || Input.GetButton("MyRight"))

            {
                if (_mode.IsInputReception(_obj))
                {
                    return(true);
                }
            }
        }
        return(false);
    }
Beispiel #2
0
 public override bool Equition(Charactor _obj, ModeBase _mode)
 {
     if (_obj.tag.ToString() == "Player")
     {
         TestPlayer _player = _obj.GetComponent <TestPlayer>();
         if (Input.GetButtonDown(MyKey) && _mode.IsInputReception(_obj))
         {
             return(true);
         }
     }
     return(false);
 }
Beispiel #3
0
 public override bool Equition(Charactor _obj, ModeBase _mode)
 {
     if (_obj.tag.ToString() == "Player")
     {
         TestPlayer _player = _obj.GetComponent <TestPlayer>();
         if ((Input.GetKeyDown(KeyCode.RightArrow) || Input.GetKeyDown(KeyCode.LeftArrow)))
         {
             if (_mode.IsInputReception(_obj))
             {
                 return(true);
             }
         }
     }
     return(false);
 }
 public override bool Equition(Charactor _obj, ModeBase _mode)
 {
     if (_obj.tag.ToString() == "Player")
     {
         TestPlayer _player = _obj.GetComponent <TestPlayer>();
         //↑キーが押されているか
         if ((Input.GetKeyDown(KeyCode.UpArrow)) || (Input.GetButtonDown("MySpace")))
         {
             if (_player.IsGround() && _player.jump_waittime >= jump_waittime)
             {
                 if (_mode.IsInputReception(_obj))
                 {
                     _player.jump_waittime = 0.0f;
                     return(true);
                 }
             }
         }
     }
     return(false);
 }