Ejemplo n.º 1
0
    public SoliderInfo(int soliderIndexId, int soliderId)
    {
        Id           = soliderIndexId;
        charId       = soliderId;
        creatureData = J_Creature.GetData(charId);
        charName     = creatureData._modelName;
        if (charName == null)
        {
            Debug.LogError("SoliderModelName" + charId + " is NULL");
        }
        soliderStateMachine = new StateMachine();
        soliderAtk          = new SoliderAtk(this);
        soliderDead         = new SoliderDead(this);
        soliderIdle         = new SoliderIdle(this);
        soliderMove         = new SoliderMove(this);
        soliderReady        = new SoliderReady(this);

        hpMax        = creatureData._hp;
        hp           = hpMax;
        attackSpeed  = creatureData._attackSpeed;
        attackDamage = creatureData._attackDamage;
        defenceType  = creatureData._defenceType;
        attackSkill  = SkillManager.getInstance().AddSkill(1, this);

        attackTime = AnimationCache.getInstance().getAnimation(charName).getMeshAnimation("attack").getAnimTime();
    }
Ejemplo n.º 2
0
 public void InitStatusMachine()
 {
     soliderStateMachine = new StateMachine();
     soliderAtk          = new SoliderAtk(this);
     soliderDead         = new SoliderDead(this);
     soliderIdle         = new SoliderIdle(this);
     soliderMove         = new SoliderMove(this);
     soliderReady        = new SoliderReady(this);
 }