Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 3
0
 public void OnGameItemIndex(GameEntity entity, CustomVector2 index)
 {
     transform.DOMove(new Vector3(index.x, index.y, 0), 0.3f);
 }
Exemplo n.º 4
0
 public void OnGameItemIndex(GameEntity entity, CustomVector2 index)
 {
     transform.DOMove(new Vector3(index.x, index.y, 0), 0.3f); //.OnComplete(() => _gameEntity.isGameMoveComplete = true);
 }