Пример #1
0
 private void SendPlayerEvent(PlayerEventDelegate playerEvent)
 {
     if (playerEvent != null)
     {
         playerEvent(this.name, this.maxHp, this.currentHp, this.pos_x, this.pos_y);
     }
 }
Пример #2
0
    // Start is called before the first frame update
    void Awake()
    {
        input = new PlayerInputs();
        input.GamePlay.Jump.performed += InteractionOrJump;
        input.GamePlay.Jump.canceled  += JumpBoostEnds;

        input.GamePlay.Move.performed += Move;

        jumpVelocity = Mathf.Sqrt(jumpHeight * gravity * -2f);

        EquipEvent   += EquipTool;
        UnequipEvent += UnequipTool;
        UseToolEvent += PlayUseAnimation;
    }