handle 4 corner walls
This commit is contained in:
@@ -89,6 +89,19 @@ class ScenData {
|
||||
sprite.loadGraphicFromSprite(sheet);
|
||||
sprite.animation.frameIndex = td.which_icon;
|
||||
|
||||
|
||||
// ADDED: stamp an icon on another one (for corner walls)
|
||||
if (td.stamp_icon != -1) {
|
||||
var stampSprite = new FlxSprite();
|
||||
stampSprite.loadGraphicFromSprite(sheet);
|
||||
stampSprite.animation.frameIndex = td.stamp_icon;
|
||||
var stampedSprite = new FlxSprite(-92/4, -110/4);
|
||||
stampedSprite.makeGraphic(92, 110, FlxColor.TRANSPARENT, true);
|
||||
stampedSprite.stamp(sprite, Std.int(92/4)+td.icon_offset_x, Std.int(110/4)+td.icon_offset_y);
|
||||
stampedSprite.stamp(stampSprite, Std.int(92/4)+td.stamp_icon_offset_x, Std.int(110/4)+td.stamp_icon_offset_y);
|
||||
return stampedSprite;
|
||||
}
|
||||
|
||||
sprite.x += td.icon_offset_x;
|
||||
sprite.y += td.icon_offset_y;
|
||||
|
||||
|
@@ -79,14 +79,18 @@ class TerrainData {
|
||||
public var default_script:String = "Unused";
|
||||
public var which_sheet:Int = 0;
|
||||
public var which_icon:Int = 0;
|
||||
public var icon_offset_x:Int = 0;
|
||||
public var icon_offset_y:Int = 0;
|
||||
// ADDED: stamp_icon for handling some corner walls
|
||||
public var stamp_icon:Int = -1;
|
||||
public var stamp_icon_offset_x:Int = 0;
|
||||
public var stamp_icon_offset_y:Int = 0;
|
||||
public var icon_adjust:Int = 0;
|
||||
public var ed_which_sheet:Int = 0;
|
||||
public var ed_which_icon:Int = 0;
|
||||
public var cutaway_which_sheet:Int = -1;
|
||||
public var cutaway_which_icon:Int = 0;
|
||||
public var cutaway_icon_adjust:Int = 0;
|
||||
public var icon_offset_x:Int = 0;
|
||||
public var icon_offset_y:Int = 0;
|
||||
public var second_icon:Int = -1;
|
||||
public var second_icon_offset_x:Int = 0;
|
||||
public var second_icon_offset_y:Int = 0;
|
||||
|
Reference in New Issue
Block a user