// Use this for initialization void Start() { if(singleton == null) { singleton = this; } }
public void OpenCharacter() { CameraController.instance.OutDungeon(); CharacterScreen.SetLocation(CharacterScreen.Location.PCGDungeon); //CharacterScreen.SetInTown (false); screenManager.Open((int)Screens.CharacterScreen); }
private void DrawCommonSections(CharacterScreen currentScreen) { GameRunUI.DrawGameUI( sidebar: DrawOption.Darkened, messages: DrawOption.DoNotDraw, environmentalDesc: DrawOption.DoNotDraw, commands: DrawOption.DoNotDraw ); const int rowOffset = 0; int colOffset = MapUI.ColOffset; const Color bgColor = Color.Black; Screen.Write(rowOffset, colOffset, "Inventory Equipment Actions Adventure Log [Tab] to switch", Color.DarkGray, bgColor); Screen.Write(rowOffset, colOffset + 51, "[Tab] to switch", Color.Gray, bgColor); Screen.Write(rowOffset, colOffset + 52, "Tab", Color.Cyan, bgColor); int highlightOffset; string highlightLabel; switch (currentScreen) { case CharacterScreen.Inventory: highlightOffset = 0; highlightLabel = "Inventory"; break; case CharacterScreen.Equipment: highlightOffset = 12; highlightLabel = "Equipment"; break; case CharacterScreen.Actions: highlightOffset = 24; highlightLabel = "Actions"; break; case CharacterScreen.AdventureLog: highlightOffset = 34; highlightLabel = "Adventure Log"; break; default: throw new InvalidOperationException("Invalid screen"); } Screen.Write(rowOffset, colOffset + highlightOffset, highlightLabel, Color.Green, bgColor); }
private void ActionKeyMappingOpenCharacter_ActionTriggered(object sender, ActionTriggeredEventArgs e) { if (world.PlayerCharacter == null) { return; } if (world.PlayerCharacter.Powers == null) { return; } //if (world.PlayerCharacter.IsDead) // return; CharacterScreen characterScreen = new CharacterScreen(); characterScreen.Character = world.PlayerCharacter; characterScreen.Initialize(this.Manager); characterScreen.Activate(); //inventoryScreen.Player = world.PlayerCharacter; //inventoryScreen.BaseContainer = (BagClientItem)world.PlayerCharacter.Inventory; //new ClientBagItem((BagItem)world.GetItem(world.PlayerCharacter.InventoryBagId)); //inventoryScreen.GroundItems = world.GroundItemsInRange(world.PlayerCharacter.Id); //inventoryScreen.Activate(); }
void Awake() { gDataRef = GameObject.Find("GameManager").GetComponent<GlobalGameData>(); cScreen = GameObject.Find("Character Window Canvas").GetComponent<CharacterScreen>(); }
void Awake() { gameDataRef = GameObject.Find("GameManager").GetComponent <GlobalGameData>(); characterScreen = GameObject.Find("Character Window Canvas").GetComponent <CharacterScreen>(); }
void Awake() { instance = this; }
public string GetLineOrChoice(int buttonIndex, ScoreContainer scoreContainer, ChoicesBox choicesBox, CharacterScreen characterScreen) { Debug.Log(_currentLineIndex); choicesBox.labels.Clear(); string _line = ""; if (_currentLineIndex == lines.Count - 1) { foreach (Choice choice in choices) { choicesBox.labels.Add(choice.label); } } else { choicesBox.labels.Add("Продолжить"); } if (_currentLineIndex == lines.Count) { _recordedChoice = choices[buttonIndex]; _line = _recordedChoice.Perform(scoreContainer, characterScreen); _currentLineIndex++; } else if (_currentLineIndex > lines.Count) { _line = _recordedChoice.Perform(scoreContainer, characterScreen); } else { characterScreen.Draw(characters[_currentLineIndex]); _line = lines[_currentLineIndex]; _currentLineIndex++; } return(_line); }
private void PocDefine() { if (endflag) { this.Close(); return; } int type = Story.GetStoryType(); Addflag = true; //0 as Normal Story Line //1 as chararcter Screen //2 as Request if (type == 0) { onType = 0; TutorialScreen.Show(); CharacterScreen.Hide(); SetTutorialPic(Story.GetPicID()); AddText(Story.GetStoryText()); } if (type == 99) { onType = 0; CreateHero c = new CreateHero(); AddText(Story.GetStoryText()); c.ShowDialog(); Story.next++; PocDefine(); return; } if (type == 98) { onType = 1; TutorialScreen.Hide(); CharacterScreen.Show(); MainCharacter.Image = Image.FromFile(Application.StartupPath + "\\myHero.jpg"); HandleEventString(Story.GetEventID()); SetOtherPic(Story.GetPicID()); AddText(Story.GetStoryText()); Request r = new Request(Story.GetRequestID()); r.ShowDialog(); name = r.name; } if (type == 97) { onType = 1; TutorialScreen.Hide(); CharacterScreen.Show(); MainCharacter.Image = Image.FromFile(Application.StartupPath + "\\myHero.jpg"); HandleEventString(Story.GetEventID()); SetOtherPic(Story.GetPicID()); AddText(Story.GetStoryText()); nextflag = false; attacknum = 3; FuncButton.Text = "攻擊鈕-剩餘3次"; FuncButton.Show(); } if (type == 96) { onType = 1; TutorialScreen.Hide(); CharacterScreen.Show(); MainCharacter.Image = Image.FromFile(Application.StartupPath + "\\myHero.jpg"); HandleEventString(Story.GetEventID()); SetOtherPic(Story.GetPicID()); AddText(Story.GetStoryText()); LevelUP u = new LevelUP(1, 1, 2, "請使用++這個運算子來為想要提升之能力升級,請注意項目名稱和別忘了加上分號。打完後記得按ENTER確認唷!"); u.ShowDialog(); SetCharacter(u); Story.next++; PocDefine(); return; } if (type == 95) { onType = 1; TutorialScreen.Hide(); CharacterScreen.Show(); MainCharacter.Image = Image.FromFile(Application.StartupPath + "\\myHero.jpg"); HandleEventString(Story.GetEventID()); SetOtherPic(Story.GetPicID()); AddText(Story.GetStoryText()); HandleEventString(Story.GetEventID()); nextflag = false; FightButton.Show(); EscapeButton.Show(); Story.next++; return; } if (type == 1) { onType = 1; TutorialScreen.Hide(); CharacterScreen.Show(); MainCharacter.Image = Image.FromFile(Application.StartupPath + "\\myHero.jpg"); HandleEventString(Story.GetEventID()); SetOtherPic(Story.GetPicID()); if (Addflag) { AddText(Story.GetStoryText()); } } if (type == 2) { onType = 1; TutorialScreen.Hide(); CharacterScreen.Show(); SetOtherPic(Story.GetPicID()); HandleEventString(Story.GetEventID()); AddText(Story.GetStoryText()); MainCharacter.Image = Image.FromFile(Application.StartupPath + "\\myHero.jpg"); Request r = new Request(Story.GetRequestID()); r.ShowDialog(); Story.next++; PocDefine(); return; } if (type == 999) { onType = 0; TutorialScreen.Show(); CharacterScreen.Hide(); SetTutorialPic(Story.GetPicID()); AddText(Story.GetStoryText()); endflag = true; } Story.next++; }
public void BotonJugar() { CharacterScreen.ResetPlayerState(15); SceneManager.LoadScene("Clase"); }