示例#1
0
        public Projectile()
        {
            MainGraphic = new MetaModel
            {
                XMesh = new MeshConcretize
                {
                    MeshDescription = new Graphics.Software.Meshes.IndexedPlane
                    {
                        Position = Vector3.Zero,
                        Size     = new Vector2(1, 1),
                        UVMin    = new Vector2(0, 0),
                        UVMax    = new Vector2(1, 1),
                        Facings  = global::Graphics.Facings.Frontside
                    },
                    Layout = global::Graphics.Software.Vertex.PositionNormalTexcoord.Instance,
                },
                World = Matrix.Translation(-0.5f, -1, 0) * Matrix.Scaling(0.08f, 1.0f, 1)
                        //* Matrix.RotationZ((float)Math.PI/2f)
                        * Matrix.RotationX(-(float)Math.PI / 2f)
                ,
                Texture  = new TextureFromFile("Models/Effects/Trajectory1.png"),
                HasAlpha = true,
                Opacity  = 0.5f
            };
            VisibilityLocalBounding = new Common.Bounding.NonfittableBounding(Vector3.Zero, false, true);
            PickingLocalBounding    = new MetaBoundingBox
            {
                Mesh           = ((MetaModel)MainGraphic).XMesh,
                Transformation = ((MetaModel)MainGraphic).World
            };
            PhysicsLocalBounding = Vector3.Zero;

            TimeToLive = 0.4f;
            Updateable = true;
        }
示例#2
0
 public Point()
 {
     MainGraphic = new MetaModel
     {
         XMesh = new MeshConcretize
         {
             MeshDescription =
                 new global::Graphics.Software.Meshes.BoxMesh(new Vector3(-0.1f, -0.1f, 0), new Vector3(0.1f, 0.1f, 0.2f), Facings.Frontside, false),
             Layout = global::Graphics.Software.Vertex.PositionNormalTexcoord.Instance
         },
         Texture = new TextureConcretizer
         {
             TextureDescription = new global::Graphics.Software.Textures.SingleColorTexture(System.Drawing.Color.Blue)
         },
         ReceivesAmbientLight = Priority.Never,
         ReceivesDiffuseLight = Priority.Never,
     };
     PickingLocalBounding = VisibilityLocalBounding = new MetaBoundingBox
     {
         Mesh           = ((MetaModel)MainGraphic).XMesh,
         Transformation = ((MetaModel)MainGraphic).World
     };
     VisibleInGame = false;
     Dynamic       = false;
 }
 public ExplodingRottenEffect()
 {
     MainGraphic = new MetaModel
     {
         SkinnedMesh          = new SkinnedMeshFromFile("Models/Effects/RottenExplode1.x"),
         Texture              = new TextureFromFile("Models/Effects/RottenExplode1.png"),
         SpecularTexture      = new TextureFromFile("Models/Effects/RottenExplodeSpecular1.png"),
         World                = Matrix.Scaling(0.1f, 0.1f, 0.1f) * SkinnedMesh.InitSkinnedMeshFromMaya,
         HasAlpha             = true,
         AlphaRef             = 6,
         DontSort             = true,
         ReceivesSpecular     = Priority.High,
         ReceivesAmbientLight = Priority.High,
         ReceivesDiffuseLight = Priority.High,
         CastShadows          = Priority.Never,
         ReceivesShadows      = Priority.High,
         SpecularExponent     = 6,
     };
     PickingLocalBounding = new MetaBoundingBox
     {
         Mesh           = ((MetaModel)MainGraphic).SkinnedMesh,
         Transformation = ((MetaModel)MainGraphic).World
     };
     numberOfExplodeEffects = 2;
 }
        public DemonLord()
        {
            HitPoints               = MaxHitPoints = 20000;
            Armor                   = 0f;
            RunSpeed                = MaxRunSpeed = 3.5f;
            PhysicalWeight          = 5000;
            HeadOverBarHeight       = 5f;
            SplatRequiredDamagePerc = float.MaxValue;
            RageEnabled             = false;
            RunAnimationSpeed       = 0.3f;
            HitRadius               = 1.5f;
            SilverYield             = 600;
            RageLevel               = 1;

            MainGraphic = new MetaModel
            {
                AlphaRef         = 2,
                SkinnedMesh      = new SkinnedMeshFromFile("Models/Units/DemonLord1.x"),
                Texture          = new TextureFromFile("Models/Units/DemonLord1.png"),
                SpecularTexture  = new TextureFromFile("Models/Units/DemonLordSpecular1.png"),
                World            = SkinnedMesh.InitSkinnedMeshFromMaya * Matrix.Scaling(0.18f, 0.18f, 0.18f),
                HasAlpha         = false,
                IsBillboard      = false,
                CastShadows      = global::Graphics.Content.Priority.Never,
                ReceivesShadows  = global::Graphics.Content.Priority.High,
                ReceivesSpecular = global::Graphics.Content.Priority.High,
                SpecularExponent = 6,
            };
            VisibilityLocalBounding = new MetaBoundingBox
            {
                Mesh           = ((MetaModel)MainGraphic).SkinnedMesh,
                Transformation = ((MetaModel)MainGraphic).World
            };
            PickingLocalBounding = new Common.Bounding.Chain
            {
                Boundings = new object[]
                {
                    VisibilityLocalBounding,
                    new BoundingMetaMesh
                    {
                        SkinnedMeshInstance = MetaEntityAnimation,
                        Transformation      = ((MetaModel)MainGraphic).World
                    }
                },
                Shallow = true
            };
            PhysicsLocalBounding = new Common.Bounding.Cylinder(Vector3.Zero, 4, 1f);

            AddAbility(new DemonThrust());
            AddAbility(new DemonWrath());
            AddAbility(new DemonLordCharge());
            AddAbility(new LavaDitchBash());
        }
示例#5
0
 public Talisman()
 {
     MainGraphic = new MetaModel
     {
         XMesh   = new MeshFromFile("Models/Props/Ammobox1.x"),
         Texture = new TextureFromFile("Models/Props/Stone3.png"),
         World   = Matrix.Scaling(0.1f, 0.1f, 0.1f) * SkinnedMesh.InitSkinnedMeshFromMaya,
     };
     PickingLocalBounding = VisibilityLocalBounding = new MetaBoundingBox
     {
         Mesh           = ((MetaModel)MainGraphic).XMesh,
         Transformation = ((MetaModel)MainGraphic).World
     };
 }
示例#6
0
        public MainCharacter()
        {
            RunSpeed              = MaxRunSpeed = 4;
            RunAnimationSpeed     = 0.5f;
            BackingAnimationSpeed = 0.35f;
            Team                    = Team.Player;
            PhysicalWeight          = 1;
            regenTickTime           = 3f;
            regenTickHeal           = 2;
            PistolAmmo              = 0;
            TalismansCollected      = 0;
            FootstepRelativePeriod  = 1.5f;
            SplatRequiredDamagePerc = float.MaxValue;
            HeadOverBarHeight       = 2.2f;
            Name                    = "MainCharacter";
            RageEnabled             = true;

            MainGraphic = new MetaModel
            {
                SkinnedMesh      = new SkinnedMeshFromFile("Models/Units/MainCharacter1.x"),
                Texture          = new TextureFromFile("Models/Units/MainCharacter1.png"),
                SpecularTexture  = new TextureFromFile("Models/Units/MainCharacterSpecular1.png"),
                World            = SkinnedMesh.InitSkinnedMeshFromMaya * Matrix.Scaling(0.182f, 0.182f, 0.167f),
                CastShadows      = Priority.High,
                ReceivesShadows  = Priority.High,
                ReceivesSpecular = Priority.High
            };

            VisibilityLocalBounding = new MetaBoundingBox
            {
                Mesh           = ((MetaModel)MainGraphic).SkinnedMesh,
                Transformation = ((MetaModel)MainGraphic).World
            };
            PickingLocalBounding = new Common.Bounding.Chain
            {
                Boundings = new object[]
                {
                    VisibilityLocalBounding,
                    new BoundingMetaMesh
                    {
                        SkinnedMeshInstance = MetaEntityAnimation,
                        Transformation      = ((MetaModel)MainGraphic).World
                    }
                },
                Shallow = true
            };

            InitWeapons();
        }
示例#7
0
 public ExplodingRocksEffect()
 {
     MainGraphic = new MetaModel
     {
         SkinnedMesh = new SkinnedMeshFromFile("Models/Effects/RocksExplode1.x"),
         Texture     = new TextureFromFile("Models/Props/Stone1.png"),
         World       = SkinnedMesh.InitSkinnedMeshFromMaya * Matrix.Scaling(0.1f, 0.1f, 0.1f),
         IsBillboard = false,
         AlphaRef    = 254,
     };
     PickingLocalBounding = VisibilityLocalBounding = new MetaBoundingBox
     {
         Mesh           = ((MetaModel)MainGraphic).SkinnedMesh,
         Transformation = ((MetaModel)MainGraphic).World
     };
 }
示例#8
0
 public AmmoBox()
 {
     MainGraphic = new MetaModel
     {
         XMesh            = new MeshFromFile("Models/Props/Ammobox1.x"),
         Texture          = new TextureFromFile("Models/Props/Ammobox1.png"),
         SpecularTexture  = new TextureFromFile("Models/Props/AmmoboxSpecular1.png"),
         World            = Matrix.Scaling(0.1f, 0.1f, 0.1f) * SkinnedMesh.InitSkinnedMeshFromMaya,
         ReceivesSpecular = Priority.Medium,
     };
     PickingLocalBounding = VisibilityLocalBounding = new MetaBoundingBox
     {
         Mesh           = ((MetaModel)MainGraphic).XMesh,
         Transformation = ((MetaModel)MainGraphic).World
     };
     Ammo = 10;
 }
示例#9
0
        public Bull()
        {
            HitPoints               = MaxHitPoints = 2000;
            RunSpeed                = MaxRunSpeed = 2;
            RaiseFromCorpseTime     = 2;
            GraphicalTurnSpeed      = 2.5f;
            SplatRequiredDamagePerc = float.MaxValue;
            HeadOverBarHeight       = 2.5f;
            HitRadius               = 1;
            SilverYield             = 30;

            MainGraphic = new MetaModel
            {
                SkinnedMesh      = new SkinnedMeshFromFile("Models/Units/Oxen1.x"),
                Texture          = new TextureFromFile("Models/Units/Oxen1.png"),
                SpecularTexture  = new TextureFromFile("Models/Units/OxenSpecular1.png"),
                World            = SkinnedMesh.InitSkinnedMeshFromMaya * Matrix.Scaling(0.1f, 0.1f, 0.1f),
                AlphaRef         = 100,
                CastShadows      = global::Graphics.Content.Priority.High,
                ReceivesShadows  = Priority.High,
                ReceivesSpecular = Priority.High,
                SpecularExponent = 6,
            };
            VisibilityLocalBounding = new MetaBoundingBox
            {
                Mesh           = ((MetaModel)MainGraphic).SkinnedMesh,
                Transformation = ((MetaModel)MainGraphic).World
            };
            PickingLocalBounding = new Common.Bounding.Chain
            {
                Boundings = new object[]
                {
                    VisibilityLocalBounding,
                    new BoundingMetaMesh
                    {
                        SkinnedMeshInstance = MetaEntityAnimation,
                        Transformation      = ((MetaModel)MainGraphic).World
                    }
                },
                Shallow = true
            };

            AddAbility(new BullThrust());
            AddAbility(new BullCharge());
        }
示例#10
0
        public Cleric()
        {
            HitPoints         = MaxHitPoints = 1000;
            RunSpeed          = MaxRunSpeed = 1;
            Chanting          = false;
            HeadOverBarHeight = 1.15f;
            SilverYield       = 20;

            MainGraphic = new MetaModel
            {
                AlphaRef         = 254,
                SkinnedMesh      = new SkinnedMeshFromFile("Models/Units/VoodooPriest1.x"),
                Texture          = new TextureFromFile("Models/Units/VoodooPriest1.png"),
                SpecularTexture  = new TextureFromFile("Models/Units/VoodooPriestSpecular1.png"),
                World            = SkinnedMesh.InitSkinnedMeshFromMaya * Matrix.Scaling(0.11f, 0.11f, 0.11f),
                IsBillboard      = false,
                CastShadows      = global::Graphics.Content.Priority.High,
                ReceivesShadows  = global::Graphics.Content.Priority.High,
                ReceivesSpecular = global::Graphics.Content.Priority.High,
                SpecularExponent = 6,
            };
            VisibilityLocalBounding = new MetaBoundingBox
            {
                Mesh           = ((MetaModel)MainGraphic).SkinnedMesh,
                Transformation = ((MetaModel)MainGraphic).World
            };
            PickingLocalBounding = new Common.Bounding.Chain
            {
                Boundings = new object[]
                {
                    VisibilityLocalBounding,
                    new BoundingMetaMesh
                    {
                        SkinnedMeshInstance = MetaEntityAnimation,
                        Transformation      = ((MetaModel)MainGraphic).World
                    }
                },
                Shallow = true
            };

            AddAbility(new ClericRaiseDead());
            AddAbility(new FireBreath());
            //AddAbility(new IncinerateApplyBuff());
            AddAbility(new StartScourgedEarth());
        }
        public WolfBoss()
        {
            HitPoints               = MaxHitPoints = 8000;
            Armor                   = 0f;
            RunSpeed                = MaxRunSpeed = 5.5f;
            RunAnimationSpeed       = 0.3f;
            SplatRequiredDamagePerc = 999;
            SilverYield             = 300;
            HitRadius               = 1.5f;
            HeadOverBarHeight       = 1.1f;

            MainGraphic = new MetaModel
            {
                SkinnedMesh      = new SkinnedMeshFromFile("Models/Units/Wolf1.x"),
                Texture          = new TextureFromFile("Models/Units/Wolf1.png"),
                SpecularTexture  = new TextureFromFile("Models/Units/WolfSpecular1.png"),
                World            = SkinnedMesh.InitSkinnedMeshFromMaya * Matrix.Scaling(0.12f, 0.12f, 0.12f),
                CastShadows      = global::Graphics.Content.Priority.High,
                ReceivesShadows  = global::Graphics.Content.Priority.High,
                ReceivesSpecular = global::Graphics.Content.Priority.High,
                SpecularExponent = 6,
            };
            VisibilityLocalBounding = new MetaBoundingBox
            {
                Mesh           = ((MetaModel)MainGraphic).SkinnedMesh,
                Transformation = ((MetaModel)MainGraphic).World
            };
            PickingLocalBounding = new Common.Bounding.Chain
            {
                Boundings = new object[]
                {
                    VisibilityLocalBounding,
                    new BoundingMetaMesh
                    {
                        SkinnedMeshInstance = MetaEntityAnimation,
                        Transformation      = ((MetaModel)MainGraphic).World
                    }
                },
                Shallow = true
            };

            AddAbility(new WolfBite());
        }
示例#12
0
        public Brute()
        {
            HitPoints               = MaxHitPoints = 240;
            RunSpeed                = MaxRunSpeed = 1.1f;
            SilverYield             = 5;
            SplatRequiredDamagePerc = 160 / (float)MaxHitPoints;

            MainGraphic = new MetaModel
            {
                SkinnedMesh      = new SkinnedMeshFromFile("Models/Units/Brute1.x"),
                Texture          = new TextureFromFile("Models/Units/Brute1.png"),
                SpecularTexture  = new TextureFromFile("Models/Units/BruteSpecular1.png"),
                World            = SkinnedMesh.InitSkinnedMeshFromMaya * Matrix.Scaling(0.115f, 0.115f, 0.115f),
                IsBillboard      = false,
                AlphaRef         = 254,
                CastShadows      = global::Graphics.Content.Priority.High,
                ReceivesShadows  = Priority.High,
                ReceivesSpecular = Priority.High,
                SpecularExponent = 6,
            };
            VisibilityLocalBounding = new MetaBoundingBox
            {
                Mesh           = ((MetaModel)MainGraphic).SkinnedMesh,
                Transformation = ((MetaModel)MainGraphic).World
            };
            PickingLocalBounding = new Common.Bounding.Chain
            {
                Boundings = new object[]
                {
                    VisibilityLocalBounding,
                    new BoundingMetaMesh
                    {
                        SkinnedMeshInstance = MetaEntityAnimation,
                        Transformation      = ((MetaModel)MainGraphic).World
                    }
                },
                Shallow = true
            };

            AddAbility(new BruteThrust());
            AddAbility(new CastNet());
        }
        public Infected()
        {
            HitPoints               = MaxHitPoints = 210;
            RunSpeed                = MaxRunSpeed = 4;
            RunAnimationSpeed       = 0.4f;
            SplatRequiredDamagePerc = 0;
            SilverYield             = 5;

            MainGraphic = new MetaModel
            {
                SkinnedMesh      = new SkinnedMeshFromFile("Models/Units/Ghoul1.x"),
                Texture          = new TextureFromFile("Models/Units/Infected1.png"),
                SpecularTexture  = new TextureFromFile("Models/Units/GhoulSpecular1.png"),
                World            = SkinnedMesh.InitSkinnedMeshFromMaya * Matrix.Scaling(0.1f, 0.1f, 0.1f),
                CastShadows      = global::Graphics.Content.Priority.High,
                ReceivesShadows  = global::Graphics.Content.Priority.High,
                ReceivesSpecular = global::Graphics.Content.Priority.High,
                SpecularExponent = 6,
            };
            VisibilityLocalBounding = new MetaBoundingBox
            {
                Mesh           = ((MetaModel)MainGraphic).SkinnedMesh,
                Transformation = ((MetaModel)MainGraphic).World
            };
            PickingLocalBounding = new Common.Bounding.Chain
            {
                Boundings = new object[]
                {
                    VisibilityLocalBounding,
                    new BoundingMetaMesh
                    {
                        SkinnedMeshInstance = MetaEntityAnimation,
                        Transformation      = ((MetaModel)MainGraphic).World
                    }
                },
                Shallow = true
            };

            AddAbility(new InfectedBite());
        }
示例#14
0
        public Unit()
        {
            CanControlMovementBlockers = 0;
            CanControlRotationBlockers = 0;
            InRangeRadius           = 6;
            PhysicalWeight          = 1;
            GraphicalTurnSpeed      = 5f;
            RaiseFromCorpseTime     = 2;
            PistolAmmo              = 0;
            InCombat                = false;
            IsDestructible          = true;
            RunAnimationSpeed       = 1;
            BackingAnimationSpeed   = 1;
            RunningBackwards        = false;
            MaxRunSpeed             = 4;
            MaxWaterDepth           = 0.5f;
            RageYield               = 1;
            SplatRequiredDamagePerc = 0;

            MainGraphic = new MetaModel
            {
                SkinnedMesh = new SkinnedMeshFromFile("Models/Units/Zombie1.x"),
                Texture     = new TextureFromFile("Models/Units/Zombie1.png"),
                World       = SkinnedMesh.InitSkinnedMeshFromMaya * Matrix.Scaling(0.1f, 0.1f, 0.1f),
                IsBillboard = false,
                AlphaRef    = 254,
                Opacity     = 1.0f
            };
            PickingLocalBounding = VisibilityLocalBounding = new MetaBoundingBox
            {
                Mesh           = ((MetaModel)MainGraphic).SkinnedMesh,
                Transformation = ((MetaModel)MainGraphic).World
            };
            PhysicsLocalBounding = new Common.Bounding.Cylinder(Vector3.Zero, 2.5f, 0.5f)
            {
                SolidRayIntersection = true
            };
            EditorRandomRotation = true;
        }
示例#15
0
        public Hound()
        {
            HitPoints               = MaxHitPoints = 150;
            RunSpeed                = MaxRunSpeed = 1.5f;
            RunAnimationSpeed       = 0.4f;
            SplatRequiredDamagePerc = 0;

            MainGraphic = new MetaModel
            {
                SkinnedMesh = new SkinnedMeshFromFile("Models/Units/Wolf1.x"),
                Texture     = new TextureFromFile("Models/Units/Wolf1.png"),
                World       = SkinnedMesh.InitSkinnedMeshFromMaya * Matrix.Scaling(0.1f, 0.1f, 0.1f),
                IsBillboard = false,
            };
            VisibilityLocalBounding = new MetaBoundingBox
            {
                Mesh           = ((MetaModel)MainGraphic).SkinnedMesh,
                Transformation = ((MetaModel)MainGraphic).World
            };
            PickingLocalBounding = new Common.Bounding.Chain
            {
                Boundings = new object[]
                {
                    VisibilityLocalBounding,
                    new BoundingMetaMesh
                    {
                        SkinnedMeshInstance = MetaEntityAnimation,
                        Transformation      = ((MetaModel)MainGraphic).World
                    }
                },
                Shallow = true
            };

            //AddAbility(new HoundBite());
            AddAbility(new HoundExplode());
        }
示例#16
0
        public ClericBoss()
        {
            HitPoints = MaxHitPoints = 5500;
            RunSpeed  = MaxRunSpeed = 1;

            MainGraphic = new MetaModel
            {
                AlphaRef    = 254,
                SkinnedMesh = new SkinnedMeshFromFile("Models/Units/VoodooPriest1.x"),
                Texture     = new TextureConcretizer
                {
                    TextureDescription = new global::Graphics.Software.Textures.SingleColorTexture(
                        System.Drawing.Color.White)
                },
                World           = SkinnedMesh.InitSkinnedMeshFromMaya * Matrix.Scaling(0.1f, 0.1f, 0.1f),
                IsBillboard     = false,
                CastShadows     = global::Graphics.Content.Priority.High,
                ReceivesShadows = global::Graphics.Content.Priority.High,
            };
            VisibilityLocalBounding = new MetaBoundingBox
            {
                Mesh           = ((MetaModel)MainGraphic).SkinnedMesh,
                Transformation = ((MetaModel)MainGraphic).World
            };
            PickingLocalBounding = new Common.Bounding.Chain
            {
                Boundings = new object[]
                {
                    VisibilityLocalBounding,
                    new BoundingMetaMesh
                    {
                        SkinnedMeshInstance = MetaEntityAnimation,
                        Transformation      = ((MetaModel)MainGraphic).World
                    }
                },
                Shallow = true
            };

            AddAbility(new ClericRaiseDead());
            AddAbility(new IceBreath());
            AddAbility(new BossIncinerateApplyBuff());
            //AddAbility(new ScourgedEarth());

            if (Program.Instance != null)
            {
                var sm        = Program.Instance.SoundManager;
                var idleSound = sm.GetSoundResourceGroup(sm.GetSFX(SFX.ClericIdle1), sm.GetSFX(SFX.ClericIdle2), sm.GetSFX(SFX.ClericIdle3));
                idle = idleSound.PlayLoopedWithIntervals(5, 15, 3f + (float)Game.Random.NextDouble() * 3.0f, new Sound.PlayArgs
                {
                    GetPosition = () => { return(Position); },
                    GetVelocity = () => { if (MotionNPC != null)
                                          {
                                              return(MotionNPC.Velocity);
                                          }
                                          else
                                          {
                                              return(Vector3.Zero);
                                          } }
                });
            }
        }