Exemple #1
0
        protected ControlableWave(ControlableWave copy)
            : base(copy)
        {
            this.Killed       = Functions.Clone <EventHandler>(copy.Killed);
            this.shipState    = new ShipState(copy.shipState);
            this.movementInfo = new ShipMovementInfo(copy.movementInfo);
            foreach (IControler controler in copy.controlers)
            {
                AddControler(null, (IControler)controler.Clone());
            }
            this.target         = copy.target;
            this.ControlHandler = Functions.Clone <IControlHandler>(copy.ControlHandler);

            this.currentControlInput              = copy.currentControlInput;
            this.direction                        = copy.direction;
            this.controlableType                  = copy.controlableType;
            this.controlableSounds                = copy.controlableSounds;
            this.attachedEffectCollection         = new EffectCollection(copy.attachedEffectCollection);
            this.contFlags                        = copy.contFlags;
            this.CollisionState.GenerateRayEvents = true;


            this.colors       = copy.colors;
            this.primaryColor = copy.primaryColor;
            if (copy.weaponInfo != null)
            {
                this.weaponInfo = (IWeaponsLogic)copy.weaponInfo.Clone();
            }
        }
Exemple #2
0
 public ControlableWave(
     LifeSpan lifeTime,
     float mass,
     PhysicsState physicsState,
     float initialRadius,
     float expansionRate,
     int[] colors,
     int primaryColor,
     ShipMovementInfo movementInfo,
     ShipState shipState,
     ControlableSounds controlableSounds,
     IWeaponsLogic weaponInfo)
     : this(
         lifeTime,
         mass,
         physicsState, initialRadius,
         expansionRate,
         colors,
         primaryColor,
         movementInfo,
         shipState, null, controlableSounds)
 {
     this.weaponInfo = weaponInfo;
     this.CollisionState.GenerateCollisionEvents = true;
     this.CollisionState.GenerateContactEvents   = true;
     this.controlableType = ControlableType.Weapon;
 }
Exemple #3
0
        public Controlable(
            LifeSpan lifeTime,
            MassInertia massInfo,
            PhysicsState physicsState,
            BodyFlags flags,
            ICollidableBodyPart[] collidableParts,
            ShipMovementInfo movementInfo,
            ShipState shipState,
            ControlableSounds controlableSounds,
            IWeaponsLogic weaponInfo)
            : this(
                lifeTime,
                massInfo,
                physicsState,
                flags, collidableParts,
                movementInfo,
                shipState,
                controlableSounds)
        {
            this.CollisionState.GenerateCollisionEvents = true;
            this.CollisionState.GenerateContactEvents   = true;
            this.weaponInfo = weaponInfo;

            this.controlableType = ControlableType.Weapon;
        }
Exemple #4
0
        public Controlable(
            LifeSpan lifeTime,
            PhysicsState physicsState,
            BodyFlags flags,
            RigidBodyTemplate template,
            ShipMovementInfo movementInfo,
            ShipState shipState,
            ControlableSounds controlableSounds,
            IWeaponsLogic weaponInfo)
            : this(
                lifeTime,
                physicsState,
                flags, template,
                movementInfo,
                shipState,
                controlableSounds)
        {
            this.weaponInfo = weaponInfo;

            this.CollisionState.GenerateCollisionEvents = true;
            this.CollisionState.GenerateContactEvents   = true;
            this.controlableType = ControlableType.Weapon;
        }