コード例 #1
0
        /// <summary>
        /// 生成障碍
        /// </summary>
        /// <param name="index"></param>
        public GameEntity CreateBlocker(CustomVector2 index)
        {
            var entity = _contexts.game.CreateEntity();

            entity.isGameGameBoardItem = true;
            entity.isGameMovable       = false;
            entity.AddGameItemIndex(index);
            entity.AddGameLoadPrefab(ResPath.BlockerPath);
            return(entity);
        }
コード例 #2
0
        /// <summary>
        /// 生成可移动元素
        /// </summary>
        /// <param name="index"></param>
        /// <returns></returns>
        public GameEntity CreateBall(CustomVector2 index)
        {
            var entity = _contexts.game.CreateEntity();

            entity.isGameGameBoardItem = true;
            entity.isGameMovable       = true;
            entity.AddGameItemIndex(index);
            entity.AddGameLoadPrefab(RandomPathService.RandomPath());
            return(entity);
        }
コード例 #3
0
 public void OnGameItemIndex(GameEntity entity, CustomVector2 index)
 {
     transform.DOMove(new Vector3(index.x, index.y, 0), 0.3f);
 }
コード例 #4
0
ファイル: GameItemView.cs プロジェクト: zhoulk/entitas
 public void OnGameItemIndex(GameEntity entity, CustomVector2 index)
 {
     transform.DOMove(new Vector3(index.x, index.y, 0), 0.3f); //.OnComplete(() => _gameEntity.isGameMoveComplete = true);
 }