コード例 #1
0
ファイル: MainView.cs プロジェクト: infine8/unity3d-seva
        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));
            }
        }
コード例 #2
0
 private void OnTargetBoardIsInited()
 {
     StartCoroutine(SourceBoardField.ShowChars(ResetDoingNothingCoroutine));
 }
コード例 #3
0
 private void OnCharIsFound(TargetBoard targetBoard)
 {
     SourceBoardField.MoveDragObjectOnTarget(targetBoard.CharSprite.transform.position);
 }