void Awake() { anim = GetComponent <Animator>(); pla = GetComponent <pla>(); currentHealth = startHealth; currentShield = startShield; currentSkill = startSkill; }
void textScore() { t.text = "F의 Score" + Fscore; if (Input.GetKeyDown(KeyCode.F)) { Fscore += 1; t.text = "F의 Score" + Fscore; } if (Fscore == 50) { controller = GetComponentInParent <Canvas>().GetComponentInParent <pla>(); controller.Finish_Competition(1); } //Debug.Log("시발시발" + SceneChange.checkSkill); }
private void Controll_Data(string data) { //1 : 나로호! //2 : 쉴드! //3 : 삼연사 if (data.Contains("INIT")) { //INIT PROGRAM. GET PLAYER OBJECT! Local_Player = GameObject.Find("Local_Player"); if (Local_Player == null) { Debug.LogError("Local_Player NOT FOUND !!!!"); } else { Debug.LogError("Local_Player FOUND."); Local_Player_Controller = Local_Player.GetComponent <pla>(); } } else if (data.Contains("NAROHO")) { Local_Player_Controller.Act(1); } else if (data.Contains("SHIELD")) { Local_Player_Controller.Act(2); } else if (data.Contains("TANGTANGTANG")) { Local_Player_Controller.Act(3); } else if (data.Contains("volume")) { string replaced = data.Replace("volume:", ""); int result = Int32.Parse(replaced); Local_Player_Controller.Receive_Decibel(result); } //if (data.Contains("")) }
// Start is called before the first frame update void Start() { t = GetComponent <Text>(); other_controller = GameObject.Find("Player").GetComponent <pla>(); }
// Start is called before the first frame update void Start() { t = GetComponent <Text>(); controller = GetComponentInParent <Canvas>().GetComponentInParent <pla>(); }