Пример #1
0
        public void CreateWorldAndPlay(CharSaveInfo CharacterInfo)
        {
            List <CharSaveInfo> characterInfos = new List <CharSaveInfo>();

            characterInfos.AddRange(CharacterSaveList);

            characterInfos.Add(CharacterInfo);

            CharacterSaveList = characterInfos.ToArray();

            SaveManager.SaveChars(CharacterSaveList);
        }
Пример #2
0
        public void DeleteCharAndWorld(CharSaveInfo CharacterInfo)
        {
            List <CharSaveInfo> characterInfos = new List <CharSaveInfo>();

            characterInfos.AddRange(CharacterSaveList);

            characterInfos.Remove(CharacterInfo);

            CharacterSaveList = characterInfos.ToArray();

            SaveManager.SaveChars(CharacterSaveList);

            //Delete World Here
        }
        public CharGuiItem(CharSaveInfo charInfo, int index)
        {
            CharIndex = index;
            _CharName = charInfo.CharName;

            ItemBack = new GUIPanel(new System.Drawing.Rectangle(0, 0 + -index * 50 + 520, 505, 50), UIDock.CenterBottom);
            ItemBack.SetBackColors(new Color4(0, 0, 0, 0.2f), new Color4(0, 0, 0, 0.3f), new Color4(0, 0, 0, 0.5f), new Color4(1, 1, 1, 0.2f));
            ItemBack.Interactable();
            ItemBack.OnClick += onClcik;

            ItemBackSelect = new GUIPanel(new System.Drawing.Rectangle(0, 0 + -index * 50 + 520, 505, 50), UIDock.CenterBottom);
            ItemBackSelect.SetBackColors(new Color4(1, 1, 1, 0.2f), new Color4(1, 1, 1, 0.3f), new Color4(1, 1, 1, 0.5f), new Color4(1, 1, 1, 0.2f));
            ItemBackSelect.Interactable();
            ItemBackSelect.Disable();

            CharName = new GUILable(_CharName + " I:" + index, new System.Drawing.Rectangle(0, 0 + -index * 50 + 520, 505, 50), UIDock.CenterBottom);
            CharName.SetTextAling(Font.TextAling.Left);
            CharName.SetColor(Color4.White);
            CharName.SetBackColors(Color4.White, Color4.Gray, Color4.Gray, Color4.White);
            CharName.ShowBackGround = false;
            CharName.NoInteractable();
        }