void Start() { if (!string.IsNullOrEmpty(saveKey)) { counter = SaveLoadXML.GetValue <int>(saveKey, 0); } SendMessage("DisplayDigitalValue", counter, SendMessageOptions.DontRequireReceiver); }
// Use this for initialization void Start() { descriptionText = PanelManager.Instance.EventPanel.descriptionText; current_event_id = SaveLoadXML.GetValue <int>("CURRENT_EVENT_ID", 0); // Adding story actions //StoryManager.Instance.AddStoryActions(); // Launching general event LaunchGeneralEvent(false); //if (GameData.current.characterPoints == 0 && PlayerInfo.Instance.day == 0) RunTutorial(); }
void Start() { //displayTime = GameObject.Find("TimeDisplay").GetComponent<Text>(); //PeriodImage = GameObject.Find ("PeriodImage").GetComponent<Image> (); current_time = SaveLoadXML.GetValue <float>("CURRENT_TIME", 360f); //triggerCooldownList = Game.current.trigger_cd; SaveLoadXML.LoadList <TriggerCD>(triggerCooldownList, "TRIGGERCD"); if (PlayerInfo.Instance.day == 0 && current_time == 360) { foreach (TriggerCD trigger in globalTriggersList) { if (Random.Range(0, 100) < trigger.globalChance) { trigger.status = !trigger.status; } trigger.cdDay = Mathf.FloorToInt(Random.Range(Mathf.CeilToInt(trigger.cdDay * 0.3f), trigger.cdDay)); } triggerCooldownList.AddRange(globalTriggersList); } PanelManager.Instance.ActionPanel.PeriodImage.sprite = Resources.Load <Sprite> (string.Format("Icons/Time/{0}", SaveLoadXML.GetValue <int>("CURRENT_EVENT_ID", 0))); }