Esempio n. 1
0
        /// <summary>
        /// Retrieves the list of existing game saves,
        /// if not saves were found, it disables the element
        /// and no `OnClick` event will ever be fired during
        /// the game object's lifetime.
        /// </summary>
        private new void Start()
        {
            var saves = SaveGameManager.GetGameManager().ListSaves();

            if (saves == null || saves.Count < 1)
            {
                this.IsEnabled = false;
            }

            base.Start();
        }
Esempio n. 2
0
 /// <summary>
 /// Loads the latest game save when the user click on the element.
 /// </summary>
 protected override void OnClick()
 {
     SaveGameManager.GetGameManager().LoadLatestGame();
 }