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"); }
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)); } }
// Use this for initialization void Start() { life = GetComponentInParent <ObjectLife>(); BarFrame.SetActive(false); for (int i = 0; i < Level.Length; ++i) { Level[i].SetActive(false); } }
void Start() { MobSound = GetComponentInChildren <MonsterSoundSetting>(); GameObject temp = FindObjectOfType <PlayerState>().gameObject; Player = temp.GetComponent <PlayerState>(); MobInfo = GetComponentInChildren <ObjectLife>(); ani = GetComponent <Animator>(); agent = GetComponent <NavMeshAgent>(); }