StartCountdown() public méthode

public StartCountdown ( ) : void
Résultat void
Exemple #1
0
    /**
     * Start preparing, with the channel on pChannelNumber
     */
    void StartPreparing(int pChannelNumber)
    {
        // Here we should have 5 seconds of static just so people can get to the station they want
        stage = PREPARING;
        Action preparingFinished =
            () => {
            StartPlaying();
        };

        mCountdown.StartCountdown(Game.EVENING_PREPARING_COUNTDOWN, preparingFinished);
        ShowChannel(pChannelNumber);
    }
Exemple #2
0
 public void RoundStart()
 {
     dialogueControl.gameObject.SetActive(true);
     dialogueControl.ShowText(Pick());
     countdown.StartCountdown();
     sequenceControl.CreateSequence();
 }
    private new void Start()
    {
        base.Start();
        _spawnPoints = _initialSpawnPoints.Take(players.Length).ToArray();
        SpawnPlayersCharacters(_spawnPoints);
        WatchForCollisions();

        Physics2D.gravity = Vector2.zero;
        Countdown countdownInstance = countdown.GetComponent <Countdown>();

        countdownInstance.StartCountdown().Subscribe((c) =>
        {
            instruction.SetActive(false);
            _audioSource.Play();
            Physics2D.gravity = new Vector2(0, -6f);
            _roundStarted     = true;
            foreach (var player in players)
            {
                player.characterController.CanMove                    = true;
                player.characterController.CanJump                    = true;
                player.characterController.CanCrouch                  = true;
                player.characterController.CanThrowStuff              = true;
                player.characterController.ThrowableObject            = throwable;
                player.characterController.CanThrowMoreThanOneThing   = false;
                player.characterController.IsThrowPowerFromButtonHold = true;
                player.characterController.ResetStatus();
            }
        });
    }
    void Update()
    {
        float moveValue;

        if (canMove && !gameHasEnded)
        {
            if ((moveValue = Input.GetAxisRaw("Horizontal")) != 0f)
            {
                ButtonToMovement(moveValue, false);
                _countdown.StartCountdown(); //começa countdown, só se não tiver começado já
            }
            else if ((moveValue = Input.GetAxisRaw("Vertical")) != 0f)
            {
                ButtonToMovement(moveValue, true);
                _countdown.StartCountdown(); //começa countdown, só se não tiver começado já
            }
        }
    }
Exemple #5
0
 private void CameraBeforeStart()
 {
     if (myTargetPosition == transform.position && myIsBeforeStart)
     {
         myIsBeforeStart = false;
         myCountdown.StartCountdown();
         myCountdown.gameObject.SetActive(true);
     }
 }
Exemple #6
0
 private void FinishRound()
 {
     CancelInvoke("LaunchNextPacket");
     currentRound++;
     badSplittedImage.Die();
     goodSplittedImage.Die();
     if (currentRound < badImages.Length)
     {
         countdown.StartCountdown();
     }
 }
Exemple #7
0
 public void StartCountdown()
 {
     if (Rounds > 0)
     {
         StartCoroutine(countdown.StartCountdown(3, 0.25F, () => StartSpawning()));
     }
     else
     {
         LeanTween.delayedCall(gameObject, 0.5F, () => NotifyGameOver());
     }
 }
    [RPC] void StartPreparing()
    {
        if (Network.isServer)
        {
            // Set everyone to "not ready" so we can wait again after the recording stage
            foreach (Player player in mNetworkManager.players)
            {
                player.networkView.RPC("SetReady", RPCMode.All, false);
            }
        }

        mDialogueManager.EndDialogue();


        // First, instatiate all of the backdrops
        foreach (PurchasedBackdrop purchasedBackdrop in uPurchasedBackdrops)
        {
            GameObject g = (GameObject)Instantiate(mBackdropPrefab, Vector3.zero, Quaternion.identity);
            g.transform.parent = mScreen.transform;

            dfTextureSprite sprite = (dfTextureSprite)g.GetComponent(typeof(dfTextureSprite));
            sprite.Position = new Vector2(0, 550);
            sprite.Texture  = (Texture2D)Resources.Load("Props/" + purchasedBackdrop.uProp.uID);

            RecordingProp r = (RecordingProp)g.GetComponent(typeof(RecordingProp));
            r.uPurchasedProp = purchasedBackdrop;

            mBackdropMap.Add(purchasedBackdrop, g.GetComponent <AfternoonBackdrop>());
        }


        uRecording = false;
        Action finishedPreparing =
            () => {
            StartRecording();
        };

        mCountdown.StartCountdown(Game.PREPARING_COUNTDOWN, finishedPreparing);
    }
Exemple #9
0
    void StartFeedback()
    {
        // Start the countdown
        Action countdownFinished =
            () => {
            mDialogueManager.WaitForReady();
        };

        mCountdown.StartCountdown(Game.FEEDBACK_COUNTDOWN, countdownFinished);

        // Start the playback
        mViewerChart.StartViewer(mRecordingPlayer);
        mRecordingPlayer.Play(mNetworkManager.myPlayer, mScreen, true);
    }
    /**
     * Move to prop selection proper
     */
    [RPC] void StartPropSelection()
    {
        mDialogueManager.EndDialogue();
        state = 1;

        Action countdownFinished =
            () => {
            if (Network.isServer)
            {
                // Only one person should push us to the next scene, so let it be the server
                EndPropSelection();
            }
        };

        mCountdown.StartCountdown(Game.PROP_SELECTION_COUNTDOWN, countdownFinished);
    }
Exemple #11
0
    public void HidePanel(bool hideTimer)
    {
        this.GetComponent <CanvasGroup>().alpha          = 0;
        this.GetComponent <CanvasGroup>().interactable   = false;
        this.GetComponent <CanvasGroup>().blocksRaycasts = false;

        if (CountdownTimer != null && hideTimer == false)
        {
            StartCoroutine(CountdownTimer.StartCountdown(PauseButton));
        }
        else
        {
            //Time.timeScale = 1;
            PauseButton.interactable = true;
        }
    }
Exemple #12
0
        private new void Start()
        {
            base.Start();
            SpawnPlayersCharacters(new[]
            {
                new Vector2(-7f, 0.75f),
                new Vector2(-7f, -0.75f),
                new Vector2(-7f, -3.75f),
                new Vector2(-7f, -2.25f)
            }
                                   );

            _lightAnimator = light.GetComponent <Animator>();
            Countdown countdownInstance = countdown.GetComponent <Countdown>();

            countdownInstance.StartCountdown().Subscribe((c) =>
            {
                instruction.SetActive(false);
                _audioSource.Play();
                _roundStarted = true;
                light.SetActive(true);
            });
        }
    private new void Start()
    {
        base.Start();
        SpawnPlayersCharacters(new[]
        {
            new Vector2(-3, -4),
            new Vector2(-4f, -4),
            new Vector2(-5f, -4),
            new Vector2(-6f, -4)
        }
                               );
        WatchForCollisions();



        Physics2D.gravity = Vector2.zero;
        Countdown countdownInstance = countdown.GetComponent <Countdown>();

        countdownInstance.StartCountdown().Subscribe((c) =>
        {
            instruction.SetActive(false);
            _audioSource.Play();
            Physics2D.gravity = new Vector2(0, -6f);
            _roundStarted     = true;
            foreach (var player in players)
            {
                //player.isDead = false;
                player.characterController.CanMove   = true;
                player.characterController.CanJump   = true;
                player.characterController.CanCrouch = true;
            }
            //platform.GetComponent<platform>().platforms_moving = true;
            platformsSpot.GetComponent <platformsSpot>().platforms_start = true;
            //platform.GetComponent<platform>().speed = 4f;
        });
    }
        private new void Start()
        {
            base.Start();
            SpawnPlayersCharacters(new[]
            {
                new Vector2(-6f, 0),
                new Vector2(-5f, 0),
                new Vector2(-4f, 0),
                new Vector2(-3f, 0)
            }
                                   );
            WatchForCollisions();

            Physics2D.gravity = Vector2.zero;
            Countdown countdownInstance = countdown.GetComponent <Countdown>();

            countdownInstance.StartCountdown().Subscribe((c) =>
            {
                instruction.SetActive(false);
                _audioSource.Play();
                Physics2D.gravity = new Vector2(0, -9.8f);
                _roundStarted     = true;
            });
        }
Exemple #15
0
 void Start()
 {
     packetLaunchers = FindObjectsOfType <PacketLauncher>();
     countdown       = FindObjectOfType <Countdown>();
     countdown.StartCountdown();
 }
Exemple #16
0
 public void StartCountdown()
 {
     countdown.StartCountdown();
 }
Exemple #17
0
 void StartCountdown()
 {
     CountdownUI.StartCountdown(3, 0.65f, "GO!");
 }
Exemple #18
0
 void Start()
 {
     Time.timeScale = 0;
     _countdown.StartCountdown();
 }