public void LerpToCircle() { LevelManager.innerPoints = lerpManager.LerpToCircle(LevelManager.innerLerpFrom, LevelManager.innerLerpTo, _inGameManager.lerpedAmount); LevelManager.outerPoints = lerpManager.LerpToCircle(LevelManager.outerLerpFrom, LevelManager.outerLerpTo, _inGameManager.lerpedAmount); playerManager.CircleUpdatePlayerPosition(_inGameManager.lerpedAmount); playerManager.PlayersLookAtPoint(_inGameManager.levelCenter); arqdutManager.CircleUpdateArqdutPosition(LevelManager.innerPoints, _inGameManager.levelCenter); meshManager.SetVertices(MeshManager.ConcatV2ListsToV3(LevelManager.innerPoints, LevelManager.outerPoints)); _inGameManager.lerpedAmount += _inGameManager.shouldLerpFromCircle ? -_inGameManager.lerpAmount : _inGameManager.lerpAmount; }
public void DrawMesh(int playerAmount) { if (meshManager.mesh.vertexCount > 0) { meshManager.AddIndicesAndDrawMesh(playerAmount); } meshManager.SetVertices(MeshManager.ConcatV2ListsToV3(innerPoints, outerPoints)); }
/// <summary> /// Calls all methods necessary for spawning the initial level /// </summary> public void SpawnLevel(int corners) { LevelManager.innerPoints = pointManager.SpawnInnerPoints(corners, _inGameManager.levelCenter); LevelManager.outerPoints = pointManager.SpawnOuterPoints(LevelManager.innerPoints); playerManager.SpawnPlayers(pointManager.radius, ChooseControls.playerStates.Where(o => o.Value != PlayerState.Deactivated).Select(i => i.Key).ToArray()); playerManager.PlayersLookAtPoint(_inGameManager.levelCenter); meshManager.SetMaterials(); arqdutManager.SpawnArqduts(LevelManager.innerPoints, _inGameManager.levelCenter); meshManager.SetVertices(MeshManager.ConcatV2ListsToV3(LevelManager.innerPoints, LevelManager.outerPoints)); _inGameManager.DrawMesh(corners); if (ChooseControls.gameStarted) { _gameManager.StartCountdown(_inGameManager.levelCenter); } }