コード例 #1
0
ファイル: BuildingDummy.cs プロジェクト: steffan88/Bevelle
 public BuildingDummy(Vector3Int position)
     : base(position, MapElementType.None, 1)
 {
     Dimentions = new Vector3Int(1, 1, 1);
     ElementType = MapElementType.BuildingDummy;
     ElementEffect = MapElementEffect.Nonmoveable;
 }
コード例 #2
0
ファイル: Cube.cs プロジェクト: steffan88/Bevelle
 public Cube(MapElementType type, Overlay overlay, WorldMap worldMap, Vector3Int position)
     : base(worldMap, position)
 {
     ElementType = type;
     Overlay = overlay;
     Solid = true;
 }
コード例 #3
0
ファイル: Tree.cs プロジェクト: steffan88/Bevelle
 public Tree(Vector3Int position, int level)
     : base(position, MapElementType.Tree, level)
 {
     SetDimentions(new Vector3Int(1, 1, 1));
     AddMapElement(0, 0, 0, new TreeMapElement(position));
     UpdateMapElementAlpha();
 }
コード例 #4
0
ファイル: PlankMapElement.cs プロジェクト: steffan88/Bevelle
 public PlankMapElement(Vector3Int position)
     : base(position)
 {
     TileType = Map.TileType.Plank;
     ElementType = MapElementType.Plank;
     ElementEffect = MapElementEffect.Moveable;
 }
コード例 #5
0
ファイル: WheatMapElement.cs プロジェクト: steffan88/Bevelle
 public WheatMapElement(Vector3Int position)
     : base(position)
 {
     TileType = Map.TileType.Wheat;
     ElementType = MapElementType.Wheat;
     ElementEffect = MapElementEffect.Nonmoveable;
 }
コード例 #6
0
ファイル: StoneMapElement.cs プロジェクト: steffan88/Bevelle
 public StoneMapElement(Vector3Int position)
     : base(position)
 {
     TileType = Map.TileType.Stone;
     ElementType = MapElementType.Stone;
     ElementEffect = MapElementEffect.Moveable;
 }
コード例 #7
0
ファイル: Cube.cs プロジェクト: steffan88/Bevelle
 public Cube(MapElementType type, Vector3Int position)
     : base(position)
 {
     ElementType = type;
     ElementEffect = MapElementEffect.Solid;
     Unconstructed = false;
 }
コード例 #8
0
 public WoodChairMapElement(Vector3Int position)
     : base(position)
 {
     TileType = Map.TileType.WoodChair;
     ElementType = MapElementType.WoodChair;
     ElementEffect = MapElementEffect.Nonmoveable;
 }
コード例 #9
0
ファイル: Smog.cs プロジェクト: steffan88/Bevelle
        private void MoveRandom()
        {
            int dir = DwarfRandom.GetRandomInt(1, 5);

            if (dir == 1 && WorldMap.Instance.CanCellContainSmog(Position.X + 1, Position.Y, Position.Z))
            {
                Position = new Vector3Int(Position.X + 1, Position.Y, Position.Z);
                _timeSinceLastMoveMs = 0;
            }
            if (dir == 2 && WorldMap.Instance.CanCellContainSmog(Position.X - 1, Position.Y, Position.Z))
            {
                Position = new Vector3Int(Position.X - 1, Position.Y, Position.Z);
                _timeSinceLastMoveMs = 0;
            }
            if (dir == 3 && WorldMap.Instance.CanCellContainSmog(Position.X, Position.Y+1, Position.Z))
            {
                Position = new Vector3Int(Position.X, Position.Y + 1, Position.Z);
                _timeSinceLastMoveMs = 0;
            }
            if (dir == 4 && WorldMap.Instance.CanCellContainSmog(Position.X, Position.Y - 1, Position.Z))
            {
                Position = new Vector3Int(Position.X, Position.Y - 1, Position.Z);
                _timeSinceLastMoveMs = 0;
            }
        }
コード例 #10
0
 public IronBarMapElement(Vector3Int position)
     : base(position)
 {
     TileType = TileType.IronBar;
     ElementType = MapElementType.IronBar;
     ElementEffect = MapElementEffect.Moveable;
 }
コード例 #11
0
ファイル: ArcherTower.cs プロジェクト: steffan88/Bevelle
        public ArcherTower(Vector3Int position, int constructionPoints)
            : base(position, constructionPoints, BuildingType.ArcherTower)
        {
            SetDimentions(new Vector3Int(2, 2, 1));

            ActivationLocation = new Vector3Int(1, 1, 0);

            NeededConstructionPoints = 100;

            NeededForConstruction = new Dictionary<MapElementType, int>();
            //NeededForConstruction.Add(MapElementType.Plank, 2);
            //NeededForConstruction.Add(MapElementType.StoneBrick, 2);

            NeededForConstruction.Add(MapElementType.Lumber, 2);
            NeededForConstruction.Add(MapElementType.Stone, 2);

            _texture = WorldMap.Instance.GetContent().Load<Texture2D>("archerTower");

            _towerSlots.Add(new TowerSlot() { Position = new Vector2(25, 20), D = null });
            _towerSlots.Add(new TowerSlot() { Position = new Vector2(5, 20), D = null });

            AmmoCapacity =10;

            RateOfFire = 3000;

            Range = 13;
        }
コード例 #12
0
ファイル: LumberMapElement.cs プロジェクト: steffan88/Bevelle
 public LumberMapElement(Vector3Int position)
     : base(position)
 {
     TileType = Map.TileType.Lumber;
     ElementType = MapElementType.Lumber;
     ElementEffect = MapElementEffect.Moveable;
 }
コード例 #13
0
ファイル: FenceMapElement.cs プロジェクト: steffan88/Bevelle
 public FenceMapElement(Vector3Int position)
     : base(position)
 {
     TileType = Map.TileType.Fence;
     ElementType = MapElementType.Fence;
     ElementEffect = MapElementEffect.Nonmoveable;
 }
コード例 #14
0
ファイル: RailMapElement.cs プロジェクト: steffan88/Bevelle
 public RailMapElement(Vector3Int position)
     : base(position)
 {
     TileType = Map.TileType.Rail;
     ElementType = MapElementType.Rail;
     ElementEffect = MapElementEffect.Nonmoveable;
 }
コード例 #15
0
ファイル: Tree.cs プロジェクト: steffan88/Bevelle
 public Tree(WorldMap worldMap, Vector3Int position)
     : base(worldMap, position)
 {
     Dimentions = new Vector3Int(1, 1, 1);
     SpriteSource = new Rectangle(0 * 32, 20 * 5 + 32 * 5, 32, 32);
     ElementType = MapElementType.Tree;
 }
コード例 #16
0
ファイル: CropMapElement .cs プロジェクト: steffan88/Bevelle
 public CropMapElement(Vector3Int position, CropsType type)
     : base(position)
 {
     TileType = Map.TileType.NoCrop;
     ElementType = MapElementType.Crop;
     ElementEffect = MapElementEffect.Nonmoveable;
     CropType = type;
 }
コード例 #17
0
ファイル: SteamEngine.cs プロジェクト: steffan88/Bevelle
 public SteamEngine(Vector3Int position)
     : base(position, MapElementType.SteamEngine, 1)
 {
     SetDimentions(new Vector3Int(3, 3, 1));
     CraftPoints = 0;
     CraftPointsNeeded = 100;
     UpdateMapElementAlpha();
 }
コード例 #18
0
ファイル: WorldObject.cs プロジェクト: steffan88/Bevelle
 public WorldObject(Vector3Int position, MapElementType type, int level)
 {
     Id = Guid.NewGuid();
     Level = level;
     ElementType = type;
     Position = position;
     NeededForCrafting = new Dictionary<MapElementType, int>();
 }
コード例 #19
0
ファイル: Gear.cs プロジェクト: steffan88/Bevelle
 public Gear(Vector3Int position)
     : base(position, MapElementType.Gear, 1)
 {
     SetDimentions(new Vector3Int(1, 1, 1));
     CraftPoints = 0;
     CraftPointsNeeded = 100;
     UpdateMapElementAlpha();
 }
コード例 #20
0
ファイル: WoodChair.cs プロジェクト: steffan88/Bevelle
 public WoodChair(Vector3Int position)
     : base(position, MapElementType.WoodChair, 1)
 {
     SetDimentions(new Vector3Int(1, 1, 1));
     AddMapElement(0, 0, 0, new WoodChairMapElement(position));
     CraftPoints = 0;
     CraftPointsNeeded = 100;
     UpdateMapElementAlpha();
 }
コード例 #21
0
ファイル: Stone.cs プロジェクト: steffan88/Bevelle
 public Stone(WorldMap worldMap, Vector3Int position)
     : base(worldMap, position)
 {
     Dimentions = new Vector3Int(1, 1, 1);
     SpriteSource = new Rectangle(0 * 32, 20 * 7 + 32 * 9, 16, 16);
     ElementType = MapElementType.Stone;
     SpriteOfset = new Vector2(8, 13);
     Solid = false;
 }
コード例 #22
0
ファイル: IronOre.cs プロジェクト: steffan88/Bevelle
 public IronOre(Vector3Int position, int level)
     : base(position, MapElementType.IronOre, level)
 {
     SetDimentions(new Vector3Int(1, 1, 1));
     CraftPoints = 0;
     CraftPointsNeeded = 100;
     AddMapElement(0, 0, 0, new IronOreMapElement(position));
     UpdateMapElementAlpha();
 }
コード例 #23
0
ファイル: WheatCrop.cs プロジェクト: steffan88/Bevelle
 public WheatCrop(Vector3Int position)
     : base(position, MapElementType.WheatCrop,CropsType.Wheat)
 {
     SetDimentions(new Vector3Int(1, 1, 1));
     AddMapElement(0, 0, 0, new WheatCropMapElement(position));
     CraftPoints = 100;
     CraftPointsNeeded = 100;
     UpdateMapElementAlpha();
 }
コード例 #24
0
ファイル: Brocolli.cs プロジェクト: steffan88/Bevelle
 public Brocolli(Vector3Int position)
     : base(position, MapElementType.Brocolli, 1)
 {
     SetDimentions(new Vector3Int(1, 1, 1));
     AddMapElement(0, 0, 0, new WheatMapElement(position));
     CraftPoints = 100;
     CraftPointsNeeded = 100;
     Type = FoodType.Vegestable;
     UpdateMapElementAlpha();
 }
コード例 #25
0
ファイル: Rail.cs プロジェクト: steffan88/Bevelle
 public Rail(Vector3Int position, int level)
     : base(position, MapElementType.Rail, level)
 {
     SetDimentions(new Vector3Int(1, 1, 1));
     AddMapElement(0, 0, 0, new RailMapElement(position));
     CraftPoints = 0;
     CraftPointsNeeded = 100;
     NeededForCrafting.Add(MapElementType.IronBar, 4);
     UpdateMapElementAlpha();
 }
コード例 #26
0
ファイル: WoodBed.cs プロジェクト: steffan88/Bevelle
 public WoodBed(Vector3Int position, int level)
     : base(position, MapElementType.WoodBed, level)
 {
     SetDimentions(new Vector3Int(1, 1, 1));
     AddMapElement(0, 0, 0, new WoodBedMapElement(position));
     NeededForCrafting.Add(MapElementType.Plank, 4);
     CraftPoints = 0;
     CraftPointsNeeded = 100;
     UpdateMapElementAlpha();
 }
コード例 #27
0
ファイル: Wheat.cs プロジェクト: steffan88/Bevelle
 public Wheat(Vector3Int position)
     : base(position, MapElementType.Wheat, 1)
 {
     SetDimentions(new Vector3Int(1, 1, 1));
     AddMapElement(0, 0, 0, new WheatMapElement(position));
     CraftPoints = 100;
     CraftPointsNeeded = 100;
     Type = FoodType.Grain;
     UpdateMapElementAlpha();
 }
コード例 #28
0
ファイル: Milk.cs プロジェクト: steffan88/Bevelle
 public Milk(Vector3Int position)
     : base(position, MapElementType.Milk, 1)
 {
     SetDimentions(new Vector3Int(1, 1, 1));
     AddMapElement(0, 0, 0, new WheatMapElement(position));
     CraftPoints = 0;
     CraftPointsNeeded = 100;
     Type = FoodType.Liquid;
     UpdateMapElementAlpha();
 }
コード例 #29
0
ファイル: TomatoSoupe.cs プロジェクト: steffan88/Bevelle
 public TomatoSoupe(Vector3Int position, int level)
     : base(position, MapElementType.TomatoSoup, level)
 {
     SetDimentions(new Vector3Int(1, 1, 1));
     AddMapElement(0, 0, 0, new WheatMapElement(position));
     CraftPoints = 0;
     CraftPointsNeeded = 100;
     Type = FoodType.Meal;
     UpdateMapElementAlpha();
 }
コード例 #30
0
ファイル: Fence.cs プロジェクト: steffan88/Bevelle
 public Fence(Vector3Int position)
     : base(position, MapElementType.Fence, 1)
 {
     SetDimentions(new Vector3Int(1, 1, 1));
     AddMapElement(0, 0, 0, new FenceMapElement(position));
     NeededForCrafting.Add(MapElementType.Plank, 1);
     CraftPoints = 0;
     CraftPointsNeeded = 100;
     UpdateMapElementAlpha();
 }