Exemple #1
0
    public override List <AudioClip> GetAudioClips(ActualLeader leader)
    {
        switch (leader)
        {
        case ActualLeader.Red:
            return(_redWinnerList);

        case ActualLeader.Blue:
            return(_blueWinnerList);

        default:
            string error = string.Format($"Error from {0}: The Winner doesn't exist.", this.name);
            throw new System.IndexOutOfRangeException(error);
        }
    }
Exemple #2
0
    public override int GetTact(ActualLeader leader)
    {
        switch (leader)
        {
        case ActualLeader.Red:
            return(_redTact);

        case ActualLeader.Blue:
            return(_blueTact);

        default:
            string error = string.Format($"Error from {0}: The Winner doesn't exist. The ActualLeader don't have to be {1}.", this.name, nameof(leader));
            throw new System.IndexOutOfRangeException(error);
        }
    }
    public override List <AudioClip> GetAudioClips(MusicState state, ActualLeader leader = ActualLeader.None)
    {
        switch (state)
        {
        case MusicState.I1:
            return(_i1);

        case MusicState.I2:
            return(_i2);

        case MusicState.I3:
            return(_i3);

        default:
            string error = string.Format($"Error from {0}: the List of AudioClip doesn't exist. The MusicState don't have to be {1}", this.name, nameof(state).ToString());
            throw new System.IndexOutOfRangeException(error);
        }
    }
Exemple #4
0
    public override List <AudioClip> GetAudioClips(MusicState state, ActualLeader leader)
    {
        List <AudioClip> clipList;

        switch (state)
        {
        case MusicState.I1:
            clipList = LeadDictionary.GetValueAudioClipList(LeadDictionary.I1Dict, leader);
            break;

        case MusicState.I2:
            clipList = LeadDictionary.GetValueAudioClipList(LeadDictionary.I2Dict, leader);
            break;

        case MusicState.I3:
            clipList = LeadDictionary.GetValueAudioClipList(LeadDictionary.I3Dict, leader);
            break;

        default:
            string error = string.Format($"Error from {0}: The MusicState doesn't exist. The MusicState don't have to be {1}.", this.name, nameof(state).ToString());
            throw new System.IndexOutOfRangeException(error);
        }
        return(clipList);
    }
Exemple #5
0
 public virtual List <AudioClip> GetAudioClips(ActualLeader leader) => null;
Exemple #6
0
 public virtual List <AudioClip> GetAudioClips(MusicState state, ActualLeader leader) => null;
Exemple #7
0
 public virtual int GetTact(ActualLeader leader) => 0;
 public List <T> GetValueAudioClipList(Dictionary <ActualLeader, List <T> > iDict, ActualLeader leader)
 {
     iDict.TryGetValue(leader, out List <T> clipList);
     return(clipList);
 }
 public List <AudioClip> ChooseAudioClip(ActualLeader leader) => _data.GetAudioClips(leader);
 public List <AudioClip> ChooseAudioClip(MusicState state = MusicState.None, ActualLeader leader = ActualLeader.None) => _data.GetAudioClips(state, leader);
 public int ChooseTact(ActualLeader leader) => _data.GetTact(leader);