void UpdateVisualDefense() { //defenseVisual.SetActive(isDefendingRight || isDefendingLeft); if (isDefendingLeft || isDefendingRight) { spritesheet.PlayAnimation("Defend", true); } else { spritesheet.PlayAnimation("Idle", true); } }
void MoveLeft() { if (isRunning == false || canPunch == false) { return; } if (position > 0) { if (position - 1 == punchBag) { Crash(); } else { position--; UpdatePosition(); } FlipPlayerLeft(); } spritesheet.PlayAnimation("Idle", true); }