Beispiel #1
0
        public TwiCutlass(ThingBlock block, ThingDefinition def)
            : base(block, def)
        {
            // sounds
            soundMain = LKernel.GetG<SoundMain>();

            idleSound = SoundComponents[0].Sound;
            fullSound = SoundComponents[1].Sound;

            // convert from linear velocity to KPH
            topSpeedKmHour = DefaultMaxSpeed * 3.6f;
            LKernel.GetG<Root>().FrameStarted += FrameStarted;
        }
Beispiel #2
0
        public DashJavelin(ThingBlock block, ThingDefinition def)
            : base(block, def)
        {
            ModelComponent chassis = ModelComponents[0];
            // first get rid of the existing animation blender it creates automatically
            LKernel.GetG<AnimationManager>().Remove(chassis.AnimationBlender);
            chassis.AnimationBlender = null;

            Entity chassisEnt = chassis.Entity;
            // get our two animation states
            jetMax = chassisEnt.GetAnimationState("JetMax");
            jetMax.Enabled = true;
            jetMax.Weight = 0f;
            jetMin = chassisEnt.GetAnimationState("JetMin");
            jetMin.Enabled = true;
            jetMin.Weight = 1f;

            // we want the two animations to blend together, not add to each other
            chassisEnt.Skeleton.BlendMode = SkeletonAnimationBlendMode.ANIMBLEND_AVERAGE;

            jetRibbon = RibbonComponents[0].Ribbon;

            // sounds
            soundMain = LKernel.GetG<SoundMain>();

            idleSound = SoundComponents[0].Sound;
            fullSound = SoundComponents[1].Sound;
            revDownSound = soundMain.GetSource("RD_Kart_Rev_Down.ogg");
            revUpSound = soundMain.GetSource("RD_Kart_Rev_Up.ogg");

            // convert from linear velocity to KPH
            topSpeedKmHour = DefaultMaxSpeed * 3.6f;
            idleState = true;

            LKernel.GetG<Root>().FrameStarted += FrameStarted;
        }