コード例 #1
0
        private static void sheep_SetActorLocation(IntPtr vm)
        {
            string location = SheepMachine.PopStringOffStack(vm);
            string actor    = SheepMachine.PopStringOffStack(vm);

            Game.GameManager.SetStringGameVariable("_LOC_" + actor, location);
        }
コード例 #2
0
        private static void sheep_SetGameVariableInt(IntPtr vm)
        {
            int    value = SheepMachine.PopIntOffStack(vm);
            string name  = SheepMachine.PopStringOffStack(vm);

            Game.GameManager.SetIntegerGameVariable(name, value);
        }
コード例 #3
0
        private static void sheep_setIdleGas(IntPtr vm)
        {
            string gas   = SheepMachine.PopStringOffStack(vm);
            string actor = SheepMachine.PopStringOffStack(vm);

            Logger.WriteDebug("FIXME: SetIdleGas() sheep function not implemented");
        }
コード例 #4
0
        private static void sheep_WalkerBoundaryBlockRegion(IntPtr vm)
        {
            int index1 = SheepMachine.PopIntOffStack(vm);
            int index2 = SheepMachine.PopIntOffStack(vm);

            // TODO!
        }
コード例 #5
0
        private static void sheep_SetTalkGas(IntPtr vm)
        {
            string gas   = SheepMachine.PopStringOffStack(vm);
            string actor = SheepMachine.PopStringOffStack(vm);

            // TODO
        }
コード例 #6
0
        private static void sheep_WalkTo(IntPtr vm)
        {
            string position = SheepMachine.PopStringOffStack(vm);
            string actor    = SheepMachine.PopStringOffStack(vm);

            // TODO
        }
コード例 #7
0
        private static void sheep_InspectModelUsingAngle(IntPtr vm)
        {
            string angle = SheepMachine.PopStringOffStack(vm);
            string model = SheepMachine.PopStringOffStack(vm);

            SceneManager.SetCameraToCinematicCamera(angle);
        }
コード例 #8
0
        private static void sheep_DoesGraceHaveInvItem(IntPtr vm)
        {
            string item = SheepMachine.PopStringOffStack(vm);

            bool hasItem = Game.GameManager.IsInInventory(item, false);

            SheepMachine.PushIntOntoStack(vm, hasItem ? 1 : 0);
        }
コード例 #9
0
        private static void sheep_DoesModelExist(IntPtr vm)
        {
            string model = SheepMachine.PopStringOffStack(vm);

            // TODO!

            SheepMachine.PushIntOntoStack(vm, 0);
        }
コード例 #10
0
        private static void sheep_GetFlag(IntPtr vm)
        {
            string name = SheepMachine.PopStringOffStack(vm);

            int flag = Game.GameManager.GetFlag(name) ? 1 : 0;

            SheepMachine.PushIntOntoStack(vm, flag);
        }
コード例 #11
0
        private static void sheep_GetEgoLocationCount(IntPtr vm)
        {
            string location = SheepMachine.PopStringOffStack(vm);

            int count = Game.GameManager.GetEgoLocationCount(location);

            SheepMachine.PushIntOntoStack(vm, count);
        }
コード例 #12
0
        private static void sheep_WasEgoEverInLocation(IntPtr vm)
        {
            string location = SheepMachine.PopStringOffStack(vm);

            // TODO

            SheepMachine.PushIntOntoStack(vm, 0);
        }
コード例 #13
0
        private static void sheep_IsActiveInvItem(IntPtr vm)
        {
            string item = SheepMachine.PopStringOffStack(vm);

            // TODO

            SheepMachine.PushIntOntoStack(vm, 0);
        }
コード例 #14
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);
        }
コード例 #15
0
        private static void sheep_GetGameVariableInt(IntPtr vm)
        {
            string variable = SheepMachine.PopStringOffStack(vm);

            int value = Game.GameManager.GetIntegerGameVariable(variable);

            SheepMachine.PushIntOntoStack(vm, value);
        }
コード例 #16
0
        private static void sheep_SetNounVerbCount(IntPtr vm)
        {
            int    count = SheepMachine.PopIntOffStack(vm);
            string verb  = SheepMachine.PopStringOffStack(vm);
            string noun  = SheepMachine.PopStringOffStack(vm);

            Game.GameManager.SetNounVerbCount(noun, verb, count);
        }
コード例 #17
0
        private static void sheep_SetCameraAngleType(IntPtr vm)
        {
            string camera = SheepMachine.PopStringOffStack(vm);
            string type   = SheepMachine.PopStringOffStack(vm);

            // TODO!

            Logger.WriteDebug("FIXME: SetCameraAngleType() sheep function not implemented");
        }
コード例 #18
0
        private static void sheep_SetActorPosition(IntPtr vm)
        {
            string position = SheepMachine.PopStringOffStack(vm);
            string actor    = SheepMachine.PopStringOffStack(vm);

            SceneManager.SetActorPosition(actor, position);

            Logger.WriteDebug("Setting actor {0} position to {1}", actor, position);
        }
コード例 #19
0
        private static void sheep_IncNounVerbCount(IntPtr vm)
        {
            string verb = SheepMachine.PopStringOffStack(vm);
            string noun = SheepMachine.PopStringOffStack(vm);

            Game.Nouns n = Game.NounUtils.ConvertStringToNoun(noun);
            Game.Verbs v = Game.VerbsUtils.ConvertStringToVerbs(verb);
            Game.GameManager.IncrementNounVerbCount(n, v);
        }
コード例 #20
0
        private static void sheep_GetTopicCountInt(IntPtr vm)
        {
            int verb = SheepMachine.PopIntOffStack(vm);
            int noun = SheepMachine.PopIntOffStack(vm);

            int count = Game.GameManager.GetTopicCount((Game.Nouns)noun, (Game.Verbs)verb);

            SheepMachine.PushIntOntoStack(vm, count);
        }
コード例 #21
0
        private static void sheep_LookitSceneModel(IntPtr vm)
        {
            int    duration   = SheepMachine.PopIntOffStack(vm);
            string components = SheepMachine.PopStringOffStack(vm);
            string target     = SheepMachine.PopStringOffStack(vm);
            string actor      = SheepMachine.PopStringOffStack(vm);

            // TODO
        }
コード例 #22
0
        private static void sheep_GetChatCount(IntPtr vm)
        {
            string noun = SheepMachine.PopStringOffStack(vm);

            Game.Nouns n = Game.NounUtils.ConvertStringToNoun(noun);
            int        c = Game.GameManager.GetChatCount(n);

            SheepMachine.PushIntOntoStack(vm, c);
        }
コード例 #23
0
        private static void sheep_TurnHead(IntPtr vm)
        {
            int    duration = SheepMachine.PopIntOffStack(vm);
            int    percentY = SheepMachine.PopIntOffStack(vm);
            int    percentX = SheepMachine.PopIntOffStack(vm);
            string actor    = SheepMachine.PopStringOffStack(vm);

            // TODO
        }
コード例 #24
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)));
            }
        }
コード例 #25
0
        private static void sheep_GetRandomInt(IntPtr vm)
        {
            int upper = SheepMachine.PopIntOffStack(vm);
            int lower = SheepMachine.PopIntOffStack(vm);

            int num = Utils.PickRandomNumber(lower, upper);

            SheepMachine.PushIntOntoStack(vm, num);
        }
コード例 #26
0
        private static void sheep_GetTopicCount(IntPtr vm)
        {
            string verb = SheepMachine.PopStringOffStack(vm);
            string noun = SheepMachine.PopStringOffStack(vm);

            int count = Game.GameManager.GetTopicCount(noun, verb);

            SheepMachine.PushIntOntoStack(vm, count);
        }
コード例 #27
0
        private static void sheep_GetNounVerbCount(IntPtr vm)
        {
            string verb = SheepMachine.PopStringOffStack(vm);
            string noun = SheepMachine.PopStringOffStack(vm);

            Game.Verbs v     = Game.VerbsUtils.ConvertStringToVerbs(verb);
            int        count = Game.GameManager.GetNounVerbCount(noun, v);

            SheepMachine.PushIntOntoStack(vm, count);
        }
コード例 #28
0
        private static void sheep_SetGameTimer(IntPtr vm)
        {
            int    milliseconds = SheepMachine.PopIntOffStack(vm);
            string verb         = SheepMachine.PopStringOffStack(vm);
            string noun         = SheepMachine.PopStringOffStack(vm);

            Game.Nouns n = Game.NounUtils.ConvertStringToNoun(noun);
            Game.Verbs v = Game.VerbsUtils.ConvertStringToVerbs(verb);
            Game.GameManager.AddGameTimer(n, v, milliseconds);
        }
コード例 #29
0
        private static void sheep_IsActorNear(IntPtr vm)
        {
            float  distance = SheepMachine.PopFloatOffStack(vm);
            string position = SheepMachine.PopStringOffStack(vm);
            string actor    = SheepMachine.PopStringOffStack(vm);

            // TODO

            SheepMachine.PushIntOntoStack(vm, 0);
        }
コード例 #30
0
        private static void sheep_InitEgoPosition(IntPtr vm)
        {
            string position = SheepMachine.PopStringOffStack(vm);

            Logger.WriteDebug("Setting ego position to {0}", position);

            // TODO: put the current ego's model at the specified position
            SceneManager.SetEgoToSifPosition(position);

            // set the camera to the specified position
            SceneManager.SetCameraToSifPosition(position);
        }