Exemple #1
0
 protected virtual void AwakeOverride()
 {
     m_gameMachine = GameMachine;
     m_appTheme    = AppTheme;
     m_audio       = Audio;
     m_globalUI    = UI;
 }
Exemple #2
0
        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());
            }
        }
Exemple #3
0
 public void Open()
 {
     if (m_globalUI == null)
     {
         m_globalUI = IOC.Resolve <IGlobalUI>();
     }
     m_globalUI.OpenMenu(m_items);
 }
Exemple #4
0
 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();
 }
Exemple #5
0
        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);
        }
Exemple #6
0
        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>();
 }
Exemple #8
0
 private void Awake()
 {
     m_globalUI = IOC.Resolve <IGlobalUI>();
 }
Exemple #9
0
 private void Awake()
 {
     m_globalUI = IOC.Resolve <IGlobalUI>();
     m_root     = transform.parent;
 }