예제 #1
0
        // Use this for initialization
        public void Start()
        {
            var anime = GetComponent <Animator>();

            switch (AttackType)
            {
            case AttackType.Malee:
                _attack = new MaleeAttack(this, anime);
                break;

            case AttackType.Range:
                _attack = new RangeAttack(this, anime);
                break;

            default:
                _attack = new NoneAttack(this);
                break;
            }

            _deathable = new PlayerDeathable(this, anime);

            _appledEffects = new Dictionary <Type, ApplyEffect>();
            _stackEffect   = new List <ApplyEffect>();

            ManaPoint         = MaxManaPoint;
            HitPoint          = MaxHitPoint;
            _characterManager = GameHelper.GetCharacterManager();
        }
예제 #2
0
        public void Start()
        {
            _agent            = GetComponent <NavMeshAgent>();
            _anim             = GetComponent <Animator>();
            _characterManager = GameHelper.GetCharacterManager();
            _character        = this.gameObject.GetComponent <Character>();

            _agent.speed     = _character.Speed;
            _startUpLocation = this.gameObject.transform.position;
        }
예제 #3
0
        public void Start()
        {
            _characterManager = GameHelper.GetCharacterManager();

            _rigidbody = this.GetComponent <Rigidbody>();
            var force = this.transform.forward * Speed;

            _rigidbody.AddForce(force, ForceMode.Impulse);

            _inAreaCharacter = new List <Character>();
        }
예제 #4
0
 protected override void OnStart()
 {
     _characterManager = GameHelper.GetCharacterManager();
 }
예제 #5
0
 public MaleeAttack(Character character, Animator anime)
 {
     _characterManager = GameHelper.GetCharacterManager();
     _character        = character;
     _anime            = anime;
 }