public void AttackSkill2_Ready() { _behaviour = GetComponent <EagleClass>(); _pos = this.transform.position; _dir = _behaviour.myDirection; _pos += _dir * 0.1f; this.transform.position = _pos; }
public void AttackMelee_Execute() { _behaviour = GetComponent <EagleClass>(); _pos = this.transform.position; _dir = _behaviour.myDirection; _pos += _dir * 0.1f; this.transform.position = _pos; //throw new System.NotImplementedException(); }
public void AttackSkill2_Execute() { _behaviour = GetComponent <EagleClass>(); _pos = this.transform.position; _curPos = _finalPos = _pos; _dir = _behaviour.myDirection; _wallPoint = GameGeneralManager.instance.IsWallInFrontOfCharacter(_pos, _dir, 2.02f); Debug.Log(_wallPoint); if (_wallPoint != Vector2.zero) { float magnitude = (_wallPoint - _pos).magnitude; _pos += _dir * magnitude; } else { _pos += _dir * 2.02f; } this.transform.position = _pos; }
private void Awake() { parent = transform.parent.transform.parent.gameObject; rootBehaviour = parent.GetComponent <EagleClass>(); }