public override void Interact() { if (text != null) { TextParent.SpawnText(text, transform.position + textOffset); } }
public void WaterGoDown() { TextParent.SpawnText(cheatText, PlayerManager.CurrentPlayer.transform.position); foreach (var water in FindObjectsOfType <Water>()) { water.SetTargetLevelAndBegin(GlobalState.WaterLevel++); } }
public void CrystalIntoScope() { GlobalState.observatoryCrystalInserted = true; TextParent.SpawnText(cheatText, PlayerManager.CurrentPlayer.transform.position); var crystalSocket = GameObject.FindObjectOfType <InteractableCrystalSocket>(); if (crystalSocket != null) { crystalSocket.SetSocketState(true); } }
private bool TryUnlockDoor() { if (!InventoryManager.Contains(key)) { // We don't have the key TextParent.SpawnText(doorIsLockedText, transform.position + Vector3.up); return(false); } else { InventoryManager.Remove(key); GlobalState.MakeThisNotSpawn(key); GlobalState.observatoryDoorUnlocked = true; return(true); } }
public override void Interact() { if (_wasUsed) { return; } GlobalState.MakeThisNotSpawn(item); InventoryManager.Add(item); if (item?.pickupSound != null) { SFXManager.PlaySoundAt(item.pickupSound, transform.position); } TextParent.SpawnText(item.pickupText, transform.position); _wasUsed = true; StartCoroutine(AnimateIntoInventory()); }
public override void Interact() { if (GlobalState.observatoryCrystalInserted) { if (GlobalState.ObservatoryPowered) { TextParent.SpawnText(poweredOn, transform.position); } else { TextParent.SpawnText(poweredOff, transform.position); } } else { if (InventoryManager.Contains(crystal)) { TextParent.SpawnText(crystalInsert, transform.position); InventoryManager.Remove(crystal); GlobalState.MakeThisNotSpawn(crystal); GlobalState.observatoryCrystalInserted = true; //@TODO: Play a powering-up sound //@TODO: Display powering-up text door.Play(); } else { TextParent.SpawnText(unpowered, transform.position); } } // @TODO: Do some animation when we have that SetSocketState(GlobalState.observatoryCrystalInserted); }
public void GiefKey() { GlobalState.MakeThisNotSpawn(key); TextParent.SpawnText(cheatText, PlayerManager.CurrentPlayer.transform.position); InventoryManager.Add(key); }
public void FlowerGoBig() { GlobalState.MakeThisSpawn(flower); TextParent.SpawnText(cheatText, PlayerManager.CurrentPlayer.transform.position); ToggleIngredient(flower); }