protected virtual void AwakeOverride() { m_gameMachine = GameMachine; m_appTheme = AppTheme; m_audio = Audio; m_globalUI = UI; }
public void OpenMenu(MenuItemInfo[] items, bool blocked, bool persist) { Clear(); Blocked = blocked; Persist = persist; gameObject.SetActive(true); foreach (var item in items) { SpawnMenuItem(item, m_menuItem, m_contentRoot); } if (m_globalUI == null) { m_globalUI = IOC.Resolve <IGlobalUI>(); } if (m_okButton != null) { m_okButton.onClick.AddListener(() => m_globalUI.CloseLastScreen()); } if (m_closeButton != null) { m_closeButton.onClick.AddListener(() => m_globalUI.CloseLastScreen()); } }
public void Open() { if (m_globalUI == null) { m_globalUI = IOC.Resolve <IGlobalUI>(); } m_globalUI.OpenMenu(m_items); }
protected void Awake() { m_gameMachine = IOC.Resolve <IGameMachine>(); m_menu = GetComponent <Menu>(); m_globalUI = IOC.Resolve <IGlobalUI>(); m_menuSelection = IOC.Resolve <IMenuSelection>(); m_audio = IOC.Resolve <IAudio>(); m_player = IOC.Resolve <IPlayer>(); AwakeOverride(); }
public static Player CreateRandomPlayer() { if (m_globalUI == null) { m_globalUI = IOC.Resolve <IGlobalUI>(); } var player = new Player(); var totalRounds = UnityRandom.Range(0, 40); var money = UnityRandom.Range(100, 40000); var bidAmount = UnityRandom.Range(100, money); player.Init(money, m_globalUI.GetRandomAvatar(), totalRounds, UnityRandom.Range(0, totalRounds / 2), bidAmount); return(player); }
public void Display() { if (m_globalUI == null) { m_globalUI = IOC.Resolve <IGlobalUI>(); } m_globalUI.Popup(new PopupInfo { Content = "Rounds Won: " + RoundsWon + "/" + RoundsPlayed + "\nMoney: Rs. " + Money + "\nAchievements yet to come.", Title = Name, Preview = Avatar, Blocked = false }); }
public override void AwakeOverride() { base.AwakeOverride(); m_globalUI = IOC.Resolve <IGlobalUI>(); }
private void Awake() { m_globalUI = IOC.Resolve <IGlobalUI>(); }
private void Awake() { m_globalUI = IOC.Resolve <IGlobalUI>(); m_root = transform.parent; }