public Unit(LoadModel model) : base(model) { base.elapsedTime = 0; this.armorAfterBuff = armor * 2; pathFinder = new PathFinderNamespace.PathFinder(); speed = 42; }
public InteractiveModel( LoadModel model) { this.model=model; this.elapsedTime = 0; this.lifeBar = new HUD.LifeBar(1); this.circle = new HUD.Circle(); this.myNode = getMyNode(); }
public Transporter(LoadModel model, List<Unit> _transportAnt) : base(model) { transportAnt.Capacity = 2; this.transportAnt = _transportAnt; hp = 10000; selectable = true; }
/* 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; }
/* 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; }
public Transporter(LoadModel model) : base(model) { hp = 10000; selectable = true; }
public virtual void DrawOpaque(GameCamera.FreeCamera camera,float Alpha,LoadModel model2) { model.DrawOpague(camera, Alpha, model2); }
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; }
public Ant(LoadModel model) : base(model) { }
public Ant(int hp, float armor, float strength, float range, int cost, float buildingTime, LoadModel model) : base(hp, armor, strength, range, cost, buildingTime, model) { }
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; }
public Predator(LoadModel model) : base(model) { }
public InteractiveModel( LoadModel model) { this.model=model; }
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(); } } }
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(); } } }
public Laser(LoadModel model,Curve3D _movementPath) : base(model) { movementPath = _movementPath; }
public Laser(LoadModel model,Curve3D _movementPath) : base(model) { movementPath = _movementPath; canStart = false; }
public Ant(LoadModel model) : base(model) { base.elapsedTime = 0; }
public override void DrawOpaque(GameCamera.FreeCamera camera, float Alpha, LoadModel model2) { if (canStart == false) { return; } base.DrawOpaque(camera, Alpha, model2); }
public Unit(LoadModel model) : base(model) { }
public Allie(LoadModel model) : base(model) { }