public GameObject( string name, ObjectType type, FireType fireType, float fireLimit, IShape fireArea, Texture2D tex, int width, int height, int zHeight, int minHp, int maxHp, ExtinguishingAgent agentSupply, IEnumerable <IShape> collisionMasks, int cost, bool solid ) { Name = name; Texture = tex; Width = width; Height = height; MinHP = minHp; MaxHP = maxHp; AgentSupply = agentSupply; Cost = cost; Type = type; ZHeight = zHeight; FireLimit = fireLimit; FireArea = fireArea; FireType = fireType; Solid = solid; CollisionMasks = Array.AsReadOnly(collisionMasks.ToArray()); TextureOrigin = new Vector2(Width / 2f, Height / 2f); }
public void AddExtAgentPart(Vector2 pos, float direction, ExtinguishingAgent type) { var part = new ExtAgentPart(waterPart, type, direction); part.Initialize(pos.X, pos.Y, Utils.Random); parts.Add(part); }
public void Extinguish(ExtinguishingAgent agent) { if (IsBurning) { //if (agent.Extinguishes(Type.FireType)) Burning = Math.Max(0, Burning - 1); //if (agent.IsEffectiveAgainst(Type.FireType)) Burning = Math.Max(0, Burning - 1); } }
public ExtAgentPart(Texture2D texture, ExtinguishingAgent type, float direction) { this.texture = texture; this.direction = direction; Type = type; }