コード例 #1
0
 public void AttackSkill2_Ready()
 {
     _behaviour = GetComponent <EagleClass>();
     _pos       = this.transform.position;
     _dir       = _behaviour.myDirection;
     _pos      += _dir * 0.1f;
     this.transform.position = _pos;
 }
コード例 #2
0
 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();
 }
コード例 #3
0
    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;
    }
コード例 #4
0
 private void Awake()
 {
     parent        = transform.parent.transform.parent.gameObject;
     rootBehaviour = parent.GetComponent <EagleClass>();
 }