Exemplo n.º 1
0
        public void PlayRandom(GameObject obj)
        {
            if (clips.Length == 0)
            {
                Debug.LogWarning($"RandomCLips {name} in {obj.name} has no clips");
                return;
            }

            AudioEntity ae = clips.Length == 1 ? clips[0] : Randomf.Element(clips);

            if (!ae.clip)
            {
                Debug.LogWarning($"Random AudioEntity in {obj.name} is missing a clip");
                return;
            }

            ae.Play(obj);
        }
Exemplo n.º 2
0
        public static Perk Random()
        {
            Type type = Randomf.Element(types);

            return((Perk)Activator.CreateInstance(type));
        }
Exemplo n.º 3
0
 protected override System.Type RandomArchetype()
 {
     System.Type[] array = EyeOrbiterType.types.Values.ToArray();
     return(Randomf.Element(array));
 }