示例#1
0
    public void FixedUpdate()
    {
        try
        {
            string nameButton = EventSystem.current.currentSelectedGameObject.name;
            if (nameButton.Contains("save"))
            {
                var nameOfSave = nameButton.Substring(4);
                if (!SaveSerializable.UniquiSaveName(nameOfSave))
                {
                    SaveSerializable.LoadGame(nameOfSave);
                    nameButton = null;
                }
            }
        }
        catch { }

        if (Input.GetAxis("Cancel") != 0)
        {
            Transition.TransitionAnimationFrom();
            var sceneManager = new GameObject();
            var manager      = sceneManager.AddComponent <MySceneManager>();
            manager.LoadSceneByNumber(1);
        }
    }
示例#2
0
 public void CreatGame()
 {
     if (SaveSerializable.UniquiSaveName(NewGameName.text))
     {
         SavePlayerData.NameOfSave          = NewGameName.text;
         SavePlayerData.CoordinateOnScene   = new Vector3(0, 0, 0);
         SavePlayerData.LocationID          = 2;
         SavePlayerData.StoryTrigger        = 0;
         SavePlayerData.OtherCaracteristics = new Dictionary <float, string>();
         NewGameName.text = null;
     }
     else
     {
         StartCoroutine(AllertController.ShowAllert(allertText, "Not unigue name"));
     }
 }