public bool Activate() { PlayerController.InterpreterLock.Set(); if (!IsReachable()) { return(false); } GUITexts guiTexts = GUITexts.GetInstance(); guiTexts.CollectCoin(); var mapGenerator = MapGenerator.getInstance(); var mapBlock = mapGenerator.GetBlockAtLocation(GetBlockPosition()); mapBlock.DetachGameObject(gameObject); GameObject.Destroy(gameObject); PerformActions(Map.Config.Action.ACTION_ACTIVATE); return(true); }
private void PerformMessageAction() { if (Message == null || Message.Trim().Equals("")) { return; } GUITexts.GetInstance().NewTextMessage(Message); }
public bool Activate() { PlayerController.InterpreterLock.Set(); if (_isLooted) { return(false); } if (!IsReachable()) { return(false); } GUITexts guiTexts = GUITexts.GetInstance(); guiTexts.CollectCoin(GetValue()); ChestClosed.SetActive(false); ChestOpened.SetActive(true); _isLooted = true; return(true); }
protected void ShowMessage(string Message, Color TColor) { SequentialProcedure(() => GUITexts.GetInstance().NewTextMessage(Message, TColor)); }
protected int GetNumberOfCollectedCoins() { return(SequentialSensor(() => GUITexts.GetInstance().GetCoinsCount())); }
public void SwitchLarge() { UseLarge = !UseLarge; GUITexts.GetInstance().ShowHUDElements = !UseLarge; }