public void AttackMelee_End() { _behaviour = GetComponent <GorillaClass>(); _pos = this.transform.position; _dir = _behaviour.myDirection; _pos += _dir * 0.28f; this.transform.position = _pos; }
public void AttackMelee_Execute() { _behaviour = GetComponent <GorillaClass>(); _pos = this.transform.position; _dir = _behaviour.myDirection; _wallPoint = GameGeneralManager.instance.IsWallInFrontOfCharacter(_pos, _dir, 1.4f); if (_wallPoint != Vector2.zero) { float magnitude = (_wallPoint - _pos).magnitude; _pos += _dir * magnitude; } else { _pos += _dir * 1.4f; } this.transform.position = _pos; }