Ejemplo n.º 1
0
 public Team(int teamID)
 {
     this.teamID = teamID;
     playspaces  = PlayPhases.GenPlayspaces();
     score       = 0;
     phase       = 0;
     skips       = 0;
 }
Ejemplo n.º 2
0
    public override void BeginPhase()
    {
        base.BeginPhase();
        SpawnLevel();
        SpawnCharacterControllers();
        timer            = GameManager.instance.currentLevelInfo.waitToStart;
        currentPlayPhase = PlayPhases.waitToBegin;
        GamePhaseUIBehavior_Play castUI = (GamePhaseUIBehavior_Play)phaseUI;

        castUI.ShowPopUpWindow(GamePhaseUIBehavior_Play.PopUpWindow.PopUpTypes.Ready);
    }
Ejemplo n.º 3
0
    public override void FixedUpdatePhase()
    {
        base.FixedUpdatePhase();
        switch (currentPlayPhase)
        {
        case PlayPhases.waitToBegin:
        {
            timer -= Time.deltaTime;
            if (timer <= 0f)
            {
                timer            = GameManager.instance.currentLevelInfo.duration;
                currentPlayPhase = PlayPhases.inProgress;
                GamePhaseUIBehavior_Play castUI = (GamePhaseUIBehavior_Play)phaseUI;
                castUI.ShowPopUpWindow(GamePhaseUIBehavior_Play.PopUpWindow.PopUpTypes.Start);
                SetAnalogStickVisibility(true);
            }
        }
        break;

        case PlayPhases.inProgress:
        {
            timer -= Time.deltaTime;
            if (OnCharacterUpdate != null)
            {
                OnCharacterUpdate();
            }

            if (CheckWinState())
            {
                currentPlayPhase = PlayPhases.end;
                InputManager.instance.SetAnalogUIListener(false);
                GamePhaseUIBehavior_Play castUI = (GamePhaseUIBehavior_Play)phaseUI;
                castUI.ShowPopUpWindow(GamePhaseUIBehavior_Play.PopUpWindow.PopUpTypes.Finish);
                foreach (GameObject p in players)
                {
                    p.GetComponent <CharacterMovementController>().EndCharacterMovement();
                }
            }
        }
        break;

        case PlayPhases.end:
        {
        }
        break;
        }
    }