void Update() { if (!bDressingClothes && PlayerInventory.GetPlayerInventory().IsItem("ArmoredJacket") && PlayerInventory.GetPlayerInventory().IsItem("ArmoredTrousers")) { bDressingClothes = true; ScriptSystem.GetInstance().SetScriptCommand(GameObject.Find("DialogWindow"), "ShowDialog", new string[1] { "DIALOG_2" }); inHouseDoor.SetActive(true); } if (bDressingClothes && !bHaveAxe && PlayerInventory.GetPlayerInventory().IsItem("Axe")) { bHaveAxe = true; ScriptSystem.GetInstance().SetScriptCommand(GameObject.Find("DialogWindow"), "ShowDialog", new string[1] { "DIALOG_3" }); } if (bDressingClothes && bHaveAxe && !bNextLevel) { bNextLevel = true; nextLevel.gameObject.SetActive(true); GameObject.Find("NextLevel").SetActive(true); } }
void OnTriggerEnter2D(Collider2D other) { if (flagScript) { return; } if (other.gameObject.tag == objectTag) { ScriptSystem scriptSystem = ScriptSystem.GetInstance(); scriptSystem.SetScriptCommand(doingObject, scriptCommand, arrayOfParameter); flagScript = true; Destroy(gameObject); } }
void OnTriggerStay2D(Collider2D other) { if (gameObject.activeSelf) { if (other.gameObject.tag == objectTag) { objectRenderer.enabled = true; if (Input.GetKeyUp(keyKode)) { ScriptSystem scriptSystem = ScriptSystem.GetInstance(); scriptSystem.SetScriptCommand(doingObject, scriptCommand, arrayOfParameter); if (isLimited) { gameObject.SetActive(false); Destroy(gameObject); Debug.Log("KetCondition: OK!!!"); } } } } }
public void NextLevel() { ScriptSystem.GetInstance().SetScriptCommand(GameObject.Find("DialogWindow"), "ShowDialog", new string[1] { "DIALOG_5" }); }