Пример #1
0
        /// <summary>
        ///     Test the specified gameobject.
        /// </summary>
        public override bool TestGameObject(LogicGameObject gameObject)
        {
            LogicComponent component = gameObject.GetComponent(this._componentType);

            if (component != null && component.IsEnabled())
            {
                return(base.TestGameObject(gameObject));
            }

            return(false);
        }
Пример #2
0
        /// <summary>
        ///     Gets the specified component.
        /// </summary>
        public LogicComponent GetComponent(int componentType)
        {
            LogicComponent component = this._components[componentType];

            if (component != null && component.IsEnabled())
            {
                return(component);
            }

            return(null);
        }
        public virtual void FastForwardTime(int secs)
        {
            for (int i = 0; i < LogicComponent.COMPONENT_TYPE_COUNT; i++)
            {
                LogicComponent component = this.m_components[i];

                if (component != null && component.IsEnabled())
                {
                    component.FastForwardTime(secs);
                }
            }
        }
Пример #4
0
        /// <summary>
        ///     Creates a fast forward of time.
        /// </summary>
        public virtual void FastForwardTime(int secs)
        {
            for (int i = 0; i < this._components.Count; i++)
            {
                LogicComponent component = this._components[i];

                if (component != null)
                {
                    if (component.IsEnabled())
                    {
                        component.FastForwardTime(secs);
                    }
                }
            }
        }