示例#1
0
文件: Cube.cs 项目: steffan88/Bevelle
 public Cube(MapElementType type, Vector3Int position)
     : base(position)
 {
     ElementType = type;
     ElementEffect = MapElementEffect.Solid;
     Unconstructed = false;
 }
示例#2
0
 public WoodChairMapElement(Vector3Int position)
     : base(position)
 {
     TileType = Map.TileType.WoodChair;
     ElementType = MapElementType.WoodChair;
     ElementEffect = MapElementEffect.Nonmoveable;
 }
示例#3
0
        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;
        }
示例#4
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;
            }
        }
示例#5
0
 public BuildingDummy(Vector3Int position)
     : base(position, MapElementType.None, 1)
 {
     Dimentions = new Vector3Int(1, 1, 1);
     ElementType = MapElementType.BuildingDummy;
     ElementEffect = MapElementEffect.Nonmoveable;
 }
示例#6
0
 public IronOreMapElement(Vector3Int position)
     : base(position)
 {
     TileType = Map.TileType.IronOre;
     ElementType = MapElementType.IronOre;
     ElementEffect = MapElementEffect.Moveable;
 }
示例#7
0
 public WheatMapElement(Vector3Int position)
     : base(position)
 {
     TileType = Map.TileType.Wheat;
     ElementType = MapElementType.Wheat;
     ElementEffect = MapElementEffect.Nonmoveable;
 }
示例#8
0
文件: Coal.cs 项目: steffan88/Bevelle
 public Coal(Vector3Int position, int level)
     : base(position, MapElementType.Coal, level)
 {
     SetDimentions(new Vector3Int(1, 1, 1));
      AddMapElement(0, 0, 0, new StoneMapElement(position));
     Weight = MapElementWeight.Heavy;
 }
示例#9
0
 public LumberMapElement(Vector3Int position)
     : base(position)
 {
     TileType = Map.TileType.Lumber;
     ElementType = MapElementType.Lumber;
     ElementEffect = MapElementEffect.Moveable;
 }
示例#10
0
 public RailMapElement(Vector3Int position)
     : base(position)
 {
     TileType = Map.TileType.Rail;
     ElementType = MapElementType.Rail;
     ElementEffect = MapElementEffect.Nonmoveable;
 }
示例#11
0
 public PlankMapElement(Vector3Int position)
     : base(position)
 {
     TileType = Map.TileType.Plank;
     ElementType = MapElementType.Plank;
     ElementEffect = MapElementEffect.Moveable;
 }
示例#12
0
 public StoneBrickMapElement(Vector3Int position)
     : base(position)
 {
     TileType = Map.TileType.Tree;
     ElementType = MapElementType.StoneBrick;
     ElementEffect = MapElementEffect.Moveable;
 }
示例#13
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();
 }
示例#14
0
 public FenceMapElement(Vector3Int position)
     : base(position)
 {
     TileType = Map.TileType.Fence;
     ElementType = MapElementType.Fence;
     ElementEffect = MapElementEffect.Nonmoveable;
 }
示例#15
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();
 }
示例#16
0
 public CropMapElement(Vector3Int position, CropsType type)
     : base(position)
 {
     TileType = Map.TileType.NoCrop;
     ElementType = MapElementType.Crop;
     ElementEffect = MapElementEffect.Nonmoveable;
     CropType = type;
 }
示例#17
0
 public WorldObject(Vector3Int position, MapElementType type, int level)
 {
     Id = Guid.NewGuid();
     Level = level;
     ElementType = type;
     Position = position;
     NeededForCrafting = new Dictionary<MapElementType, int>();
 }
示例#18
0
 public SteamEngine(Vector3Int position)
     : base(position, MapElementType.SteamEngine, 1)
 {
     SetDimentions(new Vector3Int(3, 3, 1));
     CraftPoints = 0;
     CraftPointsNeeded = 100;
     UpdateMapElementAlpha();
 }
示例#19
0
 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();
 }
示例#20
0
 public Cheese(Vector3Int position, int level)
     : base(position, MapElementType.Cheese, level)
 {
     SetDimentions(new Vector3Int(1, 1, 1));
     AddMapElement(0, 0, 0, new WheatMapElement(position));
     CraftPoints = 0;
     CraftPointsNeeded = 100;
     Type = FoodType.Meal;
     UpdateMapElementAlpha();
 }
示例#21
0
 public Tomato(Vector3Int position)
     : base(position, MapElementType.Tomato, 1)
 {
     SetDimentions(new Vector3Int(1, 1, 1));
     AddMapElement(0, 0, 0, new WheatMapElement(position));
     CraftPoints = 100;
     CraftPointsNeeded = 100;
     Type = FoodType.Fruit;
     UpdateMapElementAlpha();
 }
示例#22
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();
 }
示例#23
0
 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();
 }
示例#24
0
 public TungstenOre(Vector3Int position, int level)
     : base(position, MapElementType.TungstenOre, level)
 {
     SetDimentions(new Vector3Int(1, 1, 1));
     CraftPoints = 0;
     CraftPointsNeeded = 100;
     AddMapElement(0, 0, 0, new IronOreMapElement(position));
     UpdateMapElementAlpha();
     Weight = MapElementWeight.Heavy;
 }
示例#25
0
 public PigMeat(Vector3Int position)
     : base(position, MapElementType.PigMeat, 1)
 {
     SetDimentions(new Vector3Int(1, 1, 1));
     AddMapElement(0, 0, 0, new WheatMapElement(position));
     CraftPoints = 0;
     CraftPointsNeeded = 100;
     Type = FoodType.Meat;
     UpdateMapElementAlpha();
 }
示例#26
0
        public MechanicWorkshop(Vector3Int position, int constructionPoints)
            : base(position, constructionPoints, BuildingType.MechanicWorkshop)
        {
            SetDimentions(new Vector3Int(3, 3, 1));

            NeededConstructionPoints = 100;

            NeededForConstruction = new Dictionary<MapElementType, int>();
            NeededForConstruction.Add(MapElementType.Plank, 2);
            NeededForConstruction.Add(MapElementType.Stone, 2);
        }
示例#27
0
        public WhiteMushroom(Vector3Int position)
            : base(position, MapElementType.WhiteMushroom, 1)
        {
            SetDimentions(new Vector3Int(1, 1, 1));
            AddMapElement(0, 0, 0, new WheatMapElement(position));
            CraftPoints = 100;
            CraftPointsNeeded = 100;
            Type = FoodType.Mushroom;

            UpdateMapElementAlpha();
        }
示例#28
0
        public Smelter(Vector3Int position, int constructionPoints)
            : base(position, constructionPoints, BuildingType.Smelter)
        {
            SetDimentions(new Vector3Int(3, 3, 1));

            NeededConstructionPoints = 100;

            NeededForConstruction = new Dictionary<MapElementType, int>();
            NeededForConstruction.Add(MapElementType.Lumber, 2);
            NeededForConstruction.Add(MapElementType.Stone, 2);
        }
示例#29
0
 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();
     Weight = MapElementWeight.Heavy;
 }
示例#30
0
        public Arrow(Vector3Int position)
            : base(position, MapElementType.Arrow)
        {
            SetDimentions(new Vector3Int(1, 1, 1));
            AddMapElement(0, 0, 0, new WheatMapElement(position));

            NeededForCrafting.Add(MapElementType.Lumber, 1);

            CraftPoints = 0;
            CraftPointsNeeded = 100;
            UpdateMapElementAlpha();
        }