private void CreateGamePieceViews() { List <IGamePiecePM> gamePiecePMs = PM.GamePiecePMs; foreach (IGamePiecePM piecePM in gamePiecePMs) { GameObject pieceObject = container.InstantiatePrefab(GamePieceViewPrefab, transform); //GameObject pieceObject = gameObject.InstantiateUI( GamePieceViewPrefab, gameObject ); GamePieceView pieceView = pieceObject.GetComponent <GamePieceView>(); pieceView.Init(piecePM); } }
public void OnAnimationComplete() { GamePieceView view = GetComponentInParent <GamePieceView>(); view.OnAnimationComplete(); }