protected override void Start()
 {
     ResolutionDropdown = CreateGameObject.CreateChildGameObject <ResolutionDropdown>(transform).GetComponent <ResolutionDropdown>();
     DisplayText        = LanguageManager.Instance.GetTextValue("Resolution");
     AddAllSupportedResolutionToDropdown();
     base.Start();
 }
Example #2
0
 protected override void Awake()
 {
     Text               = CreateGameObject.CreateChildGameObject <ControlText>(transform).GetComponent <ControlText>();
     MainMenuButton     = CreateGameObject.CreateChildGameObject <MainMenuButton>(transform).GetComponent <MainMenuButton>();
     RestartLevelButton = CreateGameObject.CreateChildGameObject <RestartLevelButton>(transform).GetComponent <RestartLevelButton>();
     base.Awake();
 }
Example #3
0
 // Use this for initialization
 protected override void Awake()
 {
     Texture2D = CreateGameObject.CreateChildGameObject <CustomImage>(transform).GetComponent <CustomImage>();
     Text      = CreateGameObject.CreateChildGameObject <ControlText>(Texture2D.rectTransform).GetComponent <ControlText>();
     StopWatch = gameObject.AddComponent <StopWatch>();
     base.Awake();
 }
Example #4
0
        // Use this for initialization
        protected override void Awake()
        {
            GraphicOptionsButton = CreateGameObject.CreateChildGameObject <GraphicOptionsButton>(transform).GetComponent <GraphicOptionsButton>();
            AudioOptionsButton   = CreateGameObject.CreateChildGameObject <AudioOptionsButton>(transform).GetComponent <AudioOptionsButton>();

            base.Awake();
        }
 protected override void Start()
 {
     ScreenTypeDropdown = CreateGameObject.CreateChildGameObject <ScreenTypeDropdown>(transform).GetComponent <ScreenTypeDropdown>();;
     DisplayText        = LanguageManager.Instance.GetTextValue("ScreenType");
     AddAllScreenTypesToDropdown();
     base.Start();
 }
 protected override void Start()
 {
     _soundEffectSlider = CreateGameObject.CreateChildGameObject <SoundEffectSlider>(transform).GetComponent <SoundEffectSlider>();
     _soundEffectSlider.Slider.onValueChanged.AddListener(OnValueChanged);
     DisplayText = LanguageManager.Instance.GetTextValue("SoundEffects");
     base.Start();
 }
 protected override void Awake()
 {
     ControlText       = CreateGameObject.CreateChildGameObject <ControlText>(transform).GetComponent <ControlText>();
     ControlText.color = Color.white;
     ControlText.rectTransform.sizeDelta = new Vector2(300, 50);
     StopWatch = gameObject.AddComponent <StopWatch>();
     base.Awake();
 }
        protected override void Start()
        {
            _musicVolumeSlider = CreateGameObject.CreateChildGameObject <MusicVolumeSlider>(transform).GetComponent <MusicVolumeSlider>();
            _musicVolumeSlider.Slider.onValueChanged.AddListener(OnValueChanged);

            DisplayText = LanguageManager.Instance.GetTextValue("BackgroundMusic");
            base.Start();
        }
Example #9
0
        protected override void Awake()
        {
            HealthBarSlider = CreateGameObject.CreateChildGameObject <HealthBarSlider>(transform).GetComponent <HealthBarSlider>();
            HealthBarSlider.Slider.maxValue         = 100;
            HealthBarSlider.RectTransform.sizeDelta = new Vector2(300, 20);

            base.Awake();
        }
Example #10
0
 protected override void Awake()
 {
     Title             = CreateGameObject.CreateChildGameObject <ControlText>(transform).GetComponent <ControlText>();
     StartButton       = CreateGameObject.CreateChildGameObject <StartButton>(transform).GetComponent <StartButton>();
     OptionsButton     = CreateGameObject.CreateChildGameObject <OptionsButton>(transform).GetComponent <OptionsButton>();
     LevelSelectButton = CreateGameObject.CreateChildGameObject <LevelSelectButton>(transform).GetComponent <LevelSelectButton>();
     ExitButton        = CreateGameObject.CreateChildGameObject <ExitButton>(transform).GetComponent <ExitButton>();
     base.Awake();
 }
Example #11
0
 protected override void Awake()
 {
     AudioSource = gameObject.AddComponent <AudioSource>();
     ButtonText  = CreateGameObject.CreateChildGameObject <ControlText>(transform).GetComponent <ControlText>();
     gameObject.AddComponent <CanvasRenderer>();
     ButtonImage = gameObject.AddComponent <CustomImage>();
     ButtonImage.Initialize(Resources.Load <Sprite>("UI/Skin/background"), UnityEngine.UI.Image.Type.Sliced);
     RectTransform = GetComponent <RectTransform>();
 }
Example #12
0
 void Awake()
 {
     LevelSelectScreen        = CreateGameObject.CreateChildGameObject <LevelSelectScreen>(transform).GetComponent <LevelSelectScreen>();
     OptionsScreen            = CreateGameObject.CreateChildGameObject <OptionsScreen>(transform).GetComponent <OptionsScreen>();
     GraphicOptionsSubScreen  = CreateGameObject.CreateChildGameObject <GraphicOptionsSubScreen>(transform).GetComponent <GraphicOptionsSubScreen>();
     AudioOptionsSubScreen    = CreateGameObject.CreateChildGameObject <AudioOptionsSubScreen>(transform).GetComponent <AudioOptionsSubScreen>();
     ControlsOptionsSubScreen = CreateGameObject.CreateChildGameObject <ControlsOptionsSubScreen>(transform).GetComponent <ControlsOptionsSubScreen>();
     GameOptionsSubScreen     = CreateGameObject.CreateChildGameObject <GameOptionsSubScreen>(transform).GetComponent <GameOptionsSubScreen>();
 }
Example #13
0
 protected override void Awake()
 {
     _continueButton     = CreateGameObject.CreateChildGameObject <ContinueButton>(transform).GetComponent <ContinueButton>();
     _restartLevelButton = CreateGameObject.CreateChildGameObject <RestartLevelButton>(transform).GetComponent <RestartLevelButton>();
     _optionsButton      = CreateGameObject.CreateChildGameObject <OptionsButton>(transform).GetComponent <OptionsButton>();
     _exitButton         = CreateGameObject.CreateChildGameObject <ExitButton>(transform).GetComponent <ExitButton>();
     _exitButton.onClick.AddListener(_exitButton.OnClickInGame);
     base.Awake();
 }
Example #14
0
        void Awake()
        {
            _timerDisplay = CreateGameObject.CreateChildGameObject <TimerDisplay>(transform).GetComponent <TimerDisplay>();
            VictoryScreen = CreateGameObject.CreateChildGameObject <VictoryScreen>(transform).GetComponent <VictoryScreen>();
            DefeatScreen  = CreateGameObject.CreateChildGameObject <DefeatScreen>(transform).GetComponent <DefeatScreen>();
            PauseMenu     = CreateGameObject.CreateChildGameObject <PauseMenu>(transform).GetComponent <PauseMenu>();
            PlayerData    = FindObjectOfType <Player>();

            _floatingTextDisplay = CreateGameObject.CreateChildGameObject <FloatingTextDisplay>(transform).GetComponent <FloatingTextDisplay>();
            _chargeBar           = CreateGameObject.CreateChildGameObject <ChargeBar>(transform).GetComponent <ChargeBar>();
            _healthBar           = CreateGameObject.CreateChildGameObject <HealthBar>(transform).GetComponent <HealthBar>();
            _bestTimeDisplay     = CreateGameObject.CreateChildGameObject <BestTimeDisplay>(transform).GetComponent <BestTimeDisplay>();
        }
Example #15
0
        protected override void Awake()
        {
            _barsList = new List <CustomImage>();

            for (float i = 0.1f; i < 0.5f; i += 0.05f)
            {
                Bar       = CreateGameObject.CreateChildGameObject <CustomImage>(transform).GetComponent <CustomImage>();
                Bar.color = Color.yellow;
                Bar.rectTransform.sizeDelta = new Vector2(50, 10);
                Bar.SetAnchorsAndPivot(new Vector2(0, i), new Vector2(0, i), new Vector2(0, 0));
                Bar.enabled = false;
                _barsList.Add(Bar);
            }

            base.Awake();
        }
Example #16
0
        void Awake()
        {
            Time.timeScale   = 1;
            InterfaceHandler = CreateGameObject.CreateChildGameObject <InterfaceHandler>(transform).GetComponent <InterfaceHandler>();
            Player           = (Player)GetComponentInChildren(typeof(Player));
            InputHandler     = CreateGameObject.CreateChildGameObject <InputHandler>(transform).GetComponent <InputHandler>();

            BestLevelTime = new BestLevelTimeFileHandler("bestTimes.dat");
            Level         = new Level(BestLevelTime.LoadBestTimeForLevel(SceneManager.GetActiveScene().buildIndex), SceneManager.GetActiveScene().name,
                                      (LevelEnum)SceneManager.GetActiveScene().buildIndex);
            InterfaceHandler.SetBestTimeDisplay(Level.BestTime);

            MainCamera = GetComponentInChildren <MainCamera>();

            GameEvents = new GameEvents();
            GameEvents.PlayerOnGoalCollision += Victory;

            InputSubscriptions();
            Paused = false;
        }
Example #17
0
 protected override void Awake()
 {
     _levelSelectList         = CreateGameObject.CreateChildGameObject <LevelSelectLevelList>(transform).GetComponent <LevelSelectLevelList>();
     _levelSelectList.enabled = false;
     base.Awake();
 }
Example #18
0
 void Awake()
 {
     _startScreen = CreateGameObject.CreateChildGameObject <StartScreen>(transform).GetComponent <StartScreen>();
     _menu        = CreateGameObject.CreateChildGameObject <Menu>(transform).GetComponent <Menu>();
 }
 protected override void Start()
 {
     RectTransform      = gameObject.AddComponent <RectTransform>();
     TextComponent      = CreateGameObject.CreateChildGameObject <ControlText>(transform).GetComponent <ControlText>();
     TextComponent.text = DisplayText;
 }
Example #20
0
 protected override void Awake()
 {
     BackButton = CreateGameObject.CreateChildGameObject <BackButton>(transform).GetComponent <BackButton>();
     BackButton.onClick.AddListener(OnBackButtonClick);
     base.Awake();
 }
Example #21
0
 protected override void Awake()
 {
     _text = CreateGameObject.CreateChildGameObject <ControlText>(transform).GetComponent <ControlText>();
     base.Awake();
 }
 protected override void Awake()
 {
     _resolutionOptionBox = CreateGameObject.CreateChildGameObject <ResolutionOptionBox>(transform).GetComponent <ResolutionOptionBox>();
     _screenTypeOptionBox = CreateGameObject.CreateChildGameObject <ScreenTypeOptionBox>(transform).GetComponent <ScreenTypeOptionBox>();
     base.Awake();
 }
Example #23
0
 protected override void Awake()
 {
     _musicVolumeLocalizeableOptionBox       = CreateGameObject.CreateChildGameObject <MusicVolumeOptionBox>(transform).GetComponent <MusicVolumeOptionBox>();
     _soundEffectVolumeLocalizeableOptionBox = CreateGameObject.CreateChildGameObject <SoundEffectVolumeOptionBox>(transform).GetComponent <SoundEffectVolumeOptionBox>();
     base.Awake();
 }
Example #24
0
 void Start()
 {
     PauseScreen = CreateGameObject.CreateChildGameObject <PauseScreen>(transform).GetComponent <PauseScreen>();
     Menu        = CreateGameObject.CreateChildGameObject <Menu>(transform).GetComponent <Menu>();
     Menu.SetParentScreen(PauseScreen);
 }