void controlEnemyFunction(GameObject GameEnemy) //控制這裡 { counter++; if (counter != 1) { soundEffectManager.staticSoundEffect.play_possessedOnFinish(); } //GameEnemy.GetComponent<playerMove>().enabled = true; //GameEnemy.GetComponent<npcMove>().enabled = false; //GameEnemy.GetComponent<SpriteRenderer>().color = Color.blue; //Debug.Log(GameEnemy.GetComponent<SpriteRenderer>().color); GameEnemy.GetComponents <npcClass>()[0].TypeP = npcClass.Type.contorl; //incontorlObj.tag = "contorl"; if (GameEnemy.GetComponentInChildren <attackSystem>() != null) { CDSave = GameEnemy.GetComponentInChildren <attackSystem>().CD; GameEnemy.GetComponentInChildren <attackSystem>().enabled = true; GameEnemy.GetComponentInChildren <attackSystem>().CD = CDSave * 0.5f; } lockDownSystem.cancelTargetLockDown(); inContorl = true; }
void controlEnemyFunction(GameObject GameEnemy) //控制這裡 //GameEnemy.GetComponent<playerMove>().enabled = true; //GameEnemy.GetComponent<npcMove>().enabled = false; //GameEnemy.GetComponent<SpriteRenderer>().color = Color.blue; //Debug.Log(GameEnemy.GetComponent<SpriteRenderer>().color); { GameEnemy.GetComponents <npcClass>()[0].TypeP = npcClass.Type.contorl; //incontorlObj.tag = "contorl"; if (GameEnemy.GetComponentInChildren <attackSystem>() != null) { CDSave = GameEnemy.GetComponentInChildren <attackSystem>().CD; GameEnemy.GetComponentInChildren <attackSystem>().enabled = true; GameEnemy.GetComponentInChildren <attackSystem>().CD = CDSave * 0.5f; } lockDownSystem.cancelTargetLockDown(); inContorl = true; }