示例#1
0
  public Tent(int id, String nme) {
    super(id);
    // TODO Auto-generated constructor stub

    thumbnail = MapRenderer.Texture_Atlas.findRegion(nme);
    name = nme;
    type = InvObject.Type.BREAKABLE;
    HP = 3;
    collidable = false;
    ID = id;
    touchable = true;
    Breakable = true;
    needsGround = true;
    needsSolidPlacement = true;
    CraftingRequirements = "MAT_Tree_Brown 10 MAT_SpiderSilk 5";
    solid = false;
    Distance = 3;
    Price = 10;

    save =
        new MessageBoxButton("Save") {

          @Override
          public void onClicked(int... args) {
            // TODO Auto-generated method stub

            Terrain.CurrentTerrain.SaveFlag = true;
          }
        };
  }
示例#2
0
 public GrapplingHook(int id, String nme) {
   super(id);
   // TODO Auto-generated constructor stub
   name = nme;
   descName = "Grappling Hook";
   thumbnail = MapRenderer.Texture_Atlas.findRegion(nme);
   type = InvObject.Type.HELD;
   Distance = 7;
   ATK = 10;
   Delay = 60;
   DefaultMine = false;
   HoldTouch = false;
   batch = new SpriteBatch();
   MaxLen = 5;
   Grabpos = new Vector2();
   bounds = new Rectangle();
   Price = 20;
 }