Exemplo n.º 1
0
 private void ResetTimer(SphereOwner owner)
 {
     timer = sphereStats.SecondPerPointgain;
     if (owner == SphereOwner.opponent)
     {
         AITimer = Random.Range(AIMoveMinSeconds, AIMoveMaxSeconds);
     }
     sphereStats.PowerUpUI.sphereClock.fillAmount = 0;
 }
Exemplo n.º 2
0
 public void SetOrigin(GameSphere sphereOrigin)
 {
     this.origin  = sphereOrigin.gameObject;
     originSphere = sphereOrigin;
     originOwner  = originSphere.sphereStats.SphereOwner;
     if (originOwner == SphereOwner.opponent)
     {
         trail.colorGradient = SphereManager.Instance.gameData.player2Points;
     }
     else
     {
         trail.colorGradient = SphereManager.Instance.gameData.player1Points;
     }
 }
Exemplo n.º 3
0
    public void CheckWinner(SphereOwner owner)
    {
        bool won = true;

        // check if opponent has any spheres left
        won = !SphereManager.Instance.spheres.Any(item => item.sphereStats.SphereOwner == SphereOwner.opponent);
        if (firstWinCheck)
        {
            firstWinCheck = false;
            won           = false;
        }
        if (won)
        {
            SphereManager.Instance.GameWon();
        }
    }
Exemplo n.º 4
0
    public void ChangeColor(SphereOwner owner)
    {
        Color tempColor = SphereManager.sphereColors[owner];

        mat.color = tempColor;
    }