Ejemplo n.º 1
0
    private void AdvanceIndex(int index)
    {
        if (index != currentIndex)
        {
            return;
        }
        currentIndex += 1;

        if (currentIndex - 2 >= 0)
        {
            joinMe[currentIndex - 2].GetComponent <DotScript>().GlowMeUpScotty();
        }
        le_dottlers[currentIndex - 1].GetComponent <DotScript>().GlowMeUpISaid();

        FindObjectOfType <SoundManager>().Play("DotConnect");

        if (currentIndex >= le_dottlers.Count)
        {
            DoneGame?.Invoke(m_side, 50);
        }
        else
        {
            le_dottlers[currentIndex].GetComponent <DotScript>().GlowMeUpScotty();
        }
    }
Ejemplo n.º 2
0
    void SpawnNewBall(bool ScoredGoal = false)
    {
        if (ScoredGoal)
        {
            DoneGame?.Invoke(m_side, 50);
        }

        current_basketball = Instantiate(basketball_prefab, basketball_center, Quaternion.identity);
        current_basketball.transform.parent = gameObject.transform;
        current_basketball.GetComponent <BallScript>().BallDead += SpawnNewBall;
        ballReadyToShoot = true;
    }
Ejemplo n.º 3
0
    protected override void FixedUpdate()
    {
        base.FixedUpdate();
        if (m_paused)
        {
            return;
        }

        if (m_timer > 10)
        {
            DoneGame.Invoke(m_side, 50);
        }
    }
Ejemplo n.º 4
0
 private void TapMole(Mole tappedMole)
 {
     if (tappedMole.Tapped(m_currentMole))
     {
         FindObjectOfType <SoundManager>().Play("MoleHit");
         // Show the next moles we need to
         m_currentMole += 1;
         if (m_currentMole >= m_moles.Count)
         {
             DoneGame?.Invoke(m_side, HEALTH_REWARD);
         }
         else if (m_currentMole + m_molesToPreview - 1 < m_moles.Count)
         {
             m_moles[m_moleOrder[m_currentMole + m_molesToPreview - 1]].SetSpritePopped();
         }
     }
 }
Ejemplo n.º 5
0
    protected override void FixedUpdate()
    {
        base.FixedUpdate();

        if (m_paused)
        {
            return;
        }

        if (startTheClock)
        {
            timer += Time.fixedDeltaTime;
            if (timer > 0.6f)
            {
                DoneGame?.Invoke(m_side, 50);
                startTheClock = false;
            }
        }
    }