public override void LoadStage() { var loadStageAct = new Action(() => { _lastSourceField = PoolManager.Spawn(SourceFieldList.Find(x => x.name.EndsWith(WordConstructor01Core.CurrentStage.ShowedWord.Length.ToString())).gameObject).GetComponent <SourceBoardField>(); _lastTargetField = PoolManager.Spawn(TargetFieldList.Find(x => x.name.EndsWith(WordConstructor01Core.CurrentStage.GuessingWord.Length.ToString())).gameObject).GetComponent <TargetBoardField>(); _lastSourceField.transform.parent = _lastTargetField.transform.parent = _boardField; _lastSourceField.Init(WordConstructor01Core.CurrentStage.ShowedWord); _lastTargetField.Init(WordConstructor01Core.CurrentStage.GuessingWord); }); if (_lastSourceField == null) { loadStageAct(); } else { StartCoroutine(DestroyOldFieldAndSpawnNew(loadStageAct)); } }
private void OnTargetBoardIsInited() { StartCoroutine(SourceBoardField.ShowChars(ResetDoingNothingCoroutine)); }
private void OnCharIsFound(TargetBoard targetBoard) { SourceBoardField.MoveDragObjectOnTarget(targetBoard.CharSprite.transform.position); }