public override void Progress() { // if(TargetPlace!=null){ // Rigid.MovePosition(Vector3.MoveTowards(transform.position, TargetPlace.position, inversedMoveTime*Time.deltaTime)); // }else{ // Rigid.MovePosition(Vector3.MoveTowards(transform.position, transform.position + speed*Direction, inversedMoveTime*Time.deltaTime)); // } // lifeSpan--; // if(lifeSpan < 0) Interactive_Destroy(); if ((k514SystemManager.InteractMgr.GetPlayerVector().z - transform.position.z) > 2f) { Interactive_Destroy(); } if (currentPatterns == null && patterns.Count > 0) { currentPatterns = patterns[patternsIndex]; patternsIndex++; if (LoopTrig) { patternsIndex = patternsIndex % patterns.Count; } } if (currentPatterns != null && currentPatterns.Progress()) { // Progress 진행됨. } else { // Progress 종료됨. if (currentPatterns != null) { currentPatterns.EndProcess(); } currentPatterns = null; } if (currentPatterns == null && patternsIndex == patterns.Count) { Interactive_Destroy(); } ; }
void Update() { if (!ActivateTrig) { return; } if (currentPatterns == null && patternsIndex == patterns.Count) { Interactive_Burst(); return; } ; if (currentPatterns == null && patterns.Count > 0) { currentPatterns = patterns[patternsIndex]; patternsIndex++; if (LoopTrig) { patternsIndex = patternsIndex % patterns.Count; } } if (currentPatterns != null && currentPatterns.Progress()) { // Progress 진행됨. } else { // Progress 종료됨. if (currentPatterns != null) { currentPatterns.EndProcess(); } currentPatterns = null; } }
protected virtual void Update() { // late start if (!OnceTrig) { OnceTrig = true; StartCoroutine(attack_patterns); } // bombs if (bombs_check.Count > 0) { int[] key = bombs_check.Keys.ToArray(); for (int i = 0; i < key.Length; i++) { try{ if (!bombs_check[key[i]].isAlive()) { DoInteract_HP(bombs_check[key[i]].GetDamage()); bombs_check.Remove(key[i]); k514SystemManager.InteractMgr.GetPlayerTransform().GetComponent <k514PlayerController>().SP += Random.Range(0.008f, 0.012f); } }catch (System.Exception e) { } } } if (currentPatterns == null && patternsIndex == patterns.Count) { return; } if (currentPatterns == null && patterns.Count > 0) { currentPatterns = patterns[patternsIndex]; patternsIndex++; if (LoopTrig) { patternsIndex = patternsIndex % patterns.Count; } } if (currentPatterns != null && currentPatterns.Progress()) { // Progress 진행됨. } else { // Progress 종료됨. if (currentPatterns != null) { currentPatterns.EndProcess(); } currentPatterns = null; } if (RotateTrig) { CheckRotation(); } else { SetTarget(); } }