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); } }
/// <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; } }