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();
    }
Esempio 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);
 }
Esempio n. 3
0
 void Awake()
 {
     anim            = this.GetComponent <Animator>();
     idle            = this.GetComponent <SoliderMove>();
     capsuleCollider = this.GetComponent <CapsuleCollider>();
 }