Ejemplo n.º 1
0
    /// <summary>
    /// Makes a <see cref="Wave"/> when given a <see cref="WaveId"/>
    /// </summary>
    /// <param name="waveId">The Id of the <see cref="Wave"/></param>
    /// <returns>The generated <see cref="Wave"/></returns>
    protected Wave MakeWave(WaveId waveId)
    {
        this.nextWaveNumber++;

        switch (waveId)
        {
            case WaveId.StrongMuslimMen:
                return new Wave(waveId, .55f, 16, this.nextWaveNumber);

            case WaveId.FastMexicanMen:
                return new Wave(waveId, .45f, 12, this.nextWaveNumber);

            case WaveId.GroupChineseMen:
                return new Wave(waveId, .15f, 24, this.nextWaveNumber);

            case WaveId.AnchorMuslimWomen:
            case WaveId.AnchorMexicanWomen:
            case WaveId.AnchorChineseWomen:
                return new Wave(waveId, .55f, 12, this.nextWaveNumber);

            case WaveId.Hillary:
            case WaveId.Bernie:
            case WaveId.Obama:
                return new Wave(waveId, .0f, 1, this.nextWaveNumber);

            default:
                throw new NotImplementedException();
        }
    }
Ejemplo n.º 2
0
 public Wave(WaveId waveId, float spawnDelay, int numberOfEnemies, int waveNumber)
 {
     this.waveId = waveId;
     this.spawnDelay = spawnDelay;
     this.numberOfEnemies = numberOfEnemies;
     this.waveNumber = waveNumber;
 }
Ejemplo n.º 3
0
    public void PlayWaveSound(WaveId waveId)
    {
        switch (waveId)
        {
            case WaveId.FastMexicanMen:
            case WaveId.AnchorMexicanWomen:
                PlayTrump(waveMexican[mexicanIndex++ % waveMexican.Length], false);
                break;

            case WaveId.GroupChineseMen:
            case WaveId.AnchorChineseWomen:
                PlayTrump(waveChinese[chineseIndex++ % waveChinese.Length], false);
                break;

            case WaveId.StrongMuslimMen:
            case WaveId.AnchorMuslimWomen:
                PlayTrump(waveMuslim[muslimIndex++ % waveMuslim.Length], false);
                break;

            case WaveId.Hillary:
                PlayOther(hillary, false);
                break;

            case WaveId.Bernie:
                PlayOther(bernie, false);
                break;

            case WaveId.Obama:
                PlayOther(obama, false);
                break;
        }
    }
Ejemplo n.º 4
0
 /// <summary>
 /// Creates an empty snapshot.
 /// </summary>
 public EmptyWaveletSnapshot(WaveId waveId, WaveletId waveletId, ParticipantId creator, HashedVersion version, DateTime creationTime)
 {
     WaveId = waveId;
     WaveletId = waveletId;
     Creator = creator;
     HashedVersion = version;
     CreationTime = creationTime;
 }
Ejemplo n.º 5
0
 /// <summary>
 ///     Creates a new instance of the <see cref="WaveViewData" /> class.
 /// </summary>
 /// <param name="waveId">The wave id.</param>
 public WaveViewData(WaveId waveId)
 {
     _waveId = waveId;
     _wavelets = new Dictionary<WaveletId, IWaveletData>();
 }
Ejemplo n.º 6
0
 public string SerializeWaveId(WaveId waveId)
 {
     return waveId.Domain + PartSeparator + waveId.Id;
 }
Ejemplo n.º 7
0
 public string SerializeWaveId(WaveId waveId)
 {
     return new StringBuilder(waveId.Domain).Append(SEP).Append(waveId.Id).ToString();
 }