Ejemplo n.º 1
0
 void Start()
 {
     rb            = GetComponent <Rigidbody2D>();
     animator      = GetComponent <Animator>();
     isFacingRight = true;
     healthSystem  = GetComponent <HealthSystem>();
     InvisibleWall.SetActive(false);
     joystick    = FindObjectOfType <Joystick>();
     stickButton = FindObjectOfType <JoyStickButton>();
 }
Ejemplo n.º 2
0
    void Awake()
    {
        leftMoveBtn.SetMoveEvent(LeftMove);
        RightMoveBtn.SetMoveEvent(RightMove);

        leftMoveBtn.SetUpEvent(UpMoveBtn);
        RightMoveBtn.SetUpEvent(UpMoveBtn);
        ActionBtn.SetMoveEvent(OnPlayerAction);
        _portalExecuter = GetComponent <PortalExecuter>();

        _currentPushButton = RightMoveBtn;

        KnockbackInfomation = new KnockbackInfomation(this, _jumpInfomation, HitEvent);
    }
Ejemplo n.º 3
0
 private bool SetMoveButton(GameObject pushObject, JoyStickButton button)
 {
     if (pushObject.gameObject.Equals(button.gameObject))
     {
         if (!_currentPushButton.Equals(button))
         {
             _currentPushButton.OnUp();
         }
         _currentPushButton = button;
         _currentPushButton.OnDown();
         return(true);
     }
     return(false);
 }