public void Interact(Tana caller) { var invetory = caller.GetComponent <Inventory>(); if (invetory is null) { return; } var keyCount = invetory.GetItemCountByType(ItemType.KEY); if (keyCount == 0) { caller.PushDialog(new string[] { "Hay dos huecos para dos llaves" }); } else if (keyCount == 1) { caller.PushDialog(new string[] { "Hay un hueco para una llave" }); } else { caller.PushDialog(new string[] { "Se abre" }); invetory.RemoveItemByType(ItemType.KEY, 2); } }
public void Interact(Tana caller) { var inventory = caller.GetComponent <Inventory>(); var count = inventory.GetItemCountByType(ItemType.KEY); if (count == 2) { caller.PushDialog(new string[] { "Gate open" }); Destroy(this.gameObject); Instantiate(this.smokeEffect, this.transform.position, Quaternion.identity); } else { caller.PushDialog(new string[] { "There are two holes for two keys" }); } }
public void Interact(Tana caller) { var inventory = caller.GetComponent <Inventory>(); var count = inventory.GetItemCountByType(ItemType.SELF_FRAGMENT); if (count == 2) { Instantiate(this.finalShine, this.transform.position, Quaternion.identity); this.finalSound.Play(); caller.PushDialog(new string[] { "Congratulations! This is where this minigame ends", "Thanks for playing :D" }); } else { caller.PushDialog(new string[] { "The void stares back at you" }); } }
public void Interact(Tana caller) { caller.PushDialog(this.lines); }