コード例 #1
0
 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);
 }
コード例 #2
0
        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);
        }
コード例 #3
0
 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);
     }
 }
コード例 #4
0
ファイル: ExtAgentPart.cs プロジェクト: zdepav/into-the-blaze
 public ExtAgentPart(Texture2D texture, ExtinguishingAgent type, float direction)
 {
     this.texture   = texture;
     this.direction = direction;
     Type           = type;
 }