Ejemplo n.º 1
0
 public void SetAttrStrategy(ICharacterAttrStrategy theAttrStrategy)
 {
     myAttrStrategy = theAttrStrategy;
 }
Ejemplo n.º 2
0
        public ICharacterAttr(float maxHealth, float attack, float moveSpeed, float fireRate, float attackRange, ICharacterAttrStrategy theAttrStrategy)
        {
            setAttack(attack);
            SetAttrStrategy(theAttrStrategy);
            setAttackRate(fireRate);
            setMaxHealth(maxHealth);
            setSpeed(moveSpeed);
            setAttackRange(attackRange);

            myAttrStrategy.InitAttr(this);
            FullHp();
        }