Exemplo n.º 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();
        }
Exemplo n.º 2
0
 private void Awake()
 {
     deathableTarget  = GetComponent <IDeathable>();
     damageableTarget = GetComponent <IDamageable>();
     currentMaxHealth = maxHealth;
     Reset();
 }
Exemplo n.º 3
0
 // 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>();
 }