Ejemplo n.º 1
0
    void Start()
    {
        Stage5Pos = FindObjectOfType <StagePosition>().GetComponent <StagePosition>();
        ObjLife   = GetComponent <ObjectLife>();
        ani       = GetComponent <Animator>();
        NCommand  = GetComponent <NatureCommand>();
        BCommand  = GetComponent <BattleCommand>();
        Player    = GameObject.FindWithTag("Player").GetComponent <Transform>();

        //가져와서 적용해야 할 부분
        msg = new MoveMsg();
        //가져와서 적용해야 할 부분


        Battle = new Queue();
        Peace  = new Queue();
        for (int i = 0; i < BasicPeace.Length; ++i)
        {
            Peace.Enqueue(BasicPeace [i]);
        }
        for (int i = 0; i < BasicBattle.Length; ++i)
        {
            Battle.Enqueue(BasicBattle [i]);
        }
        //while (Peace.Count > 0) {
        //	Debug.Log (Peace.Dequeue ());
        //}
        StartCoroutine("AISearching");
    }
Ejemplo n.º 2
0
    IEnumerator DotSkill(ObjectLife obj)
    {
        float Dmg  = PowerMemory[2] / DotTime;
        float time = 0.0f;
        bool  b    = false;

        PowerMemory[2] -= Minus[2];
        if (PowerMemory[2] <= 0.0f)
        {
            this.gameObject.SetActive(false);
        }
        while (time <= DotTime)
        {
            obj.SendMessage("SendDMG", Dmg);
            if (!b)
            {
                b = true;
                if (ElecShock)
                {
                    obj.SendMessage("Shock", ShockTime);
                }
            }
            time += Cycle;
            yield return(new WaitForSeconds(Cycle));
        }
    }
Ejemplo n.º 3
0
 // Use this for initialization
 void Start()
 {
     life = GetComponentInParent <ObjectLife>();
     BarFrame.SetActive(false);
     for (int i = 0; i < Level.Length; ++i)
     {
         Level[i].SetActive(false);
     }
 }
Ejemplo n.º 4
0
    void Start()
    {
        MobSound = GetComponentInChildren <MonsterSoundSetting>();
        GameObject temp = FindObjectOfType <PlayerState>().gameObject;

        Player  = temp.GetComponent <PlayerState>();
        MobInfo = GetComponentInChildren <ObjectLife>();
        ani     = GetComponent <Animator>();
        agent   = GetComponent <NavMeshAgent>();
    }