Ejemplo n.º 1
0
 public void BeginTimer()
 {
     AnnounceDeathMatch();
     m_ScoreTable = new Hashtable();
     m_MatchTimer = new MatchTimer(this, m_MatchMin);
     m_MatchTimer.Start();
 }
Ejemplo n.º 2
0
        public IMatchTimer GetTimer(int interval)
        {
            var matchTimer = new MatchTimer(this, interval);

            _timers.Add(matchTimer);
            return(matchTimer);
        }
Ejemplo n.º 3
0
 // Use this for initialization
 void Start()
 {
     matchInfo = GetComponent <MatchInfo>();
     timer     = GetComponent <MatchTimer>();
     settings  = GetComponent <MatchSettings>();
     GUIUtils.ScaleFonts(skin, GUIUtils.conversionRatio.y);
 }
Ejemplo n.º 4
0
 private void Awake()
 {
     if (instance == null)
     {
         instance = this;
         //DontDestroyOnLoad(gameObject);
     }
 }
Ejemplo n.º 5
0
 private void Awake()
 {
     matchTimer    = GameObject.FindGameObjectWithTag("MatchTimer").GetComponent <MatchTimer>();
     emissionBar   = GameObject.FindGameObjectWithTag("EmissionsBar").GetComponent <ProgressBar>();
     populationBar = GameObject.FindGameObjectWithTag("PopulationBar").GetComponent <ProgressBar>();
     ppv           = GameObject.FindGameObjectWithTag("PostProcessGlobal").GetComponent <PostProcessVolume>();
     colorGrade    = ppv.profile.GetSetting <ColorGrading>();
     saveGame      = GetComponent <SaveGame>();
 }
Ejemplo n.º 6
0
 public AnnouncerTimer(MatchTimer timer, Teams team1, Teams team2)
     : base(TimeSpan.FromSeconds(1.0), TimeSpan.FromSeconds(1.0))
 {
     Priority  = TimerPriority.OneSecond;
     t         = timer;
     Team1     = team1;
     Team2     = team2;
     countdown = 6;
 }
Ejemplo n.º 7
0
        public void Progress()
        {
            switch (m_Tournament.Type)
            {
                #region RoundRobin Progression
            case TournamentType.RoundRobin:
            {
                break;
            }
                #endregion

                #region Single Elimination Progression
            case TournamentType.SingleElimination:
            {
                if (m_Matches.Count != 0)
                {
                    if (m_CurrentMatch < m_Matches.Count)
                    {
                        Console.WriteLine("Getting a Match");
                        if (HaveUnoccupiedArena())
                        {
                            MatchTimer bout = new MatchTimer(this, m_NextArena, m_Matches[m_CurrentMatch]);
                            m_CurrentMatch += 1;
                        }
                    }
                    else if (AllArenasUnoccupied() && m_CurrentMatch >= m_Matches.Count && m_CurrentRound < (m_Bracket.TotalRounds - 1))
                    {
                        m_CurrentRound += 1;
                        m_CurrentMatch  = 0;
                        m_Matches       = m_Bracket.SEGetRound(m_CurrentRound);
                        RoundDelayTimer delay = new RoundDelayTimer(this, m_DelayStart);
                        delay.Start();
                    }
                    else if (m_CurrentRound >= (m_Bracket.TotalRounds - 1))
                    {
                        m_Bracket.SEGetWinners(m_Tournament);
                    }
                }
                break;
            }
                #endregion

                #region Double Elimnination Progression
            case TournamentType.DoubleElimination:
            {
                break;
            }
                #endregion

            case TournamentType.Hybrid:
            {
                // TODO: Hybrid Logic
                break;
            }
            }
        }
Ejemplo n.º 8
0
    void Start()
    {
        GameObject gameController = GameObject.FindGameObjectWithTag("GameController");

        puck           = gameController.GetComponent <PuckHolder> ().GetPuck();
        p1Controller   = player1.gameObject.GetComponent <PlayerController> ();
        p2Controller   = player2.gameObject.GetComponent <PlayerController> ();
        distanceVector = new Vector2(distanceToCenter, 0);
        matchTimer     = GetComponent <MatchTimer> ();
    }
Ejemplo n.º 9
0
 /// <summary>
 /// sets the match timer to update every 60 seconds
 /// </summary>
 private void LoadMatchTimer()
 {
     if (MatchTimer.IsEnabled)
     {
         MatchTimer.Stop();
     }
     MatchTimer          = new DispatcherTimer();
     MatchTimer.Interval = TimeSpan.FromSeconds(60);
     MatchTimer.Tick    += MatchTimer_Tick;
     MatchTimer.Start();
 }
 private void Awake()
 {
     nukeAudio      = GameObject.FindObjectOfType <NukeAudio>();
     clickerAudio   = GetComponent <ClickerAudio>();
     bombCounter    = 0;
     resourceKeeper = GameObject.FindGameObjectWithTag("ResourceKeeper").GetComponent <ResourceKeeper>();
     viewportCamera = GetComponent <Camera>();
     cameraHolder   = GameObject.FindGameObjectWithTag("CameraHolder").GetComponent <CameraHolder>();
     matchTimer     = GameObject.FindGameObjectWithTag("MatchTimer").GetComponent <MatchTimer>();
     inspectMenu    = GameObject.FindGameObjectWithTag("InspectMenu").GetComponent <InspectMenu>();
     buyTileMenu    = GameObject.FindGameObjectWithTag("BuyTileMenu").GetComponent <BuyTileMenu>();
 }
    private void Awake()
    {
        matchTimer      = GameObject.FindGameObjectWithTag("MatchTimer").GetComponent <MatchTimer>();
        money           = GameObject.FindGameObjectWithTag("Money").GetComponent <TextMeshProUGUI>();
        emission        = GameObject.FindGameObjectWithTag("Emission").GetComponent <TextMeshProUGUI>();
        population      = GameObject.FindGameObjectWithTag("Population").GetComponent <TextMeshProUGUI>();
        wood            = GameObject.FindGameObjectWithTag("Wood").GetComponent <TextMeshProUGUI>();
        upgradeMaterial = GameObject.FindGameObjectWithTag("UpgradeMaterial").GetComponent <TextMeshProUGUI>();

        woodPerMonth  = GameObject.FindGameObjectWithTag("WoodPerMonth").GetComponent <TextMeshProUGUI>();
        moneyPerMonth = GameObject.FindGameObjectWithTag("MoneyPerMonth").GetComponent <TextMeshProUGUI>();
    }
Ejemplo n.º 12
0
        public ServerGameController()
        {
            int matchTime = random.Next(60, 120) * 1000;

            matchTimer = new MatchTimer(matchTime);

            matchStanding = new OverallMatchStanding {
                TimeElapsed = new MatchTime {
                    Time = matchTime
                }
            };
            matchTimer.TimeElapsed += MatchTimer_Elapsed;

            // The size of the Pith is fixed
            pitch = new Pitch {
                Width = 500, Height = 500
            };

            homeTeamData = new TeamData();
            awayTeamData = new TeamData();
            var dataController = new TeamDataController(homeTeamData, awayTeamData);

            dataController.TeamsAreReady += DataController_TeamsAreReady;
        }
Ejemplo n.º 13
0
 public void SetTimer(MatchTimer timer)
 {
     _colorSteps     = GetSteps(timer.Time);
     _timeText.color = _timerColors.Last();
     _timer          = timer;
 }
Ejemplo n.º 14
0
 private void Awake()
 {
     matchTimer = GameObject.FindGameObjectWithTag("MatchTimer").GetComponent <MatchTimer>();
     rend       = GetComponent <Renderer>();
     upgrades   = GetComponentsInChildren <Upgrade>();
 }
 private void Awake()
 {
     text       = GetComponent <TextMeshProUGUI>();
     matchTimer = GameObject.FindGameObjectWithTag("MatchTimer").GetComponent <MatchTimer>();
 }
Ejemplo n.º 16
0
 public void BeginTimer()
 {
     m_MatchTimer = new MatchTimer(this, m_MatchMin);
     m_MatchTimer.Start();
 }
Ejemplo n.º 17
0
 public AnnouncerTimer(MatchTimer timer, Teams team1, Teams team2)
     : base(TimeSpan.FromSeconds(1.0), TimeSpan.FromSeconds(1.0))
 {
     Priority = TimerPriority.OneSecond;
     t = timer;
     Team1 = team1;
     Team2 = team2;
     countdown = 6;
 }
Ejemplo n.º 18
0
        public void Progress()
        {
            switch (m_Tournament.Type)
            {
                #region RoundRobin Progression
                case TournamentType.RoundRobin:
                {
                    break;
                }
                #endregion

                #region Single Elimination Progression
                case TournamentType.SingleElimination:
                {
                    if (m_Matches.Count != 0)
                    {
                        if (m_CurrentMatch < m_Matches.Count)
                        {
                            Console.WriteLine("Getting a Match");
                            if (HaveUnoccupiedArena())
                            {
                                MatchTimer bout = new MatchTimer(this, m_NextArena, m_Matches[m_CurrentMatch]);
                                m_CurrentMatch += 1;
                            }
                        }
                        else if (AllArenasUnoccupied() && m_CurrentMatch >= m_Matches.Count && m_CurrentRound < (m_Bracket.TotalRounds-1))
                        {
                            m_CurrentRound += 1;
                            m_CurrentMatch = 0;
                            m_Matches = m_Bracket.SEGetRound(m_CurrentRound);
                            RoundDelayTimer delay = new RoundDelayTimer(this, m_DelayStart);
                            delay.Start();
                        }
                        else if (m_CurrentRound >= (m_Bracket.TotalRounds - 1))
                        {
                            m_Bracket.SEGetWinners(m_Tournament);
                        }
                    }
                    break;
                }
                #endregion

                #region Double Elimnination Progression
                case TournamentType.DoubleElimination:
                {
                    break;
                }
                #endregion

                case TournamentType.Hybrid:
                {
                    // TODO: Hybrid Logic
                    break;
                }
            }
        }
Ejemplo n.º 19
0
 private void DisposeTimer(MatchTimer timer)
 {
     _timers.Remove(timer);
 }
Ejemplo n.º 20
0
 public void BeginTimer()
 {
     m_MatchTimer = new MatchTimer(this, m_MatchMin);
     m_MatchTimer.Start();
 }
Ejemplo n.º 21
0
 private void Awake()
 {
     image      = GetComponent <Image>();
     matchTimer = GameObject.FindGameObjectWithTag("MatchTimer").GetComponent <MatchTimer>();
 }