void Start() { GameSize GameSizeObject = GameSize.gameSize; GameSizeObjectSizeX = GameSizeObject.transform.localScale.x / 2.0f; GameSizeObjectSizeY = GameSizeObject.transform.localScale.y / 2.0f; gameStartCounter = GameStartCounter.gameStartCounter; StartCoroutine(gameStartCounter.FirstStartCounting(gameStartCounter.startTime, StartLevel)); }
void Awake() { if (gameStartCounter == null) { gameStartCounter = this; } else if (gameStartCounter != this) { Destroy(gameObject); } }
public void Init(GameStartCounter gameStartCounter) { gameStartCounter.TimeCount.Subscribe(timeCount => { if (timeCount > 0) { ShowCountdown(timeCount); } else { ShowGameStart(); } }).AddTo(gameObject); }