public void seenHint(HintIds hint) { if (!checkSeenHint(hint)) { playerData.seenHints.Add(hint); } savePlayerDataAsync(); }
private void ResetHint() { if (tempHint != null) { allItems.Find(t => t.item.Id == tempHint.id1).Reset(); allItems.Find(t => t.item.Id == tempHint.id2).Reset(); tempHint = null; } }
public void HintItems(object ids) { ResetHint(); var rst = ids as HintIds; tempHint = rst; allItems.Find(t => t.item.Id == rst.id1).Hint(); allItems.Find(t => t.item.Id == rst.id2).Hint(); }
public bool sayEasyHappyIfAvailable(HintIds hint) { bool seenHint = MasterPlayerData.instance.checkSeenHint(hint); if (!seenHint) { Elementalist.instance.sayEasyHappy(Hints.getHintFrom(hint)); MasterPlayerData.instance.seenHint(hint); } return(seenHint); }
public static string getHintFrom(HintIds id) { switch (id) { case HintIds.BasicExplanation: return("Double tap to launch the ball. Drag your finger to move the paddle. Collect the floaty essence. Good luck!"); case HintIds.SkillTree: return("Here you can equip new skills but you have to select at least one biome first."); case HintIds.SkillTreeSuggest: return("I suggest you start with "); case HintIds.Skills: return("You can equip up to 3 skills from this biome to this skill set. You'll unlock higher tier slots after purchasing a skill."); case HintIds.Boss: return("Watch out! Something here is actively working to stop you!"); case HintIds.ActiveExplanation: return("You just purchased an active powerup! To use it, double tap after launching your ball and after the cooldown wears off."); case HintIds.Fire: return("The red essence blocks on this level seem to have an explosive quality."); case HintIds.Earth: return("Earth essence blocks can slow your paddle down."); case HintIds.Water: return("Water blocks can control your ball but with skills you can learn to control them."); case HintIds.Poison: return("Destroy tough blocks with a poisoned ball."); case HintIds.Shadow: return("Be careful not to lose lives when all becomes dark."); case HintIds.Growth: return("Destroy the plants to destroy their root."); case HintIds.AutoEnd: return("Once you have less than 3 blocks, you'll have 10 seconds to gain more points. A countdown will start when you have 5 seconds left."); case HintIds.Coins: return("If you don't have enough essence, trade your coins for essence in the shop on the main menu."); case HintIds.Random: return("You can now play in the wilderness where there are randomly generated maps."); default: return("NO HINT AVAILABLE FOR THIS ID"); } }
public void Hint() { if (CheckAvailable()) { HintIds ids = new HintIds() { id1 = availableId1, id2 = availableId2, }; EventCenter.Instance.Broad(Actions.Hint, ids); Debug.Log(availableId1); Debug.Log(availableId2); } }
private void CreateItems() { tempHint = null; var allData = PlayRoomManager.Instance.CurrentItems; for (int i = 0; i < allData.Count; i++) { var go = Instantiate(item) as GameObject; go.transform.parent = this.transform; go.transform.localScale = Vector3.one; var id = i; var info = allData[id]; var a = info.position; go.transform.position = _initPosition + new Vector2(a.x * xdistance, -a.y * ydistance); go.GetComponent <ItemUnit>().SetItemInfo(info); allItems.Add(go.GetComponent <ItemUnit>()); } engGameBg.gameObject.SetActive(PlayRoomManager.Instance.isGameEnd); }
public static HintIds getHintIdFromBiome(DataTypes.BiomeType biome) { HintIds id = HintIds.Fire; switch (biome) { case DataTypes.BiomeType.Fire: id = HintIds.Fire; break; case DataTypes.BiomeType.Water: id = HintIds.Water; break; case DataTypes.BiomeType.Earth: id = HintIds.Earth; break; case DataTypes.BiomeType.Poison: id = HintIds.Poison; break; case DataTypes.BiomeType.Shadow: id = HintIds.Shadow; break; case DataTypes.BiomeType.Growth: id = HintIds.Growth; break; default: break; } return(id); }
public bool checkSeenHint(HintIds hint) { return(playerData.seenHints.Contains(hint)); }