Inheritance: EntityExtendedProperties
Exemple #1
0
        public void ActivateWayMovement()
        {
            MapCurve way = null;

            {
                TankGameExtendedProperties extendedProperties =
                    ControlledObject.ExtendedProperties as TankGameExtendedProperties;
                if (extendedProperties != null)
                {
                    way = extendedProperties.Way;
                }
            }

            if (way != null)
            {
                DoGeneralTask(GeneralTaskTypes.WayMove, way);
            }
        }
Exemple #2
0
        /// <summary>Overridden from <see cref="Engine.EntitySystem.Entity.OnPostCreate(Boolean)"/>.</summary>
        protected override void OnPostCreate(bool loaded)
        {
            base.OnPostCreate(loaded);
            AddTimer();

            //get activationRegion
            TankGameExtendedProperties extendedProperties =
                ControlledObject.ExtendedProperties as TankGameExtendedProperties;

            if (extendedProperties != null)
            {
                activationRegion = extendedProperties.ActivationRegion;
            }

            //listen activationRegion
            if (activationRegion != null)
            {
                activationRegion.ObjectIn += ActivationRegion_ObjectIn;
            }
        }