예제 #1
0
파일: Def.cs 프로젝트: sjschaff/rimlite
 public AtlasDef(string defName, string file, int pixelsPerTile, int pixelsPerUnit)
     : base("BB:Atlas", defName)
 {
     BB.Assert(pixelsPerUnit > pixelsPerTile);
     BB.Assert((pixelsPerUnit % pixelsPerTile) == 0);
     this.file          = file;
     this.pixelsPerTile = pixelsPerTile;
     this.pixelsPerUnit = pixelsPerUnit;
     this.tilesPerUnit  = pixelsPerUnit / pixelsPerTile;
 }
예제 #2
0
파일: Def.cs 프로젝트: sjschaff/rimlite
        public TerrainDef(string defName, string name,
                          AtlasDef atlas, Vec2I[] spriteFrames, bool passable = true)
            : base("BB:Terrain", defName, name)
        {
            BB.Assert(spriteFrames != null);
            BB.Assert(spriteFrames.Length > 0);

            this.atlas        = atlas;
            this.spriteFrames = spriteFrames;
            this.passable     = passable;
        }
예제 #3
0
파일: Def.cs 프로젝트: sjschaff/rimlite
 public BldgWorkbenchDef(
     string defName, string name,
     BuildingBounds bounds, Vec2I workSpot,
     SpriteDef spriteDown, SpriteDef spriteRight,
     ItemInfo[] materials,
     RecipeDef[] recipes)
     : base("BB:Workbench", defName, name)
 {
     BB.Assert(bounds.IsAdjacent(workSpot));
     this.bounds      = bounds;
     this.workSpot    = workSpot;
     this.spriteDown  = spriteDown;
     this.spriteRight = spriteRight;
     this.materials   = materials;
     this.recipes     = recipes;
 }
예제 #4
0
 public override void AbandonWork(Work work)
 {
     BB.Assert(activeWork == work);
     activeWork = null;
 }
예제 #5
0
파일: Def.cs 프로젝트: sjschaff/rimlite
 public void Register(TDef def)
 {
     BB.Assert(!defs.ContainsKey(def.defName));
     defs.Add(def.defName, def);
 }