Exemplo n.º 1
0
    void InitMonsterInfo()
    {
        MonsterInfo.MonsterCharInfo monsterCharInfo;
        if (StageDataManager.Inst.nowStage == StageDataManager.StageNameEnum.STAGE_1_1)
        {
            monsterCharInfo.level          = 1;
            monsterCharInfo.maxHp          = 300;
            monsterCharInfo.defensive      = 10;
            monsterCharInfo.attack         = 70;
            monsterCharInfo.attackDistance = 2.5f;
            monsterCharInfo.speed          = 5.0f;
            m_monsterInfo = GetComponent <MonsterInfo>();
            m_monsterInfo.SetInfo(monsterCharInfo);
        }
        else if (StageDataManager.Inst.nowStage == StageDataManager.StageNameEnum.STAGE_1_2)
        {
            monsterCharInfo.level          = 1;
            monsterCharInfo.maxHp          = 700;
            monsterCharInfo.defensive      = 10;
            monsterCharInfo.attack         = 150;
            monsterCharInfo.attackDistance = 2.5f;
            monsterCharInfo.speed          = 5.0f;
            m_monsterInfo = GetComponent <MonsterInfo>();
            m_monsterInfo.SetInfo(monsterCharInfo);
        }
        m_monsterMove   = GetComponent <MonsterMove>();
        m_monsterAttack = GetComponent <MonsterAttack>();
        m_animFunction  = transform.GetComponentInChildren <AnimFuntion>();
        m_receiveDamage = GetComponent <ReceiveDamage>();
        m_monsterHpBar  = GetComponentInChildren <MonsterHpBar>();

        m_monsterPosition = Monster_Position.Monster_Position_Ground;

        m_monsterMove.SetSpeed(m_monsterInfo.speed);
        m_bLive = true;
    }
Exemplo n.º 2
0
 private void Awake()
 {
     m_animFuntion = GetComponent <AnimFuntion>();
 }