public DataColorScheme ColorScheme; // Colors //protected override void Awake() { // base.Awake(); //} private void Start() { ColorScheme = ManagerCGridGame.I.ColorScheme; if (MainCamera == null) { MainCamera = Camera.main; } if (MainCamera == null) { MainCamera = FindObjectOfType <Camera>(); } if (UIGameOver == null) { UIGameOver = FindObjectOfType <GameOverUI>(); } PauseText.color = ColorScheme.RuntimeCurrentColorButtonNotClicked; PlayButtonImage.color = ColorScheme.RuntimeCurrentColorButtonNotClicked; PlayButtonText.color = ColorScheme.RuntimeCurrentColorUIText; RestartButtonImage.color = ColorScheme.RuntimeCurrentColorButtonNotClicked; RestartButtonText.color = ColorScheme.RuntimeCurrentColorUIText; PauseButtonImage.color = ColorScheme.RuntimeCurrentColorButtonNotClicked; PauseButtonText.color = ColorScheme.RuntimeCurrentColorUIText; MenuButtonImage.color = ColorScheme.RuntimeCurrentColorButtonNotClicked; MenuButtonText.color = ColorScheme.CurrentColorUIText; }
protected override void Awake() { base.Awake(); if (ColorScheme == null) { ColorScheme = (DataColorScheme)Resources.Load(ManagerCGridGame.I.CGridDataPath + "/" + DefaultNameColorScheme, typeof(ScriptableObject)); } if (ColorScheme == null) { Debug.LogError("Set DataColorScheme", this); } if (DataCellsStates == null) { DataCellsStates = (DataCellStates)Resources.Load(ManagerCGridGame.I.CGridDataPath + "/" + DefaultNameCellStates, typeof(ScriptableObject)); } if (DataCellsStates == null) { Debug.LogError("Set DataCellsStates", this); } if (CampaignData == null) { Debug.LogError("No CampaignData set", this); CampaignData = Resources.FindObjectsOfTypeAll <DataCampaign>().FirstOrDefault(); } LevelData = CampaignData.LevelsData[CampaignData.CurrentLevel]; //if (LevelData == null) { // Debug.LogError("No DataLevel set. Creating new one", this); // LevelData = DataLevel.CreateInstance<DataLevel>(); //} }
protected void Start() { _waitTimer = new WaitForSeconds(SecondsInTurn); CSData = ManagerCGridGame.I.ColorScheme; if (UIClock == null) { UIClock = gameObject.GetComponent <UIClock>(); } ManagerChecks.I.OnPlayerDidSomethingGood += OnPlayerDidSomethingVeryGood; }
private void Start() { CSData = ManagerCGridGame.I.ColorScheme; if (_audioSource == null) { _audioSource = gameObject.GetComponent <AudioSource>(); } if (_borderSpriteRenderer == null) { _borderSpriteRenderer = GetComponent <Image>(); } if (_borderSpriteRenderer != null) { _borderSpriteRenderer.color = CSData.RuntimeCurrentColorButtonNotClicked; } if (_clockText == null) { _clockText = GetComponent <TextMeshProUGUI>(); } if (_clockText == null) { _clockText = GetComponentInChildren <TextMeshProUGUI>(); } if (_clockText != null) { _clockText.color = CSData.RuntimeCurrentColorButtonNotClicked; } if (_waitText != null) { //_waitText.GetComponent<MeshRenderer>().sortingOrder = 10; _waitText.color = CSData.RuntimeCurrentColorButtonNotClicked; } else { Debug.LogError("No _waitText", this); } ManagerClockScore.I.OnTimerChanged += OnTimerChanged; //ManagerCGridGame.I.OnGameStart += OnTimerChanged }
//private void Awake() { // GameStart(); //} private void Awake() { ColorScheme = ManagerCGridGame.I.ColorScheme; CurrentScoreText.color = ColorScheme.RundtimeCurrentColorButtonClicked; BestScoreText.color = ColorScheme.RundtimeCurrentColorButtonClicked; if (PlayButton != null) { PlayButtonImage = PlayButton.gameObject.GetComponent <Image>(); PlayButtonImage.color = ColorScheme.RuntimeCurrentColorButtonNotClicked; if (PlayButtonText == null) { PlayButtonText = PlayButton.GetComponentInChildren <Text>(); } PlayButtonText.color = ColorScheme.RundtimeCurrentColorButtonClicked; } else { Debug.LogError("No PlayButton set", this); } if (MenuButton != null) { MenuButtonImage = PlayButton.gameObject.GetComponent <Image>(); MenuButtonImage.color = ColorScheme.RuntimeCurrentColorButtonNotClicked; if (MenuButtonText == null) { MenuButtonText = PlayButton.GetComponentInChildren <Text>(); } MenuButtonText.color = ColorScheme.RundtimeCurrentColorButtonClicked; } else { Debug.LogError("No MenuButton set", this); } }