void Start() { _gameData = this.gameObject.GetComponentInParent <GameData> (); this.gameObject.transform.localPosition = new Vector3(-2000, 0, 0); _panelManager = this.gameObject.GetComponentInParent <PanelManager> (); _floating = GameObject.Find("FloatingSystem").GetComponent <FloatingActions> (); _achieveActions = this.gameObject.GetComponentInParent <AchieveActions> (); }
void SetAchievement(GameObject o, Achievement a) { Text[] t = o.gameObject.GetComponentsInChildren <Text> (); t [0].text = a.name; t [1].text = a.desc + "(" + AchieveActions.GetProgress(a.id) + ")"; if (GameData._playerData.Achievements[a.id] == 1) { t[0].color = Color.green; t[1].color = Color.green; } else { t[0].color = Color.white; t[1].color = Color.white; } }