// 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(); }
private void Awake() { deathableTarget = GetComponent <IDeathable>(); damageableTarget = GetComponent <IDamageable>(); currentMaxHealth = maxHealth; Reset(); }
// Start is called before the first frame update protected virtual void Start() { health = maxHealth; target = GetComponent <IDeathable>(); }
// Start is called before the first frame update void Start() { target = GetComponentInParent <IDeathable>(); }