Ejemplo n.º 1
0
 public Unit(LoadModel model)
     : base(model)
 {
     base.elapsedTime = 0;
     this.armorAfterBuff = armor * 2;
     pathFinder = new PathFinderNamespace.PathFinder();
     speed = 42;
 }
Ejemplo n.º 2
0
 public InteractiveModel( LoadModel model)
 {
     this.model=model;
     this.elapsedTime = 0;
     this.lifeBar = new HUD.LifeBar(1);
     this.circle = new HUD.Circle();
     this.myNode = getMyNode();
 }
Ejemplo n.º 3
0
        public Transporter(LoadModel model, List<Unit> _transportAnt)
            : base(model)
        {
            transportAnt.Capacity = 2;
            this.transportAnt = _transportAnt;

            hp = 10000;
            selectable = true;
        }
Ejemplo n.º 4
0
        /*
        protected List<Skill> skillsList;

        public List<Skill> SkillsList
        {
            get { return skillsList; }
            set { skillsList = value; }
        }
           */
        public Unit(int hp, float armor, float strength, float range, int cost, float buildingTime, LoadModel model)
            : base(model)
        {
            this.hp = hp;
            this.armor = armor;
            this.strength = strength;
            this.range = range;
            this.cost = cost;
            this.buildingTime = buildingTime;
        }
Ejemplo n.º 5
0
        /*
         protected List<Skill> skillsList;

         public List<Skill> SkillsList
         {
             get { return skillsList; }
             set { skillsList = value; }
         }
        */
        public Unit(int hp, float armor, float strength, float range, int cost, float buildingTime, LoadModel model, float atackInterval)
            : base(model)
        {
            this.hp = hp;
            this.armor = armor;
            this.strength = strength;
            this.range = range;
            this.cost = cost;
            this.buildingTime = buildingTime;
            this.atackInterval = atackInterval;
            base.elapsedTime = 0;
            this.armorAfterBuff = armor * 2;
            pathFinder = new PathFinderNamespace.PathFinder();
            speed = 42;
        }
Ejemplo n.º 6
0
 public Transporter(LoadModel model)
     : base(model)
 {
     hp = 10000;
     selectable = true;
 }
Ejemplo n.º 7
0
 public virtual void DrawOpaque(GameCamera.FreeCamera camera,float Alpha,LoadModel model2)
 {
     model.DrawOpague(camera, Alpha, model2);
 }
Ejemplo n.º 8
0
 public Ant(int hp, float armor, float strength, float range, int cost, float buildingTime, LoadModel model, float atackInterval)
     : base(hp, armor, strength, range, cost, buildingTime, model, atackInterval)
 {
     base.elapsedTime = 0;
 }
Ejemplo n.º 9
0
 public Ant(LoadModel model)
     : base(model)
 {
 }
Ejemplo n.º 10
0
 public Ant(int hp, float armor, float strength, float range, int cost, float buildingTime, LoadModel model)
     : base(hp,  armor,  strength,  range,  cost,  buildingTime,  model)
 {
 }
Ejemplo n.º 11
0
 public Predator(int hp, float armor, float strength, float range, int cost, float buildingTime, LoadModel model, float atackInterval)
     : base(hp, armor, strength, range, cost, buildingTime, model,atackInterval)
 {
     selectable = false;
 }
Ejemplo n.º 12
0
 public Predator(LoadModel model)
     : base(model)
 {
 }
Ejemplo n.º 13
0
 public InteractiveModel( LoadModel model)
 {
     this.model=model;
 }
Ejemplo n.º 14
0
        public void DrawOpague(GameCamera.FreeCamera camera, float Alpha, LoadModel model2)
        {
            baseWorld = Matrix.CreateScale(Scale) * Matrix.CreateFromYawPitchRoll(
               Rotation.Y, Rotation.X, Rotation.Z)
               * Matrix.CreateTranslation(Position);
            foreach (ModelMesh mesh in model2.Model.Meshes)
            {
                if (!mesh.Name.Contains("BoundingSphere"))
                {
                    Matrix localWorld = modelTransforms[mesh.ParentBone.Index]
                   * baseWorld;
                    this.localWorld = localWorld;
                    foreach (ModelMeshPart meshPart in mesh.MeshParts)
                    {

                        BasicEffect effect = (BasicEffect)meshPart.Effect;
                        effect.World = localWorld;
                        effect.View = camera.View;
                        effect.Projection = camera.Projection;
                        effect.EnableDefaultLighting();

                    }

                    mesh.Draw();
                }
            }
        }
Ejemplo n.º 15
0
        public void DrawOpague(GameCamera.FreeCamera camera,float Alpha,LoadModel model2 )
        {
            this.baseWorld = Matrix.CreateScale(model2.Scale) * Matrix.CreateRotationX(model2.Rotation.X)
            * Matrix.CreateRotationY(model2.Rotation.Y) *
            Matrix.CreateRotationZ(model2.Rotation.Z) *
            Matrix.CreateTranslation(model2.Position);
            foreach (ModelMesh mesh in model2.Model.Meshes)
            {
                if(!mesh.Name.Contains("BoundingSphere"))
                {
                    Matrix localWorld = modelTransforms[mesh.ParentBone.Index]
                  * baseWorld;
                    this.localWorld = localWorld;
                    foreach (ModelMeshPart meshPart in mesh.MeshParts)
                    {

                        BasicEffect effect = (BasicEffect)meshPart.Effect;
                        effect.World = localWorld;
                        effect.View = camera.View;
                        effect.Projection = camera.Projection;
                        effect.EnableDefaultLighting();
                        effect.Alpha = 0.9f;
                        if (Hit)
                        {
                            effect.AmbientLightColor = new Vector3(255, 0, 0);
                        }
                        else
                        {
                            effect.AmbientLightColor = new Vector3(0, 0, 0);
                        }
                        /*
                    effect.DirectionalLight0.Enabled = true;
                    effect.DirectionalLight0.DiffuseColor = new Vector3(1.0f, 1.0f, 1.0f) * MathHelper.Clamp((Math.Abs(-1 * (float)Math.Sin(MathHelper.ToRadians(time - 1.58f)) / light.LightPower) + 1), 0.3f, 0.9f);
                    //Console.WriteLine(MathHelper.Clamp((Math.Abs(-1 * (float)Math.Sin(MathHelper.ToRadians(time - 1.58f)) / light.LightPower)), 0.3f, 0.9f));// a red light
                    effect.DirectionalLight0.Direction = lightDir;  // coming along the x-axis
                    effect.DirectionalLight0.SpecularColor = new Vector3(1.0f, 1.0f, 1.0f) * MathHelper.Clamp((Math.Abs((float)Math.Sin(MathHelper.ToRadians(time - 1.58f)) / light.LightPower) + 1), 0.3f, 0.9f); ; // with green highlights
                    */
                        effect.Alpha = Alpha;

                    }

                    mesh.Draw();
                }

                }
        }
Ejemplo n.º 16
0
 public Laser(LoadModel model,Curve3D _movementPath)
     : base(model)
 {
     movementPath = _movementPath;
 }
Ejemplo n.º 17
0
 public Laser(LoadModel model,Curve3D _movementPath)
     : base(model)
 {
     movementPath = _movementPath;
     canStart = false;
 }
Ejemplo n.º 18
0
 public Ant(LoadModel model)
     : base(model)
 {
     base.elapsedTime = 0;
 }
Ejemplo n.º 19
0
 public override void DrawOpaque(GameCamera.FreeCamera camera, float Alpha, LoadModel model2)
 {
     if (canStart == false)
      { return; }
      base.DrawOpaque(camera, Alpha, model2);
 }
Ejemplo n.º 20
0
 public Unit(LoadModel model)
     : base(model)
 {
 }
Ejemplo n.º 21
0
 public Allie(LoadModel model)
     : base(model)
 {
 }