コード例 #1
0
ファイル: Program.cs プロジェクト: f1gm3nt3d/LoB
        static void DisplayCharScreen(Player player, bool modify, bool first)
        {
            CharacterPage CurrentPage=CharacterPage.Main;
            bool Quit = false;
            string Options = "[M]ain [A]ctive [P]assive [I]nventory [S]pells";
            DisplayCharScreenBack();


            while (!Quit)
            {
                switch (CurrentPage)
                {
                    case CharacterPage.Main:
                        break;
                    case CharacterPage.ActiveSkill:
                        break;
                    case CharacterPage.PassiveSkill:
                        break;
                    case CharacterPage.Inventory:
                        break;
                    case CharacterPage.Spells:
                        break;
                }
            }

        }
コード例 #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="FileName"></param>
        public static Page LoadCharacter(CharacterSheet Character)
        {
            CharacterPage Page = new CharacterPage {
                DataContext = Character
            };

            return(Page);
        }
コード例 #3
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="FileName"></param>
        public static Page LoadCharacter(String Filepath)
        {
            CharacterPage Page = new CharacterPage {
                DataContext = Storage.Get(Filepath)
            };

            return(Page);
        }
コード例 #4
0
 private void OpenCharacterPageExe(object obj)
 {
     _cachedCharacterPage = _cachedCharacterPage == null ? new CharacterPage()
     {
         DataContext = new CharacterPageViewModel()
     } : _cachedCharacterPage;
     SelectedPage = _cachedCharacterPage;
 }
コード例 #5
0
    internal void Init(Player character, CharacterPage characterPage, InformationsComponent informationsComponent)
    {
        _character             = character;
        _characterPage         = characterPage;
        _informationsComponent = informationsComponent;
        _availableModels       = Resources.LoadAll <GameObject>("Characters/Prefabs");

        _indexCharacter = Array.IndexOf(_availableModels, _availableModels.FirstOrDefault(x => x.name == _character.PrefabName));

        if (_indexCharacter == -1)
        {
            _indexCharacter = 0;
        }
    }
コード例 #6
0
        public static TabItem Load(CharacterPage page)
        {
            TabItem Tab = new TabItem {
                Content = new Frame {
                    Content = page
                }
            };

            if (page.DataContext is CharacterSheet CS)
            {
                Tab.Header = $"{CS.Details.Name} - {CS.Details.Level}";
            }

            return(Tab);
        }
コード例 #7
0
    public void Setup(Spell currentItem, CharacterPage currentCharacterPage)
    {
        _currentItem = currentItem;
        _currentPage = currentCharacterPage;

        if (currentItem.Attributes.Effect == EffectType.Heal)
        {
            Heal.isOn   = true;
            Damage.isOn = false;
        }
        else
        {
            Damage.isOn = true;
            Heal.isOn   = false;
        }
    }
コード例 #8
0
ファイル: MainWindow.cs プロジェクト: dylanrenwick/GangOS
        private void UpdateTabs()
        {
            SuspendLayout();

            List <TabPage> pages = new List <TabPage>();

            pages.Add(tabOverview);
            pages.Add(tabLivestreams);

            foreach (TabPage page in tabControl.TabPages)
            {
                if (GangOSClient.PlayerList.Contains((Player)page.Tag))
                {
                    pages.Add(page);
                }
            }

            tabControl.TabPages.Clear();

            foreach (Player player in GangOSClient.PlayerList)
            {
                if (!pages.Where(page => page.Tag == player).Any())
                {
                    TabPage newPage = new TabPage();
                    newPage.Location = new Point(4, 22);
                    newPage.Name     = "tab" + player.Username;
                    newPage.Padding  = new Padding(3);
                    newPage.Size     = new Size(504, 409);
                    newPage.TabIndex = pages.Count;
                    newPage.Text     = player.Username;
                    newPage.UseVisualStyleBackColor = true;
                    newPage.Tag = player;
                    CharacterPage charPage = new CharacterPage(player);
                    charPage.Dock = DockStyle.Fill;
                    newPage.Controls.Add(charPage);

                    pages.Add(newPage);
                }
            }

            foreach (TabPage page in pages)
            {
                tabControl.TabPages.Add(page);
            }

            ResumeLayout(true);
        }
コード例 #9
0
    void Awake()
    {
        IsQstUps   = new bool[4];
        IsQstDowns = new bool[4];
        for (int i = 0; i < 4; i++)
        {
            IsQstUps[i]   = false;
            IsQstDowns[i] = false;
        }

        PageTypes    = new PageType[6];
        PageTypes[0] = new CharacterPage();
        PageTypes[1] = new WeaponPage();
        PageTypes[2] = new ResourcePage();
        PageTypes[3] = new StagePage();
        PageTypes[4] = new ItemPage();
        PageTypes[5] = new DataPage();
        Page         = PageTypes[0];
    }
コード例 #10
0
    public override void OnInspectorGUI()
    {
        CharacterPage characterPage = (CharacterPage)target;

        if (characterPage == null)
        {
            return;
        }
        GUILayout.Label("Name of character");
        characterPage.characterName = EditorGUILayout.TextField(characterPage.characterName);

        EditorGUILayout.Separator();

        //STATS
        GUILayout.Label("Stats");
        characterPage.strength = EditorGUILayout.IntSlider("Strength", characterPage.strength, 0, 10);
        characterPage.defence  = EditorGUILayout.IntSlider("Defence", characterPage.defence, 0, 10);
        characterPage.magic    = EditorGUILayout.IntSlider("Magic", characterPage.magic, 0, 10);

        EditorGUILayout.Separator();
        GUILayout.Label("Inspector");
        base.OnInspectorGUI();
    }
コード例 #11
0
        public MainPage()
        {
            Page mePage, gamePage, scorePage, charPage, invPage, monsterPage,
                 gameitemsPage, battlePage = null;

            switch (Device.RuntimePlatform)
            {
            case Device.iOS:
                mePage = new NavigationPage(new MePage())
                {
                    Title = "Information"
                };
                gamePage = new NavigationPage(new GamePage())
                {
                    Title = "Game"
                };
                scorePage = new NavigationPage(new ScorePage())
                {
                    Title = "Score"
                };
                charPage = new NavigationPage(new CharacterPage())
                {
                    Title = "Character"
                };

                invPage = new NavigationPage(new InventoryPage())
                {
                    Title = "Inventory"
                };
                monsterPage = new NavigationPage(new MonstersPage())
                {
                    Title = "Monsters"
                };
                gameitemsPage = new NavigationPage(new GameItemsPage())
                {
                    Title = "Items"
                };
                battlePage = new NavigationPage(new BattlePage())
                {
                    Title = "Battle"
                };

                mePage.Icon        = "tab_about.png";
                gamePage.Icon      = "tab_feed.png";
                scorePage.Icon     = "tab_feed.png";
                charPage.Icon      = "tab_about.png";
                invPage.Icon       = "tab_about.png";
                monsterPage.Icon   = "tab_about.png";
                gameitemsPage.Icon = "tab_about.png";
                battlePage.Icon    = "tab_about.png";
                //itemsPage.Icon = "tab_feed.png";
                //aboutPage.Icon = "tab_about.png";
                break;

            default:
                mePage = new MePage()
                {
                    Title = "Me"
                };
                gamePage = new GamePage()
                {
                    Title = "Game"
                };
                scorePage = new ScorePage()
                {
                    Title = "Score"
                };
                charPage = new CharacterPage()
                {
                    Title = "Character"
                };
                invPage = new InventoryPage()
                {
                    Title = "Inventory"
                };
                monsterPage = new MonstersPage()
                {
                    Title = "Monsters"
                };
                gameitemsPage = new GameItemsPage()
                {
                    Title = "Items"
                };
                battlePage = new BattlePage()
                {
                    Title = "Battle"
                };


                break;
            }
            Children.Add(mePage);
            Children.Add(gamePage);
            Children.Add(scorePage);
            Children.Add(charPage);
            Children.Add(invPage);
            Children.Add(monsterPage);
            Children.Add(gameitemsPage);
            Children.Add(battlePage);

            Title = Children[0].Title;
        }
コード例 #12
0
 internal UserCharacteristic()
 {
     _baseTownPage  = new BaseTownPage();
     _characterPage = new CharacterPage();
 }