void Awake()
        {
            //user input
            UserInput = gameObject.AddComponent <UiUserInput>();

            //HUD end game
            gameObject.AddComponent <UiButtonsEndGame>();
        }
Exemplo n.º 2
0
        //----------------------------------------------------------------------------------------------------------

        #region Unity callback

        void Awake()
        {
            UserInput = GetComponent <IUiUserInput>();
            Ui        = GetComponent <IUiPlayer>();
            var buttons = gameObject.GetComponentsInChildren <UiButton>();

            foreach (var button in buttons)
            {
                button.SetHandler(this);
            }
        }
        protected override void Awake()
        {
            base.Awake();
            GameData = GameData.Load();

            //user input
            UserInput = gameObject.AddComponent <UiUserInput>();

            //HUD end game
            gameObject.AddComponent <UiButtonsEndGame>();
        }