Esempio n. 1
0
        protected override void load(int version, string agentType, List <property_t> properties)
        {
            if (this.m_loadAttachment)
            {
                Effector.EffectorConfig effectorConfig = new Effector.EffectorConfig();

                if (effectorConfig.load(properties))
                {
                    this.m_effectors.Add(effectorConfig);
                }

                return;
            }

            base.load(version, agentType, properties);

            for (int i = 0; i < properties.Count; ++i)
            {
                property_t p = properties[i];

                if (p.name == "TargetFSMNodeId")
                {
                    this.m_targetId = Convert.ToInt32(p.value);
                }
                else
                {
                    //Debug.Check(0, "unrecognised property %s", p.name);
                }
            }
        }
Esempio n. 2
0
        protected override void load(int version, string agentType, List<property_t> properties)
        {
            if (this.m_loadAttachment)
            {
                Effector.EffectorConfig effectorConfig = new Effector.EffectorConfig();

                if (effectorConfig.load(properties))
                {
                    this.m_effectors.Add(effectorConfig);
                }

                return;
            }

            base.load(version, agentType, properties);

            foreach(property_t p in properties)
            {
                if (p.name == "TargetFSMNodeId")
                {
                    this.m_targetId = Convert.ToInt32(p.value);
                }
                else
                {
                    //Debug.Check(0, "unrecognised property %s", p.name);
                }
            }
        }
Esempio n. 3
0
        public override void ApplyEffects(Agent pAgent, Effector.EPhase phase)
        {
            for (int i = 0; i < this.m_effectors.Count; ++i)
            {
                Effector.EffectorConfig effector = this.m_effectors[i];

                effector.Execute(pAgent);
            }
        }