Esempio n. 1
0
        //
        //  InkJet
        //

        public InkJet(string classificationName, BaseChassis chassis, GetModelInstance getModelInstance, StaticActor staticActor)
            : base(classificationName, classificationName, chassis, getModelInstance, getModelInstance, staticActor)
        {
            //
            emitter        = new InkEmitter(InGame.inGame.ParticleSystemManager);
            emitter.Active = true;
            emitter.AddToManager();

            AddEmitter(emitter, Vector3.Zero);

            ClassColor = Base.Classification.Colors.Black;
        }   // end of InkJet c'tor
Esempio n. 2
0
        public SharedIdle(
            string classificationName,
            BaseChassis chassis,
            GetModelInstance getModelInstance,
            StaticActor staticActor)
            : base(classificationName, classificationName, chassis, getModelInstance, getModelInstance, staticActor)
        {
            if (XmlActorParams.SharedIdleData != null)
            {
                sharedAnim = new SharedAnimation(XmlActorParams.SharedIdleData.ActiveAnimationName);
            }
            else
            {
                sharedAnim = new SharedAnimation("");
            }

            fbxSRO = getModelInstance() as FBXModel;
            Debug.Assert(fbxSRO != null, "Wrong model type?");
        }
Esempio n. 3
0
 public TerraCannon(string classificationName, BaseChassis chassis, GetModelInstance getModelInstance, StaticActor staticActor)
     : base(classificationName, classificationName, chassis, getModelInstance, getModelInstance, staticActor)
 {
 }
Esempio n. 4
0
 public FloatBot(string classificationName, BaseChassis chassis, GetModelInstance getModelInstance, StaticActor staticActor)
     : base(classificationName, classificationName, chassis, getModelInstance, getModelInstance, staticActor)
 {
 }
 public RoverGreeter(string classificationName, BaseChassis chassis, GetModelInstance getModelInstance, StaticActor staticActor)
     : base(classificationName, chassis, getModelInstance, staticActor)
 {
 }
        public PipeChassis.PipeTypeEnum?PipeType; // Pipe


        /// <summary>
        /// Assigns each applicable member of the given chassis
        /// the value of the respective member in this instance
        /// provided the latter member has been initialized.
        /// </summary>
        /// <param name="chassis">
        /// Should be the same type as this instances' Type
        /// member. Otherwise, chassis specific settings (such as
        /// the PuckChassis' Radius member) will not be set.
        /// </param>
        public void CopyTo(BaseChassis chassis)
        {
            if (Gravity != null)
            {
                chassis.Gravity = Gravity.Value;
            }
            if (MaxSpeed != null)
            {
                chassis.MaxSpeed = MaxSpeed.Value;
            }
            if (MaxLinearAcceleration != null)
            {
                chassis.MaxLinearAcceleration = MaxLinearAcceleration.Value;
            }
            if (MaxLinearDeceleration != null)
            {
                chassis.MaxLinearDeceleration = MaxLinearDeceleration.Value;
            }
            if (MaxRotationRate != null)
            {
                chassis.MaxRotationRate = MaxRotationRate.Value;
            }
            if (MaxRotationalAcceleration != null)
            {
                chassis.MaxRotationalAcceleration = MaxRotationalAcceleration.Value;
            }
            if (DefaultJumpStrength != null)
            {
                chassis.DefaultJumpStrength = DefaultJumpStrength.Value;
            }
            if (PreJumpDelay != null)
            {
                chassis.PreJumpDelay = PreJumpDelay.Value;
            }
            if (PreLandDelay != null)
            {
                chassis.PreLandDelay = PreLandDelay.Value;
            }
            if (JumpRate != null)
            {
                chassis.JumpRate = JumpRate.Value;
            }
            if (HasFacingDirection != null)
            {
                chassis.HasFacingDirection = HasFacingDirection.Value;
            }
            if (IgnoreGlassWalls != null)
            {
                chassis.IgnoreGlassWalls = IgnoreGlassWalls.Value;
            }
            if (Density != null)
            {
                chassis.Density = Density.Value;
            }

            switch (Type)
            {
            case ChassisType.Boat:
                var boatChassis = chassis as BoatChassis;
                if (boatChassis == null)
                {
                    break;
                }
                if (HullDraft != null)
                {
                    boatChassis.HullDraft = HullDraft.Value;
                }
                break;

            case ChassisType.DynamicProp:
                var dynamicPropChassis = chassis as DynamicPropChassis;
                if (dynamicPropChassis == null)
                {
                    break;
                }
                if (SpinRate != null)
                {
                    dynamicPropChassis.SpinRate = SpinRate.Value;
                }
                if (TumbleRadius != null)
                {
                    dynamicPropChassis.TumbleRadius = TumbleRadius.Value;
                }
                if (Tumbles != null)
                {
                    dynamicPropChassis.Tumbles = Tumbles.Value;
                }
                break;

            case ChassisType.FloatInAir:
                var floatInAirChassis = chassis as FloatInAirChassis;
                if (floatInAirChassis == null)
                {
                    break;
                }
                if (MaxVerticalAcceleration != null)
                {
                    floatInAirChassis.MaxVerticalAcceleration = MaxVerticalAcceleration.Value;
                }
                if (MaxVerticalSpeed != null)
                {
                    floatInAirChassis.MaxVerticalSpeed = MaxVerticalSpeed.Value;
                }
                if (MaxAltitude != null)
                {
                    floatInAirChassis.MaxAltitude = MaxAltitude.Value;
                }
                break;

            case ChassisType.Hover:
                var hoverChassis = chassis as HoverChassis;
                if (hoverChassis == null)
                {
                    break;
                }
                if (SlopeAttenuation != null)
                {
                    hoverChassis.SlopeAttenuation = SlopeAttenuation.Value;
                }
                break;

            case ChassisType.HoverSwim:
                var hoverSwimChassis = chassis as HoverSwimChassis;
                if (hoverSwimChassis == null)
                {
                    break;
                }
                break;

            case ChassisType.Puck:
                var puckChassis = chassis as PuckChassis;
                if (puckChassis == null)
                {
                    break;
                }
                if (SlopeThreshold != null)
                {
                    puckChassis.SlopeThreshold = SlopeThreshold.Value;
                }
                if (Radius != null)
                {
                    puckChassis.Radius = Radius.Value;
                }
                if (RotationRate != null)
                {
                    puckChassis.RotationRate = RotationRate.Value;
                }
                break;

            case ChassisType.Saucer:
                var saucerChassis = chassis as SaucerChassis;
                if (saucerChassis == null)
                {
                    break;
                }
                if (RotationRate != null)
                {
                    saucerChassis.RotationRate = RotationRate.Value;
                }
                if (SlopeThreshold != null)
                {
                    saucerChassis.SlopeThreshold = SlopeThreshold.Value;
                }
                break;

            case ChassisType.Swim:
                var swimChassis = chassis as SwimChassis;
                if (swimChassis == null)
                {
                    break;
                }
                if (HullDraft != null)
                {
                    swimChassis.HullDraft = HullDraft.Value;
                }
                if (MinDepth != null)
                {
                    swimChassis.MinDepth = MinDepth.Value;
                }
                if (MaxPitch != null)
                {
                    swimChassis.MaxPitch = MaxPitch.Value;
                }
                if (FlexAmplitude != null)
                {
                    swimChassis.FlexAmplitude = FlexAmplitude.Value;
                }
                break;

            case ChassisType.Pipe:
                var pipeChassis = chassis as PipeChassis;
                if (PipeType != null)
                {
                    pipeChassis.PipeType = PipeType.Value;
                }
                break;
            }
        }
Esempio n. 7
0
 public CruiseMissile(string classificationName, BaseChassis chassis, GetModelInstance getModelInstance, StaticActor staticActor)
     : base(classificationName, classificationName, chassis, getModelInstance, getModelInstance, staticActor)
 {
 }
Esempio n. 8
0
 public SwimFish(string classificationName, BaseChassis chassis, GetModelInstance getModelInstance, StaticActor staticActor)
     : base(classificationName, classificationName, chassis, getModelInstance, getModelInstance, staticActor)
 {
     preRender += SetFlex;
 }
Esempio n. 9
0
        //
        //  Light
        //

        public Light(string classificationName, BaseChassis chassis, GetModelInstance getModelInstance, StaticActor staticActor)
            : base(classificationName, classificationName, chassis, getModelInstance, getModelInstance, staticActor)
        {
        }   // end of Light c'tor
Esempio n. 10
0
        //
        //  Fan
        //

        public Fan(string classificationName, BaseChassis chassis, GetModelInstance getModelInstance, StaticActor staticActor)
            : base(classificationName, classificationName, chassis, getModelInstance, getModelInstance, staticActor)
        {
            CreateEmitter();
        }   // end of Fan c'tor