Ejemplo n.º 1
0
        private static void sheep_PlaySound(IntPtr context)
        {
            bool   isInWaitSection = SheepMachine.IsInWaitSection(context);
            string sound           = SheepMachine.PopStringOffStack(context);

            Sound.AudioEngine.SoundEffect s  = SceneManager.SceneContentManager.Load <Sound.AudioEngine.SoundEffect>(sound);
            Sound.PlayingSound            ps = Sound.SoundManager.PlaySound2DToChannel(s, Sound.SoundTrackChannel.SFX);
        }
Ejemplo n.º 2
0
        private static void sheep_SetTimerSeconds(IntPtr context)
        {
            float seconds = SheepMachine.PopFloatOffStack(context);

            if (SheepMachine.IsInWaitSection(context))
            {
                SheepMachine.AddWaitHandle(context, new Game.TimedWaitHandle((int)(seconds * 1000)));
            }
        }
Ejemplo n.º 3
0
        private static void sheep_ContinueDialogueNoFidgets(IntPtr context)
        {
            int numLines = SheepMachine.PopIntOffStack(context);

            bool       waiting = SheepMachine.IsInWaitSection(context);
            WaitHandle handle  = Game.DialogManager.ContinueDialogue(numLines, waiting);

            if (waiting && handle != null)
            {
                SheepMachine.AddWaitHandle(context, handle);
            }
        }
Ejemplo n.º 4
0
        private static void sheep_StartDialogueNoFidgets(IntPtr context)
        {
            int    numLines     = SheepMachine.PopIntOffStack(context);
            string licensePlate = SheepMachine.PopStringOffStack(context);

            bool       waiting = SheepMachine.IsInWaitSection(context);
            WaitHandle handle  = Game.DialogManager.PlayDialogue(licensePlate, numLines, false, waiting);

            if (waiting && handle != null)
            {
                SheepMachine.AddWaitHandle(context, handle);
            }
        }
Ejemplo n.º 5
0
        private static void sheep_StartMom(IntPtr context)
        {
            string mom = SheepMachine.PopStringOffStack(context);

            bool isInWaitSection = SheepMachine.IsInWaitSection(context);

            if (isInWaitSection)
            {
                WaitHandle wait = Game.DialogManager.PlayMom(mom, true);
                SheepMachine.AddWaitHandle(context, wait);
            }
            else
            {
                Game.DialogManager.PlayMom(mom, false);
            }
        }
Ejemplo n.º 6
0
        private static void sheep_StartVoiceOver(IntPtr context)
        {
            int    count = SheepMachine.PopIntOffStack(context);
            string id    = SheepMachine.PopStringOffStack(context);

            // TODO!
            Game.YakResource yak = SceneManager.SceneContentManager.Load <Game.YakResource>("E" + id);

            if (SheepMachine.IsInWaitSection(context))
            {
                WaitHandle wait = yak.PlayAndWait();
                SheepMachine.AddWaitHandle(context, wait);
            }
            else
            {
                yak.Play();
            }

            Logger.WriteDebug("Called StartVoiceOver({0}, {1})", id, count);
        }
Ejemplo n.º 7
0
        private static void sheep_StartAnimation(IntPtr context)
        {
            string animation = SheepMachine.PopStringOffStack(context);

            if (animation.EndsWith(".ANM", StringComparison.OrdinalIgnoreCase) == false)
            {
                animation += ".ANM";
            }

            Game.MomResource anm = SceneManager.SceneContentManager.Load <Game.MomResource>(animation);

            if (SheepMachine.IsInWaitSection(context))
            {
                WaitHandle wait = Game.Animator.Add(anm, true);
                SheepMachine.AddWaitHandle(context, wait);
            }
            else
            {
                Game.Animator.Add(anm, false);
            }
        }