예제 #1
0
        public static WaveInfoUpdateEventArgs Create(int currentWave, int totalWave, float currentWaveProgress, object userData = null)
        {
            WaveInfoUpdateEventArgs waveInfoUpdateEventArgs = ReferencePool.Acquire <WaveInfoUpdateEventArgs>();

            waveInfoUpdateEventArgs.CurrentWave         = currentWave;
            waveInfoUpdateEventArgs.TotalWave           = totalWave;
            waveInfoUpdateEventArgs.CurrentWaveProgress = currentWaveProgress;
            return(waveInfoUpdateEventArgs);
        }
        private void OnWaveUpdate(object sender, GameEventArgs e)
        {
            WaveInfoUpdateEventArgs ne = (WaveInfoUpdateEventArgs)e;

            if (ne == null)
            {
                return;
            }

            SetWaveInfo(ne.CurrentWave, ne.TotalWave, ne.CurrentWaveProgress);
        }