Ejemplo n.º 1
0
    private void FinishLerping()
    {
        _inGameManager.DestroyPlayer(InGameManager.playerToDestroy);

        LevelManager.innerPoints = LevelManager.innerLerpTo;
        LevelManager.outerPoints = LevelManager.outerLerpTo;

        InGameManager.shouldLerpSmaller = false;

        meshManager.SetMaterials();
        _inGameManager.lerpedAmount = 0;
        playerManager.UpdatePlayerPositions();
    }
Ejemplo n.º 2
0
    /// <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);
        }
    }
Ejemplo n.º 3
0
    private void FinishFromLerp()
    {
        _inGameManager.shouldLerpFromCircle = false;
        _inGameManager.lerpedAmount         = 0;

        LevelManager.innerPoints = pointManager.SpawnInnerPoints(3, _inGameManager.levelCenter); // Problem with rotation
        LevelManager.outerPoints = pointManager.SpawnOuterPoints(LevelManager.innerPoints);

        meshManager.mesh.Clear();
        meshManager.SetVertices(MeshManager.ConcatV2ListsToV3(LevelManager.innerPoints, LevelManager.outerPoints));
        meshManager.SetMaterials();
        meshManager.AddIndicesAndDrawMesh(3);

        _circleSpawnedPlayerColor = _inGameManager.circleSpawningPlayer.Color;

        PlayerColor[] activatedColor = PlayerManager.players.Select(p => p.Color).OrderBy(i => (int)i).ToArray();

        playerManager.DestroyAllPlayers();
        playerManager.SpawnPlayers(pointManager.radius, activatedColor);
        playerManager.PlayersLookAtPoint(_inGameManager.levelCenter);

        arrowManager.AttachLeftArrow(PlayerManager.players.First(p => p.Color == _circleSpawnedPlayerColor));
    }