// 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(); }
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; }
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>(); }
protected override void OnStart() { _characterManager = GameHelper.GetCharacterManager(); }
public MaleeAttack(Character character, Animator anime) { _characterManager = GameHelper.GetCharacterManager(); _character = character; _anime = anime; }