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