Example #1
0
        protected int GetInt(MHParameter parm, MHEngine engine)
        {
            MHUnion un = new MHUnion();

            un.GetValueFrom(parm, engine);
            un.CheckType(MHUnion.U_Int);
            return(un.Int);
        }
Example #2
0
        protected void GetString(MHParameter parm, MHOctetString str, MHEngine engine)
        {
            MHUnion un = new MHUnion();

            un.GetValueFrom(parm, engine);
            un.CheckType(MHUnion.U_String);
            str.Copy(un.String);
        }
Example #3
0
        public override void Perform(MHEngine engine)
        {
            MHObjectRef target = new MHObjectRef();

            m_Target.GetValue(target, engine); // Get the target
            MHUnion newValue = new MHUnion();

            newValue.GetValueFrom(m_NewValue, engine);            // Get the actual value to set.
            engine.FindObject(target).SetVariableValue(newValue); // Set the value.
        }
Example #4
0
        public override void Perform(MHEngine engine)
        {
            MHObjectRef target = new MHObjectRef();

            m_Target.GetValue(target, engine); // Get the target
            MHUnion testValue = new MHUnion();

            testValue.GetValueFrom(m_Comparison, engine);                           // Get the actual value to compare.
            engine.FindObject(target).TestVariable(m_nOperator, testValue, engine); // Do the test.
        }
Example #5
0
        public override void Perform(MHEngine engine)
        {
            // The target is always the current scene so we ignore it here.
            MHObjectRef target = new MHObjectRef();
            MHObjectRef source = new MHObjectRef();

            m_Target.GetValue(target, engine); // TODO: Check this is the scene?
            m_EventSource.GetValue(source, engine);
            // Generate the event.
            if (m_EventData.Type == MHParameter.P_Null)
            {
                engine.EventTriggered(engine.FindObject(source), m_EventType);
            }
            else
            {
                MHUnion data = new MHUnion();
                data.GetValueFrom(m_EventData, engine);
                engine.EventTriggered(engine.FindObject(source), m_EventType, data);
            }
        }