예제 #1
0
        public static void UserFeedbackChain(ModSound sound, string message = "")
        {
            if (Controller.UseSounds)
            {
                SoundDef audio = null;

                switch (sound)
                {
                case ModSound.TaskCompleted:
                    audio = TaskCompleted;
                    break;

                case ModSound.TaskRejected:
                    audio = TaskRejected;
                    break;
                }

                audio.PlayOneShotOnCamera(null);
            }

            if (message != "")
            {
                Messages.Message(message, MessageTypeDefOf.SilentInput);
            }
        }
예제 #2
0
 public static int AddSound(string path, SoundType type = SoundType.Custom, ModSound modSound = null)
 {
     instance.AddSound(type, "Origins/" + path, modSound);
     return(SoundLoader.GetSoundSlot(type, "Origins/" + path));
 }