Merge pull request #401 from aaronfranke/2d
Update the rest of the 2D demos for Godot 3.1.2
@@ -1,52 +1,50 @@
|
||||
extends Control
|
||||
|
||||
# The TL position of the canvas
|
||||
# A constant for whether or not we're needing to undo a shape.
|
||||
const UNDO_MODE_SHAPE = -2
|
||||
# A constant for whether or not we can undo.
|
||||
const UNDO_NONE = -1
|
||||
# How large is the image (it's actually the size of DrawingAreaBG, because that's our background canvas).
|
||||
const IMAGE_SIZE = Vector2(930, 720)
|
||||
|
||||
# Enums for the various modes and brush shapes that can be applied.
|
||||
enum BrushModes {
|
||||
PENCIL, ERASER, CIRCLE_SHAPE, RECTANGLE_SHAPE
|
||||
}
|
||||
enum BrushShapes {
|
||||
RECTANGLE, CIRCLE
|
||||
}
|
||||
|
||||
# The top-left position of the canvas.
|
||||
var TL_node
|
||||
|
||||
# A list to hold all of the dictionaries that make up each brush.
|
||||
var brush_data_list = []
|
||||
|
||||
# A boolean to hold whether or not the mouse is inside the drawing area, the mouse position last _process call
|
||||
# and the position of the mouse when the left mouse button was pressed
|
||||
# and the position of the mouse when the left mouse button was pressed.
|
||||
var is_mouse_in_drawing_area = false
|
||||
var last_mouse_pos = Vector2()
|
||||
var mouse_click_start_pos = null
|
||||
|
||||
# A boolean to tell whether we've set undo_elements_list_num, which holds the size of draw_elements_list
|
||||
# before a new stroke is added (unless the current brush mode is 'rectangle shape' or 'circle shape', in
|
||||
# which case we do things a litte differently. See the undo_stroke function for more details)
|
||||
# which case we do things a litte differently. See the undo_stroke function for more details).
|
||||
var undo_set = false
|
||||
var undo_element_list_num = -1
|
||||
|
||||
# A constant for whether or not we're needing to undo a shape
|
||||
const UNDO_MODE_SHAPE = -2
|
||||
# A constant for whether or not we can undo
|
||||
const UNDO_NONE = -1
|
||||
|
||||
# Enums for the various modes and brush shapes that can be applied
|
||||
enum BRUSH_MODES {
|
||||
pencil, eraser, circle_shape, rectangle_shape
|
||||
}
|
||||
enum BRUSH_SHAPES {
|
||||
rectangle, circle
|
||||
}
|
||||
|
||||
# The current brush settings: The mode, size, color, and shape we have currently selected
|
||||
var brush_mode = BRUSH_MODES.pencil
|
||||
# The current brush settings: The mode, size, color, and shape we have currently selected.
|
||||
var brush_mode = BrushModes.PENCIL
|
||||
var brush_size = 32
|
||||
var brush_color = Color(1, 1, 1, 1)
|
||||
var brush_shape = BRUSH_SHAPES.circle;
|
||||
var brush_color = Color.black
|
||||
var brush_shape = BrushShapes.CIRCLE;
|
||||
|
||||
# The color of the background. We need this for the eraser (see the how we handle the eraser
|
||||
# in the _draw function for more details)
|
||||
var bg_color = Color(1, 1, 1, 1)
|
||||
|
||||
# How large is the image (it's actually the size of DrawingAreaBG, because that's our background canvas)
|
||||
const IMAGE_SIZE = Vector2(930, 720)
|
||||
|
||||
# in the _draw function for more details).
|
||||
var bg_color = Color.white
|
||||
|
||||
func _ready():
|
||||
# Get the top left position node. We need this to find out whether or not the mouse is inside the canvas
|
||||
# Get the top left position node. We need this to find out whether or not the mouse is inside the canvas.
|
||||
TL_node = get_node("TLPos")
|
||||
set_process(true)
|
||||
|
||||
@@ -54,92 +52,92 @@ func _ready():
|
||||
func _process(_delta):
|
||||
var mouse_pos = get_viewport().get_mouse_position()
|
||||
|
||||
# Check if the mouse is currently inside the canvas/drawing-area
|
||||
# Check if the mouse is currently inside the canvas/drawing-area.
|
||||
is_mouse_in_drawing_area = false
|
||||
if mouse_pos.x > TL_node.global_position.x:
|
||||
if mouse_pos.y > TL_node.global_position.y:
|
||||
is_mouse_in_drawing_area = true
|
||||
|
||||
if Input.is_mouse_button_pressed(BUTTON_LEFT):
|
||||
# If we do not have a position for when the mouse was first clicked, then this most
|
||||
# If we do not have a position for when the mouse was first clicked, then this must
|
||||
# be the first time is_mouse_button_pressed has been called since the mouse button was
|
||||
# released, so we need to store the position
|
||||
# released, so we need to store the position.
|
||||
if mouse_click_start_pos == null:
|
||||
mouse_click_start_pos = mouse_pos
|
||||
|
||||
# If the mouse is inside the canvas and the mouse is 1px away from the position of the mouse last _process call
|
||||
# If the mouse is inside the canvas and the mouse is 1px away from the position of the mouse last _process call.
|
||||
if check_if_mouse_is_inside_canvas():
|
||||
if mouse_pos.distance_to(last_mouse_pos) >= 1:
|
||||
# If we are in pencil or eraser mode, then we need to draw
|
||||
if brush_mode == BRUSH_MODES.pencil or brush_mode == BRUSH_MODES.eraser:
|
||||
# If we are in pencil or eraser mode, then we need to draw.
|
||||
if brush_mode == BrushModes.PENCIL or brush_mode == BrushModes.ERASER:
|
||||
# If undo has not been set, meaning we've started a new stroke, then store the size of the
|
||||
# draw_elements_list so we can undo from this point in time
|
||||
# draw_elements_list so we can undo from this point in time.
|
||||
if undo_set == false:
|
||||
undo_set = true
|
||||
undo_element_list_num = brush_data_list.size()
|
||||
# Add the brush object to draw_elements_array
|
||||
# Add the brush object to draw_elements_array.
|
||||
add_brush(mouse_pos, brush_mode)
|
||||
|
||||
else:
|
||||
# We've finished our stroke, so we can set a new undo (if a new storke is made)
|
||||
# We've finished our stroke, so we can set a new undo (if a new storke is made).
|
||||
undo_set = false
|
||||
|
||||
# If the mouse is inside the canvas
|
||||
# If the mouse is inside the canvas.
|
||||
if check_if_mouse_is_inside_canvas():
|
||||
# If we're using either the circle shape mode, or the rectangle shape mode, then
|
||||
# add the brush object to draw_elements_array
|
||||
if brush_mode == BRUSH_MODES.circle_shape or brush_mode == BRUSH_MODES.rectangle_shape:
|
||||
# add the brush object to draw_elements_array.
|
||||
if brush_mode == BrushModes.CIRCLE_SHAPE or brush_mode == BrushModes.RECTANGLE_SHAPE:
|
||||
add_brush(mouse_pos, brush_mode)
|
||||
# We handle undo's differently than either pencil or eraser mode, so we need to set undo
|
||||
# element_list_num to -2 so we can tell if we need to undo a shape. See undo_stroke for details
|
||||
# element_list_num to -2 so we can tell if we need to undo a shape. See undo_stroke for details.
|
||||
undo_element_list_num = UNDO_MODE_SHAPE
|
||||
# Since we've released the left mouse, we need to get a new mouse_click_start_pos next time
|
||||
#is_mouse_button_pressed is true.
|
||||
mouse_click_start_pos = null
|
||||
|
||||
# Store mouse_pos as last_mouse_pos now that we're done with _process
|
||||
# Store mouse_pos as last_mouse_pos now that we're done with _process.
|
||||
last_mouse_pos = mouse_pos
|
||||
|
||||
|
||||
func check_if_mouse_is_inside_canvas():
|
||||
# Make sure we have a mouse click starting position
|
||||
# Make sure we have a mouse click starting position.
|
||||
if mouse_click_start_pos != null:
|
||||
# Make sure the mouse click starting position is inside the canvas.
|
||||
# This is so if we start out click outside the canvas (say chosing a color from the color picker)
|
||||
# and then move our mouse back into the canvas, it won't start painting
|
||||
# and then move our mouse back into the canvas, it won't start painting.
|
||||
if mouse_click_start_pos.x > TL_node.global_position.x:
|
||||
if mouse_click_start_pos.y > TL_node.global_position.y:
|
||||
# Make sure the current mouse position is inside the canvas
|
||||
# Make sure the current mouse position is inside the canvas.
|
||||
if is_mouse_in_drawing_area == true:
|
||||
return true
|
||||
return false
|
||||
|
||||
|
||||
func undo_stroke():
|
||||
# Only undo a stroke if we have one
|
||||
# Only undo a stroke if we have one.
|
||||
if undo_element_list_num == UNDO_NONE:
|
||||
return
|
||||
|
||||
# If we are undoing a shape, then we can just remove the latest brush
|
||||
# If we are undoing a shape, then we can just remove the latest brush.
|
||||
if undo_element_list_num == UNDO_MODE_SHAPE:
|
||||
if brush_data_list.size() > 0:
|
||||
brush_data_list.remove(brush_data_list.size() - 1)
|
||||
|
||||
# Now that we've undone a shape, we cannot undo again until another stoke is added
|
||||
# Now that we've undone a shape, we cannot undo again until another stoke is added.
|
||||
undo_element_list_num = UNDO_NONE
|
||||
# NOTE: if we only had shape brushes, then we could remove the above line and could let the user
|
||||
# undo until we have a empty element list
|
||||
# undo until we have a empty element list.
|
||||
|
||||
# Otherwise we're removing a either a pencil stroke or a eraser stroke.
|
||||
else:
|
||||
# Figure out how many elements/brushes we've added in the last stroke
|
||||
# Figure out how many elements/brushes we've added in the last stroke.
|
||||
var elements_to_remove = brush_data_list.size() - undo_element_list_num
|
||||
# Remove all of the elements we've added this in the last stroke
|
||||
# Remove all of the elements we've added this in the last stroke.
|
||||
#warning-ignore:unused_variable
|
||||
for elment_num in range(0, elements_to_remove):
|
||||
brush_data_list.pop_back()
|
||||
|
||||
# Now that we've undone a stoke, we cannot undo again until another stoke is added
|
||||
# Now that we've undone a stoke, we cannot undo again until another stoke is added.
|
||||
undo_element_list_num = UNDO_NONE
|
||||
|
||||
# Redraw the brushes
|
||||
@@ -159,12 +157,12 @@ func add_brush(mouse_pos, type):
|
||||
new_brush.brush_color = brush_color
|
||||
|
||||
# If the new bursh is a rectangle shape, we need to calculate the top left corner of the rectangle and the
|
||||
# bottom right corner of the rectangle
|
||||
if type == BRUSH_MODES.rectangle_shape:
|
||||
# bottom right corner of the rectangle.
|
||||
if type == BrushModes.RECTANGLE_SHAPE:
|
||||
var TL_pos = Vector2()
|
||||
var BR_pos = Vector2()
|
||||
|
||||
# Figure out the left and right positions of the corners and assign them to the proper variable
|
||||
# Figure out the left and right positions of the corners and assign them to the proper variable.
|
||||
if mouse_pos.x < mouse_click_start_pos.x:
|
||||
TL_pos.x = mouse_pos.x
|
||||
BR_pos.x = mouse_click_start_pos.x
|
||||
@@ -172,7 +170,7 @@ func add_brush(mouse_pos, type):
|
||||
TL_pos.x = mouse_click_start_pos.x
|
||||
BR_pos.x = mouse_pos.x
|
||||
|
||||
# Figure out the top and bottom positions of the corners and assign them to the proper variable
|
||||
# Figure out the top and bottom positions of the corners and assign them to the proper variable.
|
||||
if mouse_pos.y < mouse_click_start_pos.y:
|
||||
TL_pos.y = mouse_pos.y
|
||||
BR_pos.y = mouse_click_start_pos.y
|
||||
@@ -180,80 +178,72 @@ func add_brush(mouse_pos, type):
|
||||
TL_pos.y = mouse_click_start_pos.y
|
||||
BR_pos.y = mouse_pos.y
|
||||
|
||||
# Assign the positions to the brush
|
||||
# Assign the positions to the brush.
|
||||
new_brush.brush_pos = TL_pos
|
||||
new_brush.brush_shape_rect_pos_BR = BR_pos
|
||||
|
||||
# If the brush isa circle shape, then we need to calculate the radius of the circle
|
||||
if type == BRUSH_MODES.circle_shape:
|
||||
# Get the center point inbetween the mouse position and the position of the mouse when we clicked
|
||||
# If the brush isa circle shape, then we need to calculate the radius of the circle.
|
||||
if type == BrushModes.CIRCLE_SHAPE:
|
||||
# Get the center point inbetween the mouse position and the position of the mouse when we clicked.
|
||||
var center_pos = Vector2((mouse_pos.x + mouse_click_start_pos.x) / 2, (mouse_pos.y + mouse_click_start_pos.y) / 2)
|
||||
# Assign the brush position to the center point, and calculate the radius of the circle using the distance from
|
||||
# the center to the top/bottom positon of the mouse
|
||||
# the center to the top/bottom positon of the mouse.
|
||||
new_brush.brush_pos = center_pos
|
||||
new_brush.brush_shape_circle_radius = center_pos.distance_to(Vector2(center_pos.x, mouse_pos.y))
|
||||
|
||||
# Add the brush and update/draw all of the brushes
|
||||
# Add the brush and update/draw all of the brushes.
|
||||
brush_data_list.append(new_brush)
|
||||
update()
|
||||
|
||||
|
||||
func _draw():
|
||||
# Go through all of the brushes in brush_data_list
|
||||
# Go through all of the brushes in brush_data_list.
|
||||
for brush in brush_data_list:
|
||||
|
||||
# If the brush is a pencil
|
||||
if brush.brush_type == BRUSH_MODES.pencil:
|
||||
# If the brush shape is a rectangle, then we need to make a Rect2 so we can use draw_rect.
|
||||
# Draw_rect draws a rectagle at the top left corner, using the scale for the size.
|
||||
# So we offset the position by half of the brush size so the rectangle's center is at mouse position
|
||||
if brush.brush_shape == BRUSH_SHAPES.rectangle:
|
||||
var rect = Rect2(brush.brush_pos - Vector2(brush.brush_size / 2, brush.brush_size / 2), Vector2(brush.brush_size, brush.brush_size))
|
||||
match brush.brush_type:
|
||||
BrushModes.PENCIL:
|
||||
# If the brush shape is a rectangle, then we need to make a Rect2 so we can use draw_rect.
|
||||
# Draw_rect draws a rectagle at the top left corner, using the scale for the size.
|
||||
# So we offset the position by half of the brush size so the rectangle's center is at mouse position.
|
||||
if brush.brush_shape == BrushShapes.RECTANGLE:
|
||||
var rect = Rect2(brush.brush_pos - Vector2(brush.brush_size / 2, brush.brush_size / 2), Vector2(brush.brush_size, brush.brush_size))
|
||||
draw_rect(rect, brush.brush_color)
|
||||
# If the brush shape is a circle, then we draw a circle at the mouse position,
|
||||
# making the radius half of brush size (so the circle is brush size pixels in diameter).
|
||||
elif brush.brush_shape == BrushShapes.CIRCLE:
|
||||
draw_circle(brush.brush_pos, brush.brush_size / 2, brush.brush_color)
|
||||
BrushModes.ERASER:
|
||||
# NOTE: this is a really cheap way of erasing that isn't really erasing!
|
||||
# However, this gives similar results in a fairy simple way!
|
||||
|
||||
# Erasing works exactly the same was as pencil does for both the rectangle shape and the circle shape,
|
||||
# but instead of using brush.brush_color, we instead use bg_color instead.
|
||||
if brush.brush_shape == BrushShapes.RECTANGLE:
|
||||
var rect = Rect2(brush.brush_pos - Vector2(brush.brush_size / 2, brush.brush_size / 2), Vector2(brush.brush_size, brush.brush_size))
|
||||
draw_rect(rect, bg_color)
|
||||
elif brush.brush_shape == BrushShapes.CIRCLE:
|
||||
draw_circle(brush.brush_pos, brush.brush_size / 2, bg_color)
|
||||
BrushModes.RECTANGLE_SHAPE:
|
||||
# We make a Rect2 with the postion at the top left. To get the size we take the bottom right position
|
||||
# and subtract the top left corner's position.
|
||||
var rect = Rect2(brush.brush_pos, brush.brush_shape_rect_pos_BR - brush.brush_pos)
|
||||
draw_rect(rect, brush.brush_color)
|
||||
# If the brush shape is a circle, then we draw a circle at the mouse position,
|
||||
# making the radius half of brush size (so the circle is brush size pixels in diameter)
|
||||
elif brush.brush_shape == BRUSH_SHAPES.circle:
|
||||
draw_circle(brush.brush_pos, brush.brush_size / 2, brush.brush_color)
|
||||
|
||||
# If the brush is a eraser
|
||||
elif brush.brush_type == BRUSH_MODES.eraser:
|
||||
# NOTE: this is a really cheap way of erasing that isn't really erasing!
|
||||
# However, this gives similar results in a fairy simple way!
|
||||
|
||||
# Erasing works exactly the same was as pencil does for both the rectangle shape and the circle shape,
|
||||
# but instead of using brush.brush_color, we instead use bg_color instead.
|
||||
if brush.brush_shape == BRUSH_SHAPES.rectangle:
|
||||
var rect = Rect2(brush.brush_pos - Vector2(brush.brush_size / 2, brush.brush_size / 2), Vector2(brush.brush_size, brush.brush_size))
|
||||
draw_rect(rect, bg_color)
|
||||
elif brush.brush_shape == BRUSH_SHAPES.circle:
|
||||
draw_circle(brush.brush_pos, brush.brush_size / 2, bg_color)
|
||||
|
||||
# If the brush is a rectangle shape
|
||||
elif brush.brush_type == BRUSH_MODES.rectangle_shape:
|
||||
# We make a Rect2 with the postion at the top left. To get the size we take the bottom right position
|
||||
# and subtract the top left corner's position
|
||||
var rect = Rect2(brush.brush_pos, brush.brush_shape_rect_pos_BR - brush.brush_pos)
|
||||
draw_rect(rect, brush.brush_color)
|
||||
|
||||
# If the brush is a circle shape
|
||||
elif brush.brush_type == BRUSH_MODES.circle_shape:
|
||||
# We simply draw a circle using stored in brush
|
||||
draw_circle(brush.brush_pos, brush.brush_shape_circle_radius, brush.brush_color)
|
||||
BrushModes.CIRCLE_SHAPE:
|
||||
# We simply draw a circle using stored in brush.
|
||||
draw_circle(brush.brush_pos, brush.brush_shape_circle_radius, brush.brush_color)
|
||||
|
||||
|
||||
|
||||
func save_picture(path):
|
||||
# Wait a couple frames so the save dialog isn't in the way
|
||||
# Wait a couple frames so the save dialog isn't in the way.
|
||||
yield (get_tree(), "idle_frame")
|
||||
yield (get_tree(), "idle_frame")
|
||||
|
||||
# Get the viewport image
|
||||
# Get the viewport image.
|
||||
var img = get_viewport().get_texture().get_data()
|
||||
# Crop the image so we only have canvas area.
|
||||
var cropped_image = img.get_rect(Rect2(TL_node.global_position, IMAGE_SIZE))
|
||||
# Flip the image on the Y-axis (it's flipped upside down by default)
|
||||
# Flip the image on the Y-axis (it's flipped upside down by default).
|
||||
cropped_image.flip_y()
|
||||
|
||||
# Save the image with the passed in path we got from the save dialog
|
||||
# Save the image with the passed in path we got from the save dialog.
|
||||
cropped_image.save_png(path)
|
||||
|
||||
|
||||
34
2d/gd_paint/PaintTools.png.import
Normal file
@@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/PaintTools.png-636e86a6d210b52282c946752bbcc6f1.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://PaintTools.png"
|
||||
dest_files=[ "res://.import/PaintTools.png-636e86a6d210b52282c946752bbcc6f1.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/bptc_ldr=0
|
||||
compress/normal_map=0
|
||||
flags/repeat=0
|
||||
flags/filter=true
|
||||
flags/mipmaps=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
||||
@@ -37,7 +37,7 @@ margin_left = 20.0
|
||||
margin_top = 10.0
|
||||
margin_right = 330.0
|
||||
margin_bottom = 24.0
|
||||
text = "Selected tool: pencil"
|
||||
text = "Selected tool: Pencil"
|
||||
align = 1
|
||||
|
||||
[node name="ButtonToolPencil" type="Button" parent="ToolsPanel"]
|
||||
@@ -105,52 +105,59 @@ margin_left = 20.0
|
||||
margin_top = 140.0
|
||||
margin_right = 330.0
|
||||
margin_bottom = 190.0
|
||||
color = Color( 1, 1, 1, 1 )
|
||||
|
||||
[node name="LabelBrushSize" type="Label" parent="ToolsPanel"]
|
||||
[node name="BrushSettings" type="Control" parent="ToolsPanel"]
|
||||
margin_top = 200.0
|
||||
margin_right = 350.0
|
||||
margin_bottom = 375.0
|
||||
|
||||
[node name="LabelBrushSize" type="Label" parent="ToolsPanel/BrushSettings"]
|
||||
margin_left = 20.0
|
||||
margin_top = 210.0
|
||||
margin_top = 10.0
|
||||
margin_right = 330.0
|
||||
margin_bottom = 224.0
|
||||
margin_bottom = 24.0
|
||||
text = "Brush size: 32px"
|
||||
align = 1
|
||||
|
||||
[node name="HScrollBarBrushSize" type="HScrollBar" parent="ToolsPanel"]
|
||||
[node name="HScrollBarBrushSize" type="HScrollBar" parent="ToolsPanel/BrushSettings"]
|
||||
margin_left = 20.0
|
||||
margin_top = 230.0
|
||||
margin_top = 30.0
|
||||
margin_right = 330.0
|
||||
margin_bottom = 260.0
|
||||
min_value = 1.0
|
||||
margin_bottom = 60.0
|
||||
min_value = 2.0
|
||||
step = 1.0
|
||||
value = 32.0
|
||||
|
||||
[node name="LabelBrushShape" type="Label" parent="ToolsPanel"]
|
||||
[node name="LabelBrushShape" type="Label" parent="ToolsPanel/BrushSettings"]
|
||||
margin_left = 20.0
|
||||
margin_top = 280.0
|
||||
margin_top = 80.0
|
||||
margin_right = 330.0
|
||||
margin_bottom = 294.0
|
||||
text = "Brush shape: circle"
|
||||
margin_bottom = 94.0
|
||||
text = "Brush shape: Circle"
|
||||
align = 1
|
||||
|
||||
[node name="ButtonShapeBox" type="Button" parent="ToolsPanel"]
|
||||
[node name="ButtonShapeBox" type="Button" parent="ToolsPanel/BrushSettings"]
|
||||
editor/display_folded = true
|
||||
margin_left = 100.0
|
||||
margin_top = 300.0
|
||||
margin_top = 100.0
|
||||
margin_right = 160.0
|
||||
margin_bottom = 360.0
|
||||
margin_bottom = 160.0
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="ToolsPanel/ButtonShapeBox"]
|
||||
[node name="Sprite" type="Sprite" parent="ToolsPanel/BrushSettings/ButtonShapeBox"]
|
||||
position = Vector2( 30, 30 )
|
||||
scale = Vector2( 2.5, 2.5 )
|
||||
texture = ExtResource( 3 )
|
||||
region_enabled = true
|
||||
region_rect = Rect2( 0, 16, 16, 16 )
|
||||
|
||||
[node name="ButtonShapeCircle" type="Button" parent="ToolsPanel"]
|
||||
[node name="ButtonShapeCircle" type="Button" parent="ToolsPanel/BrushSettings"]
|
||||
editor/display_folded = true
|
||||
margin_left = 190.0
|
||||
margin_top = 300.0
|
||||
margin_top = 100.0
|
||||
margin_right = 250.0
|
||||
margin_bottom = 360.0
|
||||
margin_bottom = 160.0
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="ToolsPanel/ButtonShapeCircle"]
|
||||
[node name="Sprite" type="Sprite" parent="ToolsPanel/BrushSettings/ButtonShapeCircle"]
|
||||
position = Vector2( 30, 30 )
|
||||
scale = Vector2( 2.5, 2.5 )
|
||||
texture = ExtResource( 3 )
|
||||
@@ -209,5 +216,5 @@ margin_bottom = 400.0
|
||||
resizable = true
|
||||
access = 2
|
||||
filters = PoolStringArray( "*.png" )
|
||||
current_dir = "/home/ubuntu_noah/Documents/New_2019_GitHub_Repositories/godot-demo-projects/2d/gd_paint"
|
||||
current_path = "/home/ubuntu_noah/Documents/New_2019_GitHub_Repositories/godot-demo-projects/2d/gd_paint/"
|
||||
current_dir = "/home/aaronfranke/workspace/godot-demo-projects/2d/gd_paint"
|
||||
current_path = "/home/aaronfranke/workspace/godot-demo-projects/2d/gd_paint/"
|
||||
|
||||
@@ -1,83 +1,80 @@
|
||||
extends Panel
|
||||
|
||||
|
||||
var paint_control
|
||||
|
||||
var label_tools
|
||||
var label_brush_size
|
||||
var label_brush_shape
|
||||
var label_stats
|
||||
onready var brush_settings = $BrushSettings
|
||||
onready var label_tools = $LabelTools
|
||||
onready var label_brush_size = $BrushSettings/LabelBrushSize
|
||||
onready var label_brush_shape = $BrushSettings/LabelBrushShape
|
||||
onready var label_stats = $LabelStats
|
||||
|
||||
var save_dialog
|
||||
|
||||
|
||||
func _ready():
|
||||
# Get PaintControl and SaveFileDialog
|
||||
# Get PaintControl and SaveFileDialog.
|
||||
paint_control = get_parent().get_node("PaintControl")
|
||||
save_dialog = get_parent().get_node("SaveFileDialog")
|
||||
|
||||
# warning-ignore-all:return_value_discarded
|
||||
# Assign all of the needed signals for the oppersation buttons
|
||||
get_node("ButtonUndo").connect("pressed", self, "button_pressed", ["undo_stroke"])
|
||||
get_node("ButtonSave").connect("pressed", self, "button_pressed", ["save_picture"])
|
||||
get_node("ButtonClear").connect("pressed", self, "button_pressed", ["clear_picture"])
|
||||
# Assign all of the needed signals for the oppersation buttons.
|
||||
$ButtonUndo.connect("pressed", self, "button_pressed", ["undo_stroke"])
|
||||
$ButtonSave.connect("pressed", self, "button_pressed", ["save_picture"])
|
||||
$ButtonClear.connect("pressed", self, "button_pressed", ["clear_picture"])
|
||||
|
||||
# Assign all of the needed signals for the brush buttons
|
||||
get_node("ButtonToolPencil").connect("pressed", self, "button_pressed", ["mode_pencil"])
|
||||
get_node("ButtonToolEraser").connect("pressed", self, "button_pressed", ["mode_eraser"])
|
||||
get_node("ButtonToolRectangle").connect("pressed", self, "button_pressed", ["mode_rectangle"])
|
||||
get_node("ButtonToolCircle").connect("pressed", self, "button_pressed", ["mode_circle"])
|
||||
get_node("ButtonShapeBox").connect("pressed", self, "button_pressed", ["shape_rectangle"])
|
||||
get_node("ButtonShapeCircle").connect("pressed", self, "button_pressed", ["shape_circle"])
|
||||
# Assign all of the needed signals for the brush buttons.
|
||||
$ButtonToolPencil.connect("pressed", self, "button_pressed", ["mode_pencil"])
|
||||
$ButtonToolEraser.connect("pressed", self, "button_pressed", ["mode_eraser"])
|
||||
$ButtonToolRectangle.connect("pressed", self, "button_pressed", ["mode_rectangle"])
|
||||
$ButtonToolCircle.connect("pressed", self, "button_pressed", ["mode_circle"])
|
||||
$BrushSettings/ButtonShapeBox.connect("pressed", self, "button_pressed", ["shape_rectangle"])
|
||||
$BrushSettings/ButtonShapeCircle.connect("pressed", self, "button_pressed", ["shape_circle"])
|
||||
|
||||
# Assign all of the needed signals for the other brush settings (and ColorPickerBackground)
|
||||
get_node("ColorPickerBrush").connect("color_changed", self, "brush_color_changed")
|
||||
get_node("ColorPickerBackground").connect("color_changed", self, "background_color_changed")
|
||||
get_node("HScrollBarBrushSize").connect("value_changed", self, "brush_size_changed")
|
||||
# Assign all of the needed signals for the other brush settings (and ColorPickerBackground).
|
||||
$ColorPickerBrush.connect("color_changed", self, "brush_color_changed")
|
||||
$ColorPickerBackground.connect("color_changed", self, "background_color_changed")
|
||||
$BrushSettings/HScrollBarBrushSize.connect("value_changed", self, "brush_size_changed")
|
||||
|
||||
# Assign the 'file_selected' signal in SaveFileDialog
|
||||
# Assign the 'file_selected' signal in SaveFileDialog.
|
||||
save_dialog.connect("file_selected", self, "save_file_selected")
|
||||
|
||||
# Get all of the labels so we can update them when settings change
|
||||
label_tools = get_node("LabelTools")
|
||||
label_brush_size = get_node("LabelBrushSize")
|
||||
label_brush_shape = get_node("LabelBrushShape")
|
||||
label_stats = get_node("LabelStats")
|
||||
|
||||
# Set physics process so we can update the status label
|
||||
# Set physics process so we can update the status label.
|
||||
set_physics_process(true)
|
||||
|
||||
|
||||
func _physics_process(_delta):
|
||||
# Update the status label with the newest brush element count
|
||||
# Update the status label with the newest brush element count.
|
||||
label_stats.text = "Brush objects: " + String(paint_control.brush_data_list.size())
|
||||
|
||||
|
||||
func button_pressed(button_name):
|
||||
# If a brush mode button is pressed
|
||||
# If a brush mode button is pressed.
|
||||
var tool_name = null
|
||||
var shape_name = null
|
||||
|
||||
if button_name == "mode_pencil":
|
||||
paint_control.brush_mode = paint_control.BRUSH_MODES.pencil
|
||||
tool_name = "pencil"
|
||||
paint_control.brush_mode = paint_control.BrushModes.PENCIL
|
||||
brush_settings.modulate = Color(1, 1, 1, 1)
|
||||
tool_name = "Pencil"
|
||||
elif button_name == "mode_eraser":
|
||||
paint_control.brush_mode = paint_control.BRUSH_MODES.eraser
|
||||
tool_name = "eraser"
|
||||
paint_control.brush_mode = paint_control.BrushModes.ERASER
|
||||
brush_settings.modulate = Color(1, 1, 1, 1)
|
||||
tool_name = "Eraser"
|
||||
elif button_name == "mode_rectangle":
|
||||
paint_control.brush_mode = paint_control.BRUSH_MODES.rectangle_shape
|
||||
tool_name = "rectangle shape"
|
||||
paint_control.brush_mode = paint_control.BrushModes.RECTANGLE_SHAPE
|
||||
brush_settings.modulate = Color(1, 1, 1, 0.5)
|
||||
tool_name = "Rectangle shape"
|
||||
elif button_name == "mode_circle":
|
||||
paint_control.brush_mode = paint_control.BRUSH_MODES.circle_shape
|
||||
tool_name = "circle shape"
|
||||
paint_control.brush_mode = paint_control.BrushModes.CIRCLE_SHAPE
|
||||
brush_settings.modulate = Color(1, 1, 1, 0.5)
|
||||
tool_name = "Circle shape"
|
||||
|
||||
# If a brush shape button is pressed
|
||||
elif button_name == "shape_rectangle":
|
||||
paint_control.brush_shape = paint_control.BRUSH_SHAPES.rectangle
|
||||
shape_name = "rectangle"
|
||||
paint_control.brush_shape = paint_control.BrushShapes.RECTANGLE
|
||||
shape_name = "Rectangle"
|
||||
elif button_name == "shape_circle":
|
||||
paint_control.brush_shape = paint_control.BRUSH_SHAPES.circle
|
||||
shape_name = "circle";
|
||||
paint_control.brush_shape = paint_control.BrushShapes.CIRCLE
|
||||
shape_name = "Circle";
|
||||
|
||||
# If a opperation button is pressed
|
||||
elif button_name == "clear_picture":
|
||||
@@ -88,7 +85,7 @@ func button_pressed(button_name):
|
||||
elif button_name == "undo_stroke":
|
||||
paint_control.undo_stroke()
|
||||
|
||||
# Update the labels (in case the brush mode or brush shape has changed)
|
||||
# Update the labels (in case the brush mode or brush shape has changed).
|
||||
if tool_name != null:
|
||||
label_tools.text = "Selected tool: " + tool_name
|
||||
if shape_name != null:
|
||||
@@ -96,25 +93,24 @@ func button_pressed(button_name):
|
||||
|
||||
|
||||
func brush_color_changed(color):
|
||||
# Change the brush color to whatever color the color picker is
|
||||
# Change the brush color to whatever color the color picker is.
|
||||
paint_control.brush_color = color
|
||||
|
||||
|
||||
func background_color_changed(color):
|
||||
# Change the background color to whatever colorthe background color picker is
|
||||
# Change the background color to whatever colorthe background color picker is.
|
||||
get_parent().get_node("DrawingAreaBG").modulate = color
|
||||
paint_control.bg_color = color
|
||||
# Because of how the eraser works we also need to redraw the paint control
|
||||
# Because of how the eraser works we also need to redraw the paint control.
|
||||
paint_control.update()
|
||||
|
||||
|
||||
func brush_size_changed(value):
|
||||
# Change the size of the brush, and update the label to reflect the new value
|
||||
# Change the size of the brush, and update the label to reflect the new value.
|
||||
paint_control.brush_size = ceil(value)
|
||||
label_brush_size.text = "Brush size: " + String(ceil(value)) + "px"
|
||||
|
||||
|
||||
func save_file_selected(path):
|
||||
# Call save_picture in paint_control, passing in the path we recieved from SaveFileDialog
|
||||
# Call save_picture in paint_control, passing in the path we recieved from SaveFileDialog.
|
||||
paint_control.save_picture(path)
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
extends TileMap
|
||||
|
||||
enum CellType { EMPTY = -1, ACTOR, OBSTACLE, OBJECT}
|
||||
enum CellType { EMPTY = -1, ACTOR, OBSTACLE, OBJECT }
|
||||
|
||||
func _ready():
|
||||
for child in get_children():
|
||||
|
||||
@@ -82,4 +82,3 @@ position = Vector2( 1.43051e-06, -1.90735e-06 )
|
||||
texture = ExtResource( 2 )
|
||||
centered = false
|
||||
offset = Vector2( -32, -32 )
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
extends "pawn.gd"
|
||||
|
||||
onready var Grid = get_parent()
|
||||
onready var grid = get_parent()
|
||||
|
||||
func _ready():
|
||||
update_look_direction(Vector2(1, 0))
|
||||
update_look_direction(Vector2.RIGHT)
|
||||
|
||||
|
||||
func _process(_delta):
|
||||
@@ -12,7 +12,7 @@ func _process(_delta):
|
||||
return
|
||||
update_look_direction(input_direction)
|
||||
|
||||
var target_position = Grid.request_move(self, input_direction)
|
||||
var target_position = grid.request_move(self, input_direction)
|
||||
if target_position:
|
||||
move_to(target_position)
|
||||
else:
|
||||
@@ -21,8 +21,8 @@ func _process(_delta):
|
||||
|
||||
func get_input_direction():
|
||||
return Vector2(
|
||||
int(Input.is_action_pressed("ui_right")) - int(Input.is_action_pressed("ui_left")),
|
||||
int(Input.is_action_pressed("ui_down")) - int(Input.is_action_pressed("ui_up"))
|
||||
Input.get_action_strength("move_right") - Input.get_action_strength("move_left"),
|
||||
Input.get_action_strength("move_down") - Input.get_action_strength("move_up")
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
extends Node2D
|
||||
|
||||
enum CellType { ACTOR, OBSTACLE, OBJECT }
|
||||
#warning-ignore:unused_class_variable
|
||||
export(CellType) var type = CellType.ACTOR
|
||||
|
||||
@@ -26,6 +26,41 @@ window/size/height=720
|
||||
window/stretch/mode="2d"
|
||||
window/stretch/aspect="expand"
|
||||
|
||||
[input]
|
||||
|
||||
move_right={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":68,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777233,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":15,"pressure":0.0,"pressed":false,"script":null)
|
||||
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":0,"axis_value":1.0,"script":null)
|
||||
]
|
||||
}
|
||||
move_left={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":65,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777231,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":14,"pressure":0.0,"pressed":false,"script":null)
|
||||
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":0,"axis_value":-1.0,"script":null)
|
||||
]
|
||||
}
|
||||
move_down={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":83,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777234,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":13,"pressure":0.0,"pressed":false,"script":null)
|
||||
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":1,"axis_value":1.0,"script":null)
|
||||
]
|
||||
}
|
||||
move_up={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":87,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777232,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":12,"pressure":0.0,"pressed":false,"script":null)
|
||||
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":1,"axis_value":-1.0,"script":null)
|
||||
]
|
||||
}
|
||||
|
||||
[rendering]
|
||||
|
||||
environment/default_environment="res://default_env.tres"
|
||||
|
||||
@@ -17,4 +17,3 @@ texture = ExtResource( 2 )
|
||||
[node name="Object" type="Sprite" parent="."]
|
||||
position = Vector2( 160, 32 )
|
||||
texture = ExtResource( 3 )
|
||||
|
||||
|
||||
@@ -7,4 +7,3 @@
|
||||
[node name="Grass" type="Sprite" parent="."]
|
||||
position = Vector2( 32, 32 )
|
||||
texture = ExtResource( 1 )
|
||||
|
||||
|
||||
@@ -1,17 +1,16 @@
|
||||
|
||||
extends Node2D
|
||||
|
||||
# Member variables
|
||||
const CAVE_LIMIT = 1000
|
||||
|
||||
onready var cave = $Cave
|
||||
|
||||
func _input(event):
|
||||
if event is InputEventMouseMotion and event.button_mask&1:
|
||||
if event is InputEventMouseMotion and event.button_mask > 0:
|
||||
var rel_x = event.relative.x
|
||||
var cavepos = $cave.position
|
||||
var cavepos = cave.position
|
||||
cavepos.x += rel_x
|
||||
if cavepos.x < -CAVE_LIMIT:
|
||||
cavepos.x = -CAVE_LIMIT
|
||||
elif cavepos.x > 0:
|
||||
cavepos.x = 0
|
||||
$cave.position = cavepos
|
||||
cave.position = cavepos
|
||||
|
||||
@@ -19,10 +19,10 @@ glow_strength = 0.88
|
||||
glow_blend_mode = 0
|
||||
glow_bicubic_upscale = true
|
||||
|
||||
[node name="hdr" type="Node2D"]
|
||||
[node name="BeachCave" type="Node2D"]
|
||||
script = ExtResource( 1 )
|
||||
|
||||
[node name="beach" type="Sprite" parent="."]
|
||||
[node name="Beach" type="Sprite" parent="."]
|
||||
modulate = Color( 2, 2, 2, 1 )
|
||||
self_modulate = Color( 2, 2, 2, 1 )
|
||||
texture = ExtResource( 2 )
|
||||
@@ -30,13 +30,13 @@ centered = false
|
||||
region_enabled = true
|
||||
region_rect = Rect2( 0, 0, 3840, 720 )
|
||||
|
||||
[node name="cave" type="Sprite" parent="."]
|
||||
[node name="Cave" type="Sprite" parent="."]
|
||||
self_modulate = Color( 0.233166, 0.221219, 0.23582, 1 )
|
||||
scale = Vector2( 1.2, 1 )
|
||||
texture = ExtResource( 3 )
|
||||
centered = false
|
||||
|
||||
[node name="environment" type="WorldEnvironment" parent="."]
|
||||
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
|
||||
environment = SubResource( 1 )
|
||||
|
||||
[node name="Camera2D" type="Camera2D" parent="."]
|
||||
|
||||
|
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 20 KiB |
@@ -3,16 +3,15 @@
|
||||
[ext_resource path="res://tileset.tres" type="TileSet" id=1]
|
||||
[ext_resource path="res://troll.tscn" type="PackedScene" id=2]
|
||||
|
||||
[node name="Node2D" type="Node2D"]
|
||||
[node name="Map" type="Node2D"]
|
||||
|
||||
[node name="TileMap" type="TileMap" parent="."]
|
||||
tile_set = ExtResource( 1 )
|
||||
cell_size = Vector2( 82, 94 )
|
||||
cell_half_offset = 1
|
||||
cell_tile_origin = 1
|
||||
centered_textures = true
|
||||
format = 1
|
||||
tile_data = PoolIntArray( -458747, 0, 0, -458746, 0, 0, -393212, 0, 0, -393211, 0, 0, -393210, 0, 0, -393209, 0, 0, -393208, 0, 0, -393207, 0, 0, -327678, 0, 0, -327677, 0, 0, -327676, 0, 0, -327675, 6, 0, -327674, 6, 0, -327673, 6, 0, -327672, 6, 0, -327671, 0, 0, -327670, 0, 0, -327669, 0, 0, -262142, 0, 0, -262141, 0, 0, -262140, 6, 0, -262139, 6, 0, -262138, 6, 0, -262137, 6, 0, -262136, 6, 0, -262135, 0, 0, -262134, 0, 0, -262133, 0, 0, -262132, 0, 0, -262131, 0, -1200553578, -196606, 0, 0, -196605, 0, 0, -196604, 6, 0, -196603, 6, 0, -196602, 6, 0, -196601, 6, 0, -196600, 1, 0, -196599, 0, 0, -196598, 1, 0, -196597, 1, 0, -196596, 0, 0, -196595, 0, -1200553578, -196594, 0, -1200553578, -131071, 9, 0, -131070, 0, 0, -131069, 0, 0, -131068, 2, 0, -131067, 2, 0, -131066, 0, 0, -131065, 21, 0, -131064, 19, 0, -131063, 0, 0, -131062, 0, 0, -131061, 16, -1200553578, -131060, 0, -1200553578, -131059, 0, 0, -131058, 0, 0, -131057, 0, 0, -131056, 0, -1200553578, -65534, 0, 0, -65533, 1, 0, -65532, 0, 0, -65531, 0, 0, -65530, 20, 0, -65529, 19, 0, -65528, 2, 0, -65527, 0, 0, -65526, 14, 0, -65525, 0, -1200553578, -65524, 0, 0, -65523, 0, 0, -65522, 23, 0, -65521, 0, 0, -65520, 0, -1200553578, -65519, 0, -1200553578, 3, 1, 0, 4, 2, 0, 5, 0, 0, 6, 1, 0, 7, 1, -1200553578, 8, 0, -1200553578, 9, 10, -1200553578, 10, 12, -1200553578, 11, 0, -1200553578, 12, 0, 0, 13, 8, 0, 14, 0, 0, 15, 0, 0, 16, 0, 0, 17, 0, 0, 65538, 0, -1200553578, 65539, 0, 0, 65540, 2, 0, 65541, 0, 0, 65542, 1, 0, 65543, 15, -1200553578, 65544, 0, 0, 65545, 0, 0, 65546, 0, 0, 65547, 0, 0, 65548, 0, 0, 65549, 25, 0, 65550, 8, 0, 65551, 0, 0, 65552, 21, 0, 65553, 0, 0, 131074, 0, -1200553578, 131075, 1, 0, 131076, 0, 0, 131077, 1, 0, 131078, 0, 0, 131079, 0, 0, 131080, 0, 0, 131081, 5, 0, 131082, 0, 0, 131083, 0, 0, 131084, 0, 0, 131085, 0, 0, 131086, 0, 0, 131087, 0, 0, 131088, 0, 0, 131089, 0, 0, 196610, 0, -1200553578, 196611, 0, 0, 196612, 0, 0, 196613, 23, 0, 196614, 0, 0, 196615, 0, 0, 196616, 0, 0, 196617, 5, 0, 196618, 5, 0, 196619, 0, 0, 196620, 0, 0, 196621, 0, 0, 196622, 0, 0, 196623, 23, 0, 196624, 0, 0, 262148, 0, 0, 262149, 0, 0, 262150, 0, 0, 262151, 0, 0, 262152, 8, 0, 262153, 5, 0, 262154, 5, 0, 262155, 0, 0, 262156, 0, 0, 262157, 21, 0, 262158, 0, 0, 262159, 0, 0, 262160, 0, 0, 327686, 0, 0, 327687, 0, 0, 327688, 0, 0, 327689, 0, 0, 327690, 0, 0, 327691, 0, 0, 327692, 0, 0, 327693, 0, 0, 327694, 0, 0 )
|
||||
|
||||
[node name="troll" parent="." instance=ExtResource( 2 )]
|
||||
[node name="Troll" parent="." instance=ExtResource( 2 )]
|
||||
position = Vector2( 602.819, -39.2876 )
|
||||
|
||||
@@ -31,24 +31,36 @@ singletons=[ ]
|
||||
|
||||
[input]
|
||||
|
||||
move_bottom={
|
||||
move_down={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777234,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":83,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":13,"pressure":0.0,"pressed":false,"script":null)
|
||||
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":1,"axis_value":1.0,"script":null)
|
||||
]
|
||||
}
|
||||
move_left={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777231,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":65,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":14,"pressure":0.0,"pressed":false,"script":null)
|
||||
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":0,"axis_value":-1.0,"script":null)
|
||||
]
|
||||
}
|
||||
move_right={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777233,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":68,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":15,"pressure":0.0,"pressed":false,"script":null)
|
||||
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":0,"axis_value":1.0,"script":null)
|
||||
]
|
||||
}
|
||||
move_up={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777232,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":87,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":12,"pressure":0.0,"pressed":false,"script":null)
|
||||
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":1,"axis_value":-1.0,"script":null)
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
@@ -2,15 +2,15 @@
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/WWT-01.png-d71b23a59ce633973e2216144d4c3cc7.stex"
|
||||
path="res://.import/WWT-01.png-a74af26d994adfc547572b5b9c0c4034.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://WWT-01.png"
|
||||
dest_files=[ "res://.import/WWT-01.png-d71b23a59ce633973e2216144d4c3cc7.stex" ]
|
||||
source_file="res://tiles/WWT-01.png"
|
||||
dest_files=[ "res://.import/WWT-01.png-a74af26d994adfc547572b5b9c0c4034.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
@@ -2,15 +2,15 @@
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/WWT-02.png-8c7a76bab1a896763ab37f5a7bf77904.stex"
|
||||
path="res://.import/WWT-02.png-9a9ae8a623554db2531366e8a06b737a.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://WWT-02.png"
|
||||
dest_files=[ "res://.import/WWT-02.png-8c7a76bab1a896763ab37f5a7bf77904.stex" ]
|
||||
source_file="res://tiles/WWT-02.png"
|
||||
dest_files=[ "res://.import/WWT-02.png-9a9ae8a623554db2531366e8a06b737a.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
@@ -2,15 +2,15 @@
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/WWT-03.png-f804f0fa409c5c9ad521581b65c67f26.stex"
|
||||
path="res://.import/WWT-03.png-111a68b27c5234ed5719f8591af32a0c.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://WWT-03.png"
|
||||
dest_files=[ "res://.import/WWT-03.png-f804f0fa409c5c9ad521581b65c67f26.stex" ]
|
||||
source_file="res://tiles/WWT-03.png"
|
||||
dest_files=[ "res://.import/WWT-03.png-111a68b27c5234ed5719f8591af32a0c.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
@@ -2,15 +2,15 @@
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/WWT-04.png-a50f93109e34b533b1855a7ef46475b2.stex"
|
||||
path="res://.import/WWT-04.png-f26081179f39965c61294d932b10ab21.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://WWT-04.png"
|
||||
dest_files=[ "res://.import/WWT-04.png-a50f93109e34b533b1855a7ef46475b2.stex" ]
|
||||
source_file="res://tiles/WWT-04.png"
|
||||
dest_files=[ "res://.import/WWT-04.png-f26081179f39965c61294d932b10ab21.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
@@ -2,15 +2,15 @@
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/WWT-05.png-deee12124c9c3ab8368902f7733ff079.stex"
|
||||
path="res://.import/WWT-05.png-744e3aac04e57d14153c9ab15d0f478b.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://WWT-05.png"
|
||||
dest_files=[ "res://.import/WWT-05.png-deee12124c9c3ab8368902f7733ff079.stex" ]
|
||||
source_file="res://tiles/WWT-05.png"
|
||||
dest_files=[ "res://.import/WWT-05.png-744e3aac04e57d14153c9ab15d0f478b.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
@@ -2,15 +2,15 @@
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/WWT-06.png-a16b61cdadeeed4ab2c9f5eec8b79c7c.stex"
|
||||
path="res://.import/WWT-06.png-42fd05901daa928f55c39f581f1c698b.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://WWT-06.png"
|
||||
dest_files=[ "res://.import/WWT-06.png-a16b61cdadeeed4ab2c9f5eec8b79c7c.stex" ]
|
||||
source_file="res://tiles/WWT-06.png"
|
||||
dest_files=[ "res://.import/WWT-06.png-42fd05901daa928f55c39f581f1c698b.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
@@ -2,15 +2,15 @@
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/WWT-07.png-7cc4023daef4567752735bf79f2ccd12.stex"
|
||||
path="res://.import/WWT-07.png-8e87a5146f132f36aecf29c26d16ff69.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://WWT-07.png"
|
||||
dest_files=[ "res://.import/WWT-07.png-7cc4023daef4567752735bf79f2ccd12.stex" ]
|
||||
source_file="res://tiles/WWT-07.png"
|
||||
dest_files=[ "res://.import/WWT-07.png-8e87a5146f132f36aecf29c26d16ff69.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
@@ -2,15 +2,15 @@
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/WWT-08.png-7eaf3eb568b0293e3b28374e0bcfdf76.stex"
|
||||
path="res://.import/WWT-08.png-9ab3b0ed6304c6b282e0c1c2866f4c65.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://WWT-08.png"
|
||||
dest_files=[ "res://.import/WWT-08.png-7eaf3eb568b0293e3b28374e0bcfdf76.stex" ]
|
||||
source_file="res://tiles/WWT-08.png"
|
||||
dest_files=[ "res://.import/WWT-08.png-9ab3b0ed6304c6b282e0c1c2866f4c65.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
@@ -2,15 +2,15 @@
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/WWT-09.png-05c1bd2bd71982b595886c84d0655094.stex"
|
||||
path="res://.import/WWT-09.png-c899d1db7b10c4bc6e5c8ad44627c439.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://WWT-09.png"
|
||||
dest_files=[ "res://.import/WWT-09.png-05c1bd2bd71982b595886c84d0655094.stex" ]
|
||||
source_file="res://tiles/WWT-09.png"
|
||||
dest_files=[ "res://.import/WWT-09.png-c899d1db7b10c4bc6e5c8ad44627c439.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
@@ -2,15 +2,15 @@
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/WWT-10.png-21f5bebc271347b73cd120c7671bcc04.stex"
|
||||
path="res://.import/WWT-10.png-c7e17e1ca741da0752bae015501fa73f.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://WWT-10.png"
|
||||
dest_files=[ "res://.import/WWT-10.png-21f5bebc271347b73cd120c7671bcc04.stex" ]
|
||||
source_file="res://tiles/WWT-10.png"
|
||||
dest_files=[ "res://.import/WWT-10.png-c7e17e1ca741da0752bae015501fa73f.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
@@ -2,15 +2,15 @@
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/WWT-11.png-c278f158b8ebe9b98a71fa01d357ea55.stex"
|
||||
path="res://.import/WWT-11.png-109af6474e89a87a4598cb99f608a4f7.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://WWT-11.png"
|
||||
dest_files=[ "res://.import/WWT-11.png-c278f158b8ebe9b98a71fa01d357ea55.stex" ]
|
||||
source_file="res://tiles/WWT-11.png"
|
||||
dest_files=[ "res://.import/WWT-11.png-109af6474e89a87a4598cb99f608a4f7.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
@@ -2,15 +2,15 @@
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/WWT-12.png-f99f6470cbf7469390137cc1b1eac0b1.stex"
|
||||
path="res://.import/WWT-12.png-dfbf3da77ce636a3e88f9e62405a950b.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://WWT-12.png"
|
||||
dest_files=[ "res://.import/WWT-12.png-f99f6470cbf7469390137cc1b1eac0b1.stex" ]
|
||||
source_file="res://tiles/WWT-12.png"
|
||||
dest_files=[ "res://.import/WWT-12.png-dfbf3da77ce636a3e88f9e62405a950b.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
@@ -2,15 +2,15 @@
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/WWT-13.png-b831a7b68dbcdd483e454623cca7af6a.stex"
|
||||
path="res://.import/WWT-13.png-cef8d6fe42386e917ad3aa9b9c54f031.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://WWT-13.png"
|
||||
dest_files=[ "res://.import/WWT-13.png-b831a7b68dbcdd483e454623cca7af6a.stex" ]
|
||||
source_file="res://tiles/WWT-13.png"
|
||||
dest_files=[ "res://.import/WWT-13.png-cef8d6fe42386e917ad3aa9b9c54f031.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
@@ -2,15 +2,15 @@
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/WWT-14.png-473aa39bbfdbf2d9ac37478ba67ab5a8.stex"
|
||||
path="res://.import/WWT-14.png-b9075987807eba6a461b896e310a1b8a.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://WWT-14.png"
|
||||
dest_files=[ "res://.import/WWT-14.png-473aa39bbfdbf2d9ac37478ba67ab5a8.stex" ]
|
||||
source_file="res://tiles/WWT-14.png"
|
||||
dest_files=[ "res://.import/WWT-14.png-b9075987807eba6a461b896e310a1b8a.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
@@ -2,15 +2,15 @@
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/WWT-15.png-f958cd09bdaf7066eb31dea2b35a59fe.stex"
|
||||
path="res://.import/WWT-15.png-00500699e949fc7109f5946f459a9877.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://WWT-15.png"
|
||||
dest_files=[ "res://.import/WWT-15.png-f958cd09bdaf7066eb31dea2b35a59fe.stex" ]
|
||||
source_file="res://tiles/WWT-15.png"
|
||||
dest_files=[ "res://.import/WWT-15.png-00500699e949fc7109f5946f459a9877.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
@@ -2,15 +2,15 @@
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/WWT-16.png-1027e2a388bf820efb40bb630699acf6.stex"
|
||||
path="res://.import/WWT-16.png-fbcd640a627612e528382718aecef7c7.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://WWT-16.png"
|
||||
dest_files=[ "res://.import/WWT-16.png-1027e2a388bf820efb40bb630699acf6.stex" ]
|
||||
source_file="res://tiles/WWT-16.png"
|
||||
dest_files=[ "res://.import/WWT-16.png-fbcd640a627612e528382718aecef7c7.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
@@ -2,15 +2,15 @@
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/WWT-17.png-06a724fd2ea7c875038b30870c815f35.stex"
|
||||
path="res://.import/WWT-17.png-eb18073021ced526bfb8971a84830c46.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://WWT-17.png"
|
||||
dest_files=[ "res://.import/WWT-17.png-06a724fd2ea7c875038b30870c815f35.stex" ]
|
||||
source_file="res://tiles/WWT-17.png"
|
||||
dest_files=[ "res://.import/WWT-17.png-eb18073021ced526bfb8971a84830c46.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
@@ -2,15 +2,15 @@
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/WWT-18.png-a7a95e5daf469fc05529f5c4d9ffd83f.stex"
|
||||
path="res://.import/WWT-18.png-82273bf41643f8f544a05cdc2226c3b8.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://WWT-18.png"
|
||||
dest_files=[ "res://.import/WWT-18.png-a7a95e5daf469fc05529f5c4d9ffd83f.stex" ]
|
||||
source_file="res://tiles/WWT-18.png"
|
||||
dest_files=[ "res://.import/WWT-18.png-82273bf41643f8f544a05cdc2226c3b8.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
@@ -2,15 +2,15 @@
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/WWT-19.png-e53561a49d2426c56b7463fcfe7187ad.stex"
|
||||
path="res://.import/WWT-19.png-5894de00e931e36aaec31583c3ddce5c.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://WWT-19.png"
|
||||
dest_files=[ "res://.import/WWT-19.png-e53561a49d2426c56b7463fcfe7187ad.stex" ]
|
||||
source_file="res://tiles/WWT-19.png"
|
||||
dest_files=[ "res://.import/WWT-19.png-5894de00e931e36aaec31583c3ddce5c.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
@@ -2,15 +2,15 @@
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/WWT-20.png-fa22d2cbc86525aa67ed5be2eb766f38.stex"
|
||||
path="res://.import/WWT-20.png-88080834968c597a14e2fa47d72452ca.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://WWT-20.png"
|
||||
dest_files=[ "res://.import/WWT-20.png-fa22d2cbc86525aa67ed5be2eb766f38.stex" ]
|
||||
source_file="res://tiles/WWT-20.png"
|
||||
dest_files=[ "res://.import/WWT-20.png-88080834968c597a14e2fa47d72452ca.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
@@ -2,15 +2,15 @@
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/WWT-21.png-0650363bb3b67f7ad8ea91f2ed66a86c.stex"
|
||||
path="res://.import/WWT-21.png-390238468871139dc33ef039ad919c91.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://WWT-21.png"
|
||||
dest_files=[ "res://.import/WWT-21.png-0650363bb3b67f7ad8ea91f2ed66a86c.stex" ]
|
||||
source_file="res://tiles/WWT-21.png"
|
||||
dest_files=[ "res://.import/WWT-21.png-390238468871139dc33ef039ad919c91.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
@@ -2,15 +2,15 @@
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/WWT-22.png-15702d71f9ada16455bd5ec251efa392.stex"
|
||||
path="res://.import/WWT-22.png-61b6f2ffc488560cd737af0df3a2aff4.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://WWT-22.png"
|
||||
dest_files=[ "res://.import/WWT-22.png-15702d71f9ada16455bd5ec251efa392.stex" ]
|
||||
source_file="res://tiles/WWT-22.png"
|
||||
dest_files=[ "res://.import/WWT-22.png-61b6f2ffc488560cd737af0df3a2aff4.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
@@ -2,15 +2,15 @@
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/WWT-23.png-b96b4e3e762993c848a02a5920369963.stex"
|
||||
path="res://.import/WWT-23.png-67ddb05725964560ee768025fb1ace6c.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://WWT-23.png"
|
||||
dest_files=[ "res://.import/WWT-23.png-b96b4e3e762993c848a02a5920369963.stex" ]
|
||||
source_file="res://tiles/WWT-23.png"
|
||||
dest_files=[ "res://.import/WWT-23.png-67ddb05725964560ee768025fb1ace6c.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
@@ -2,15 +2,15 @@
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/WWT-24.png-51252af7231f3c2108e03f43e485e5c9.stex"
|
||||
path="res://.import/WWT-24.png-f708ede817cd745747bd03a5050d20d7.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://WWT-24.png"
|
||||
dest_files=[ "res://.import/WWT-24.png-51252af7231f3c2108e03f43e485e5c9.stex" ]
|
||||
source_file="res://tiles/WWT-24.png"
|
||||
dest_files=[ "res://.import/WWT-24.png-f708ede817cd745747bd03a5050d20d7.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
@@ -2,15 +2,15 @@
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/WWT-25.png-db9bd847f53180c4b408ac5fe5509089.stex"
|
||||
path="res://.import/WWT-25.png-8d42552ab8c27a7d4782e3da8de397f1.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://WWT-25.png"
|
||||
dest_files=[ "res://.import/WWT-25.png-db9bd847f53180c4b408ac5fe5509089.stex" ]
|
||||
source_file="res://tiles/WWT-25.png"
|
||||
dest_files=[ "res://.import/WWT-25.png-8d42552ab8c27a7d4782e3da8de397f1.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
@@ -2,15 +2,15 @@
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/WWT-26.png-58e5c6364a04c3baa8d4707bfd79d68c.stex"
|
||||
path="res://.import/WWT-26.png-317f2102fb6abd09801389544f53c0e1.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://WWT-26.png"
|
||||
dest_files=[ "res://.import/WWT-26.png-58e5c6364a04c3baa8d4707bfd79d68c.stex" ]
|
||||
source_file="res://tiles/WWT-26.png"
|
||||
dest_files=[ "res://.import/WWT-26.png-317f2102fb6abd09801389544f53c0e1.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
@@ -1,240 +1,290 @@
|
||||
[gd_resource type="TileSet" load_steps=27 format=2]
|
||||
|
||||
[ext_resource path="res://WWT-01.png" type="Texture" id=1]
|
||||
[ext_resource path="res://WWT-02.png" type="Texture" id=2]
|
||||
[ext_resource path="res://WWT-11.png" type="Texture" id=3]
|
||||
[ext_resource path="res://WWT-12.png" type="Texture" id=4]
|
||||
[ext_resource path="res://WWT-13.png" type="Texture" id=5]
|
||||
[ext_resource path="res://WWT-14.png" type="Texture" id=6]
|
||||
[ext_resource path="res://WWT-15.png" type="Texture" id=7]
|
||||
[ext_resource path="res://WWT-16.png" type="Texture" id=8]
|
||||
[ext_resource path="res://WWT-17.png" type="Texture" id=9]
|
||||
[ext_resource path="res://WWT-18.png" type="Texture" id=10]
|
||||
[ext_resource path="res://WWT-19.png" type="Texture" id=11]
|
||||
[ext_resource path="res://WWT-20.png" type="Texture" id=12]
|
||||
[ext_resource path="res://WWT-03.png" type="Texture" id=13]
|
||||
[ext_resource path="res://WWT-21.png" type="Texture" id=14]
|
||||
[ext_resource path="res://WWT-22.png" type="Texture" id=15]
|
||||
[ext_resource path="res://WWT-23.png" type="Texture" id=16]
|
||||
[ext_resource path="res://WWT-24.png" type="Texture" id=17]
|
||||
[ext_resource path="res://WWT-25.png" type="Texture" id=18]
|
||||
[ext_resource path="res://WWT-26.png" type="Texture" id=19]
|
||||
[ext_resource path="res://WWT-04.png" type="Texture" id=20]
|
||||
[ext_resource path="res://WWT-05.png" type="Texture" id=21]
|
||||
[ext_resource path="res://WWT-06.png" type="Texture" id=22]
|
||||
[ext_resource path="res://WWT-07.png" type="Texture" id=23]
|
||||
[ext_resource path="res://WWT-08.png" type="Texture" id=24]
|
||||
[ext_resource path="res://WWT-09.png" type="Texture" id=25]
|
||||
[ext_resource path="res://WWT-10.png" type="Texture" id=26]
|
||||
[ext_resource path="res://tiles/WWT-01.png" type="Texture" id=1]
|
||||
[ext_resource path="res://tiles/WWT-02.png" type="Texture" id=2]
|
||||
[ext_resource path="res://tiles/WWT-11.png" type="Texture" id=3]
|
||||
[ext_resource path="res://tiles/WWT-12.png" type="Texture" id=4]
|
||||
[ext_resource path="res://tiles/WWT-13.png" type="Texture" id=5]
|
||||
[ext_resource path="res://tiles/WWT-14.png" type="Texture" id=6]
|
||||
[ext_resource path="res://tiles/WWT-15.png" type="Texture" id=7]
|
||||
[ext_resource path="res://tiles/WWT-16.png" type="Texture" id=8]
|
||||
[ext_resource path="res://tiles/WWT-17.png" type="Texture" id=9]
|
||||
[ext_resource path="res://tiles/WWT-18.png" type="Texture" id=10]
|
||||
[ext_resource path="res://tiles/WWT-19.png" type="Texture" id=11]
|
||||
[ext_resource path="res://tiles/WWT-20.png" type="Texture" id=12]
|
||||
[ext_resource path="res://tiles/WWT-03.png" type="Texture" id=13]
|
||||
[ext_resource path="res://tiles/WWT-21.png" type="Texture" id=14]
|
||||
[ext_resource path="res://tiles/WWT-22.png" type="Texture" id=15]
|
||||
[ext_resource path="res://tiles/WWT-23.png" type="Texture" id=16]
|
||||
[ext_resource path="res://tiles/WWT-24.png" type="Texture" id=17]
|
||||
[ext_resource path="res://tiles/WWT-25.png" type="Texture" id=18]
|
||||
[ext_resource path="res://tiles/WWT-26.png" type="Texture" id=19]
|
||||
[ext_resource path="res://tiles/WWT-04.png" type="Texture" id=20]
|
||||
[ext_resource path="res://tiles/WWT-05.png" type="Texture" id=21]
|
||||
[ext_resource path="res://tiles/WWT-06.png" type="Texture" id=22]
|
||||
[ext_resource path="res://tiles/WWT-07.png" type="Texture" id=23]
|
||||
[ext_resource path="res://tiles/WWT-08.png" type="Texture" id=24]
|
||||
[ext_resource path="res://tiles/WWT-09.png" type="Texture" id=25]
|
||||
[ext_resource path="res://tiles/WWT-10.png" type="Texture" id=26]
|
||||
|
||||
[resource]
|
||||
|
||||
0/name = "Tile 1"
|
||||
0/name = "Tile1"
|
||||
0/texture = ExtResource( 1 )
|
||||
0/tex_offset = Vector2( 0, 0 )
|
||||
0/modulate = Color( 1, 1, 1, 1 )
|
||||
0/region = Rect2( 0, 0, 128, 128 )
|
||||
0/tile_mode = 0
|
||||
0/occluder_offset = Vector2( 0, 0 )
|
||||
0/navigation_offset = Vector2( 0, 0 )
|
||||
0/shapes = [ ]
|
||||
1/name = "Tile 2"
|
||||
0/z_index = 0
|
||||
1/name = "Tile2"
|
||||
1/texture = ExtResource( 2 )
|
||||
1/tex_offset = Vector2( 0, 0 )
|
||||
1/modulate = Color( 1, 1, 1, 1 )
|
||||
1/region = Rect2( 0, 0, 128, 128 )
|
||||
1/tile_mode = 0
|
||||
1/occluder_offset = Vector2( 0, 0 )
|
||||
1/navigation_offset = Vector2( 0, 0 )
|
||||
1/shapes = [ ]
|
||||
2/name = "Tile 3"
|
||||
1/z_index = 0
|
||||
2/name = "Tile3"
|
||||
2/texture = ExtResource( 13 )
|
||||
2/tex_offset = Vector2( 0, 0 )
|
||||
2/modulate = Color( 1, 1, 1, 1 )
|
||||
2/region = Rect2( 0, 0, 128, 128 )
|
||||
2/tile_mode = 0
|
||||
2/occluder_offset = Vector2( 0, 0 )
|
||||
2/navigation_offset = Vector2( 0, 0 )
|
||||
2/shapes = [ ]
|
||||
3/name = "Tile 4"
|
||||
2/z_index = 0
|
||||
3/name = "Tile4"
|
||||
3/texture = ExtResource( 20 )
|
||||
3/tex_offset = Vector2( 0, 0 )
|
||||
3/modulate = Color( 1, 1, 1, 1 )
|
||||
3/region = Rect2( 0, 0, 128, 128 )
|
||||
3/tile_mode = 0
|
||||
3/occluder_offset = Vector2( 0, 0 )
|
||||
3/navigation_offset = Vector2( 0, 0 )
|
||||
3/shapes = [ ]
|
||||
4/name = "Tile 5"
|
||||
3/z_index = 0
|
||||
4/name = "Tile5"
|
||||
4/texture = ExtResource( 21 )
|
||||
4/tex_offset = Vector2( 0, 0 )
|
||||
4/modulate = Color( 1, 1, 1, 1 )
|
||||
4/region = Rect2( 0, 0, 128, 128 )
|
||||
4/tile_mode = 0
|
||||
4/occluder_offset = Vector2( 0, 0 )
|
||||
4/navigation_offset = Vector2( 0, 0 )
|
||||
4/shapes = [ ]
|
||||
5/name = "Tile 6"
|
||||
4/z_index = 0
|
||||
5/name = "Tile6"
|
||||
5/texture = ExtResource( 22 )
|
||||
5/tex_offset = Vector2( 0, 0 )
|
||||
5/modulate = Color( 1, 1, 1, 1 )
|
||||
5/region = Rect2( 0, 0, 128, 128 )
|
||||
5/tile_mode = 0
|
||||
5/occluder_offset = Vector2( 0, 0 )
|
||||
5/navigation_offset = Vector2( 0, 0 )
|
||||
5/shapes = [ ]
|
||||
6/name = "Tile 7"
|
||||
5/z_index = 0
|
||||
6/name = "Tile7"
|
||||
6/texture = ExtResource( 23 )
|
||||
6/tex_offset = Vector2( 0, 0 )
|
||||
6/modulate = Color( 1, 1, 1, 1 )
|
||||
6/region = Rect2( 0, 0, 128, 128 )
|
||||
6/tile_mode = 0
|
||||
6/occluder_offset = Vector2( 0, 0 )
|
||||
6/navigation_offset = Vector2( 0, 0 )
|
||||
6/shapes = [ ]
|
||||
7/name = "Tile 8"
|
||||
6/z_index = 0
|
||||
7/name = "Tile8"
|
||||
7/texture = ExtResource( 24 )
|
||||
7/tex_offset = Vector2( 0, 0 )
|
||||
7/modulate = Color( 1, 1, 1, 1 )
|
||||
7/region = Rect2( 0, 0, 128, 128 )
|
||||
7/tile_mode = 0
|
||||
7/occluder_offset = Vector2( 0, 0 )
|
||||
7/navigation_offset = Vector2( 0, 0 )
|
||||
7/shapes = [ ]
|
||||
8/name = "Tile 9"
|
||||
7/z_index = 0
|
||||
8/name = "Tile9"
|
||||
8/texture = ExtResource( 25 )
|
||||
8/tex_offset = Vector2( 0, 0 )
|
||||
8/modulate = Color( 1, 1, 1, 1 )
|
||||
8/region = Rect2( 0, 0, 128, 128 )
|
||||
8/tile_mode = 0
|
||||
8/occluder_offset = Vector2( 0, 0 )
|
||||
8/navigation_offset = Vector2( 0, 0 )
|
||||
8/shapes = [ ]
|
||||
9/name = "Tile 10"
|
||||
8/z_index = 0
|
||||
9/name = "Tile10"
|
||||
9/texture = ExtResource( 26 )
|
||||
9/tex_offset = Vector2( 0, 0 )
|
||||
9/modulate = Color( 1, 1, 1, 1 )
|
||||
9/region = Rect2( 0, 0, 128, 128 )
|
||||
9/tile_mode = 0
|
||||
9/occluder_offset = Vector2( 0, 0 )
|
||||
9/navigation_offset = Vector2( 0, 0 )
|
||||
9/shapes = [ ]
|
||||
10/name = "Tile 11"
|
||||
9/z_index = 0
|
||||
10/name = "Tile11"
|
||||
10/texture = ExtResource( 3 )
|
||||
10/tex_offset = Vector2( 0, 0 )
|
||||
10/modulate = Color( 1, 1, 1, 1 )
|
||||
10/region = Rect2( 0, 0, 128, 128 )
|
||||
10/tile_mode = 0
|
||||
10/occluder_offset = Vector2( 0, 0 )
|
||||
10/navigation_offset = Vector2( 0, 0 )
|
||||
10/shapes = [ ]
|
||||
11/name = "Tile 12"
|
||||
10/z_index = 0
|
||||
11/name = "Tile12"
|
||||
11/texture = ExtResource( 4 )
|
||||
11/tex_offset = Vector2( 0, 0 )
|
||||
11/modulate = Color( 1, 1, 1, 1 )
|
||||
11/region = Rect2( 0, 0, 128, 128 )
|
||||
11/tile_mode = 0
|
||||
11/occluder_offset = Vector2( 0, 0 )
|
||||
11/navigation_offset = Vector2( 0, 0 )
|
||||
11/shapes = [ ]
|
||||
12/name = "Tile 13"
|
||||
11/z_index = 0
|
||||
12/name = "Tile13"
|
||||
12/texture = ExtResource( 5 )
|
||||
12/tex_offset = Vector2( 0, 0 )
|
||||
12/modulate = Color( 1, 1, 1, 1 )
|
||||
12/region = Rect2( 0, 0, 128, 128 )
|
||||
12/tile_mode = 0
|
||||
12/occluder_offset = Vector2( 0, 0 )
|
||||
12/navigation_offset = Vector2( 0, 0 )
|
||||
12/shapes = [ ]
|
||||
13/name = "Tile 14"
|
||||
12/z_index = 0
|
||||
13/name = "Tile14"
|
||||
13/texture = ExtResource( 6 )
|
||||
13/tex_offset = Vector2( 0, 0 )
|
||||
13/modulate = Color( 1, 1, 1, 1 )
|
||||
13/region = Rect2( 0, 0, 128, 128 )
|
||||
13/tile_mode = 0
|
||||
13/occluder_offset = Vector2( 0, 0 )
|
||||
13/navigation_offset = Vector2( 0, 0 )
|
||||
13/shapes = [ ]
|
||||
14/name = "Tile 15"
|
||||
13/z_index = 0
|
||||
14/name = "Tile15"
|
||||
14/texture = ExtResource( 7 )
|
||||
14/tex_offset = Vector2( 0, 0 )
|
||||
14/modulate = Color( 1, 1, 1, 1 )
|
||||
14/region = Rect2( 0, 0, 128, 128 )
|
||||
14/tile_mode = 0
|
||||
14/occluder_offset = Vector2( 0, 0 )
|
||||
14/navigation_offset = Vector2( 0, 0 )
|
||||
14/shapes = [ ]
|
||||
15/name = "Tile 16"
|
||||
14/z_index = 0
|
||||
15/name = "Tile16"
|
||||
15/texture = ExtResource( 8 )
|
||||
15/tex_offset = Vector2( 0, 0 )
|
||||
15/modulate = Color( 1, 1, 1, 1 )
|
||||
15/region = Rect2( 0, 0, 128, 128 )
|
||||
15/tile_mode = 0
|
||||
15/occluder_offset = Vector2( 0, 0 )
|
||||
15/navigation_offset = Vector2( 0, 0 )
|
||||
15/shapes = [ ]
|
||||
16/name = "Tile 17"
|
||||
15/z_index = 0
|
||||
16/name = "Tile17"
|
||||
16/texture = ExtResource( 9 )
|
||||
16/tex_offset = Vector2( 0, 0 )
|
||||
16/modulate = Color( 1, 1, 1, 1 )
|
||||
16/region = Rect2( 0, 0, 128, 128 )
|
||||
16/tile_mode = 0
|
||||
16/occluder_offset = Vector2( 0, 0 )
|
||||
16/navigation_offset = Vector2( 0, 0 )
|
||||
16/shapes = [ ]
|
||||
17/name = "Tile 18"
|
||||
16/z_index = 0
|
||||
17/name = "Tile18"
|
||||
17/texture = ExtResource( 10 )
|
||||
17/tex_offset = Vector2( 0, 0 )
|
||||
17/modulate = Color( 1, 1, 1, 1 )
|
||||
17/region = Rect2( 0, 0, 128, 128 )
|
||||
17/tile_mode = 0
|
||||
17/occluder_offset = Vector2( 0, 0 )
|
||||
17/navigation_offset = Vector2( 0, 0 )
|
||||
17/shapes = [ ]
|
||||
18/name = "Tile 19"
|
||||
17/z_index = 0
|
||||
18/name = "Tile19"
|
||||
18/texture = ExtResource( 11 )
|
||||
18/tex_offset = Vector2( 0, 0 )
|
||||
18/modulate = Color( 1, 1, 1, 1 )
|
||||
18/region = Rect2( 0, 0, 128, 128 )
|
||||
18/tile_mode = 0
|
||||
18/occluder_offset = Vector2( 0, 0 )
|
||||
18/navigation_offset = Vector2( 0, 0 )
|
||||
18/shapes = [ ]
|
||||
19/name = "Tile 20"
|
||||
18/z_index = 0
|
||||
19/name = "Tile20"
|
||||
19/texture = ExtResource( 12 )
|
||||
19/tex_offset = Vector2( 0, 0 )
|
||||
19/modulate = Color( 1, 1, 1, 1 )
|
||||
19/region = Rect2( 0, 0, 128, 128 )
|
||||
19/tile_mode = 0
|
||||
19/occluder_offset = Vector2( 0, 0 )
|
||||
19/navigation_offset = Vector2( 0, 0 )
|
||||
19/shapes = [ ]
|
||||
20/name = "Tile 21"
|
||||
19/z_index = 0
|
||||
20/name = "Tile21"
|
||||
20/texture = ExtResource( 14 )
|
||||
20/tex_offset = Vector2( 0, 0 )
|
||||
20/modulate = Color( 1, 1, 1, 1 )
|
||||
20/region = Rect2( 0, 0, 128, 128 )
|
||||
20/tile_mode = 0
|
||||
20/occluder_offset = Vector2( 0, 0 )
|
||||
20/navigation_offset = Vector2( 0, 0 )
|
||||
20/shapes = [ ]
|
||||
21/name = "Tile 22"
|
||||
20/z_index = 0
|
||||
21/name = "Tile22"
|
||||
21/texture = ExtResource( 15 )
|
||||
21/tex_offset = Vector2( 0, 0 )
|
||||
21/modulate = Color( 1, 1, 1, 1 )
|
||||
21/region = Rect2( 0, 0, 128, 128 )
|
||||
21/tile_mode = 0
|
||||
21/occluder_offset = Vector2( 0, 0 )
|
||||
21/navigation_offset = Vector2( 0, 0 )
|
||||
21/shapes = [ ]
|
||||
22/name = "Tile 23"
|
||||
21/z_index = 0
|
||||
22/name = "Tile23"
|
||||
22/texture = ExtResource( 16 )
|
||||
22/tex_offset = Vector2( 0, 0 )
|
||||
22/modulate = Color( 1, 1, 1, 1 )
|
||||
22/region = Rect2( 0, 0, 128, 128 )
|
||||
22/tile_mode = 0
|
||||
22/occluder_offset = Vector2( 0, 0 )
|
||||
22/navigation_offset = Vector2( 0, 0 )
|
||||
22/shapes = [ ]
|
||||
23/name = "Tile 24"
|
||||
22/z_index = 0
|
||||
23/name = "Tile24"
|
||||
23/texture = ExtResource( 17 )
|
||||
23/tex_offset = Vector2( 0, 0 )
|
||||
23/modulate = Color( 1, 1, 1, 1 )
|
||||
23/region = Rect2( 0, 0, 128, 128 )
|
||||
23/tile_mode = 0
|
||||
23/occluder_offset = Vector2( 0, 0 )
|
||||
23/navigation_offset = Vector2( 0, 0 )
|
||||
23/shapes = [ ]
|
||||
24/name = "Tile 25"
|
||||
23/z_index = 0
|
||||
24/name = "Tile25"
|
||||
24/texture = ExtResource( 18 )
|
||||
24/tex_offset = Vector2( 0, 0 )
|
||||
24/modulate = Color( 1, 1, 1, 1 )
|
||||
24/region = Rect2( 0, 0, 128, 128 )
|
||||
24/tile_mode = 0
|
||||
24/occluder_offset = Vector2( 0, 0 )
|
||||
24/navigation_offset = Vector2( 0, 0 )
|
||||
24/shapes = [ ]
|
||||
25/name = "Tile 26"
|
||||
24/z_index = 0
|
||||
25/name = "Tile26"
|
||||
25/texture = ExtResource( 19 )
|
||||
25/tex_offset = Vector2( 0, 0 )
|
||||
25/modulate = Color( 1, 1, 1, 1 )
|
||||
25/region = Rect2( 0, 0, 128, 128 )
|
||||
25/tile_mode = 0
|
||||
25/occluder_offset = Vector2( 0, 0 )
|
||||
25/navigation_offset = Vector2( 0, 0 )
|
||||
25/shapes = [ ]
|
||||
|
||||
25/z_index = 0
|
||||
|
||||
@@ -1,160 +1,159 @@
|
||||
[gd_scene load_steps=27 format=2]
|
||||
|
||||
[ext_resource path="res://WWT-01.png" type="Texture" id=1]
|
||||
[ext_resource path="res://WWT-02.png" type="Texture" id=2]
|
||||
[ext_resource path="res://WWT-03.png" type="Texture" id=3]
|
||||
[ext_resource path="res://WWT-04.png" type="Texture" id=4]
|
||||
[ext_resource path="res://WWT-05.png" type="Texture" id=5]
|
||||
[ext_resource path="res://WWT-06.png" type="Texture" id=6]
|
||||
[ext_resource path="res://WWT-07.png" type="Texture" id=7]
|
||||
[ext_resource path="res://WWT-08.png" type="Texture" id=8]
|
||||
[ext_resource path="res://WWT-09.png" type="Texture" id=9]
|
||||
[ext_resource path="res://WWT-10.png" type="Texture" id=10]
|
||||
[ext_resource path="res://WWT-11.png" type="Texture" id=11]
|
||||
[ext_resource path="res://WWT-12.png" type="Texture" id=12]
|
||||
[ext_resource path="res://WWT-13.png" type="Texture" id=13]
|
||||
[ext_resource path="res://WWT-14.png" type="Texture" id=14]
|
||||
[ext_resource path="res://WWT-15.png" type="Texture" id=15]
|
||||
[ext_resource path="res://WWT-16.png" type="Texture" id=16]
|
||||
[ext_resource path="res://WWT-17.png" type="Texture" id=17]
|
||||
[ext_resource path="res://WWT-18.png" type="Texture" id=18]
|
||||
[ext_resource path="res://WWT-19.png" type="Texture" id=19]
|
||||
[ext_resource path="res://WWT-20.png" type="Texture" id=20]
|
||||
[ext_resource path="res://WWT-21.png" type="Texture" id=21]
|
||||
[ext_resource path="res://WWT-22.png" type="Texture" id=22]
|
||||
[ext_resource path="res://WWT-23.png" type="Texture" id=23]
|
||||
[ext_resource path="res://WWT-24.png" type="Texture" id=24]
|
||||
[ext_resource path="res://WWT-25.png" type="Texture" id=25]
|
||||
[ext_resource path="res://WWT-26.png" type="Texture" id=26]
|
||||
[ext_resource path="res://tiles/WWT-01.png" type="Texture" id=1]
|
||||
[ext_resource path="res://tiles/WWT-02.png" type="Texture" id=2]
|
||||
[ext_resource path="res://tiles/WWT-03.png" type="Texture" id=3]
|
||||
[ext_resource path="res://tiles/WWT-04.png" type="Texture" id=4]
|
||||
[ext_resource path="res://tiles/WWT-05.png" type="Texture" id=5]
|
||||
[ext_resource path="res://tiles/WWT-06.png" type="Texture" id=6]
|
||||
[ext_resource path="res://tiles/WWT-07.png" type="Texture" id=7]
|
||||
[ext_resource path="res://tiles/WWT-08.png" type="Texture" id=8]
|
||||
[ext_resource path="res://tiles/WWT-09.png" type="Texture" id=9]
|
||||
[ext_resource path="res://tiles/WWT-10.png" type="Texture" id=10]
|
||||
[ext_resource path="res://tiles/WWT-11.png" type="Texture" id=11]
|
||||
[ext_resource path="res://tiles/WWT-12.png" type="Texture" id=12]
|
||||
[ext_resource path="res://tiles/WWT-13.png" type="Texture" id=13]
|
||||
[ext_resource path="res://tiles/WWT-14.png" type="Texture" id=14]
|
||||
[ext_resource path="res://tiles/WWT-15.png" type="Texture" id=15]
|
||||
[ext_resource path="res://tiles/WWT-16.png" type="Texture" id=16]
|
||||
[ext_resource path="res://tiles/WWT-17.png" type="Texture" id=17]
|
||||
[ext_resource path="res://tiles/WWT-18.png" type="Texture" id=18]
|
||||
[ext_resource path="res://tiles/WWT-19.png" type="Texture" id=19]
|
||||
[ext_resource path="res://tiles/WWT-20.png" type="Texture" id=20]
|
||||
[ext_resource path="res://tiles/WWT-21.png" type="Texture" id=21]
|
||||
[ext_resource path="res://tiles/WWT-22.png" type="Texture" id=22]
|
||||
[ext_resource path="res://tiles/WWT-23.png" type="Texture" id=23]
|
||||
[ext_resource path="res://tiles/WWT-24.png" type="Texture" id=24]
|
||||
[ext_resource path="res://tiles/WWT-25.png" type="Texture" id=25]
|
||||
[ext_resource path="res://tiles/WWT-26.png" type="Texture" id=26]
|
||||
|
||||
[node name="Node2D" type="Node2D"]
|
||||
[node name="TilesetEdit" type="Node2D"]
|
||||
|
||||
[node name="Tile 1" type="Sprite" parent="."]
|
||||
[node name="Tile1" type="Sprite" parent="."]
|
||||
texture = ExtResource( 1 )
|
||||
centered = false
|
||||
|
||||
[node name="Tile 2" type="Sprite" parent="."]
|
||||
[node name="Tile2" type="Sprite" parent="."]
|
||||
position = Vector2( 128, 0 )
|
||||
texture = ExtResource( 2 )
|
||||
centered = false
|
||||
|
||||
[node name="Tile 3" type="Sprite" parent="."]
|
||||
[node name="Tile3" type="Sprite" parent="."]
|
||||
position = Vector2( 256, 0 )
|
||||
texture = ExtResource( 3 )
|
||||
centered = false
|
||||
|
||||
[node name="Tile 4" type="Sprite" parent="."]
|
||||
[node name="Tile4" type="Sprite" parent="."]
|
||||
position = Vector2( 384, 0 )
|
||||
texture = ExtResource( 4 )
|
||||
centered = false
|
||||
|
||||
[node name="Tile 5" type="Sprite" parent="."]
|
||||
[node name="Tile5" type="Sprite" parent="."]
|
||||
position = Vector2( 512, 0 )
|
||||
texture = ExtResource( 5 )
|
||||
centered = false
|
||||
|
||||
[node name="Tile 6" type="Sprite" parent="."]
|
||||
[node name="Tile6" type="Sprite" parent="."]
|
||||
position = Vector2( 640, 0 )
|
||||
texture = ExtResource( 6 )
|
||||
centered = false
|
||||
|
||||
[node name="Tile 7" type="Sprite" parent="."]
|
||||
[node name="Tile7" type="Sprite" parent="."]
|
||||
position = Vector2( 768, 0 )
|
||||
texture = ExtResource( 7 )
|
||||
centered = false
|
||||
|
||||
[node name="Tile 8" type="Sprite" parent="."]
|
||||
[node name="Tile8" type="Sprite" parent="."]
|
||||
position = Vector2( 896, 0 )
|
||||
texture = ExtResource( 8 )
|
||||
centered = false
|
||||
|
||||
[node name="Tile 9" type="Sprite" parent="."]
|
||||
[node name="Tile9" type="Sprite" parent="."]
|
||||
position = Vector2( 1024, 0 )
|
||||
texture = ExtResource( 9 )
|
||||
centered = false
|
||||
|
||||
[node name="Tile 10" type="Sprite" parent="."]
|
||||
[node name="Tile10" type="Sprite" parent="."]
|
||||
position = Vector2( 0, 128 )
|
||||
texture = ExtResource( 10 )
|
||||
centered = false
|
||||
|
||||
[node name="Tile 11" type="Sprite" parent="."]
|
||||
[node name="Tile11" type="Sprite" parent="."]
|
||||
position = Vector2( 128, 128 )
|
||||
texture = ExtResource( 11 )
|
||||
centered = false
|
||||
|
||||
[node name="Tile 12" type="Sprite" parent="."]
|
||||
[node name="Tile12" type="Sprite" parent="."]
|
||||
position = Vector2( 256, 128 )
|
||||
texture = ExtResource( 12 )
|
||||
centered = false
|
||||
|
||||
[node name="Tile 13" type="Sprite" parent="."]
|
||||
[node name="Tile13" type="Sprite" parent="."]
|
||||
position = Vector2( 384, 128 )
|
||||
texture = ExtResource( 13 )
|
||||
centered = false
|
||||
|
||||
[node name="Tile 14" type="Sprite" parent="."]
|
||||
[node name="Tile14" type="Sprite" parent="."]
|
||||
position = Vector2( 512, 128 )
|
||||
texture = ExtResource( 14 )
|
||||
centered = false
|
||||
|
||||
[node name="Tile 15" type="Sprite" parent="."]
|
||||
[node name="Tile15" type="Sprite" parent="."]
|
||||
position = Vector2( 640, 128 )
|
||||
texture = ExtResource( 15 )
|
||||
centered = false
|
||||
|
||||
[node name="Tile 16" type="Sprite" parent="."]
|
||||
[node name="Tile16" type="Sprite" parent="."]
|
||||
position = Vector2( 768, 128 )
|
||||
texture = ExtResource( 16 )
|
||||
centered = false
|
||||
|
||||
[node name="Tile 17" type="Sprite" parent="."]
|
||||
[node name="Tile17" type="Sprite" parent="."]
|
||||
position = Vector2( 896, 128 )
|
||||
texture = ExtResource( 17 )
|
||||
centered = false
|
||||
|
||||
[node name="Tile 18" type="Sprite" parent="."]
|
||||
[node name="Tile18" type="Sprite" parent="."]
|
||||
position = Vector2( 1024, 128 )
|
||||
texture = ExtResource( 18 )
|
||||
centered = false
|
||||
|
||||
[node name="Tile 19" type="Sprite" parent="."]
|
||||
[node name="Tile19" type="Sprite" parent="."]
|
||||
position = Vector2( 0, 256 )
|
||||
texture = ExtResource( 19 )
|
||||
centered = false
|
||||
|
||||
[node name="Tile 20" type="Sprite" parent="."]
|
||||
[node name="Tile20" type="Sprite" parent="."]
|
||||
position = Vector2( 128, 256 )
|
||||
texture = ExtResource( 20 )
|
||||
centered = false
|
||||
|
||||
[node name="Tile 21" type="Sprite" parent="."]
|
||||
[node name="Tile21" type="Sprite" parent="."]
|
||||
position = Vector2( 256, 256 )
|
||||
texture = ExtResource( 21 )
|
||||
centered = false
|
||||
|
||||
[node name="Tile 22" type="Sprite" parent="."]
|
||||
[node name="Tile22" type="Sprite" parent="."]
|
||||
position = Vector2( 384, 256 )
|
||||
texture = ExtResource( 22 )
|
||||
centered = false
|
||||
|
||||
[node name="Tile 23" type="Sprite" parent="."]
|
||||
[node name="Tile23" type="Sprite" parent="."]
|
||||
position = Vector2( 512, 256 )
|
||||
texture = ExtResource( 23 )
|
||||
centered = false
|
||||
|
||||
[node name="Tile 24" type="Sprite" parent="."]
|
||||
[node name="Tile24" type="Sprite" parent="."]
|
||||
position = Vector2( 640, 256 )
|
||||
texture = ExtResource( 24 )
|
||||
centered = false
|
||||
|
||||
[node name="Tile 25" type="Sprite" parent="."]
|
||||
[node name="Tile25" type="Sprite" parent="."]
|
||||
position = Vector2( 768, 256 )
|
||||
texture = ExtResource( 25 )
|
||||
centered = false
|
||||
|
||||
[node name="Tile 26" type="Sprite" parent="."]
|
||||
[node name="Tile26" type="Sprite" parent="."]
|
||||
position = Vector2( 896, 256 )
|
||||
texture = ExtResource( 26 )
|
||||
centered = false
|
||||
|
||||
|
||||
@@ -1,24 +1,12 @@
|
||||
extends KinematicBody2D
|
||||
|
||||
# This is a demo showing how KinematicBody2D
|
||||
# move_and_slide works.
|
||||
|
||||
# Member variables
|
||||
const MOTION_SPEED = 160 # Pixels/second
|
||||
|
||||
|
||||
func _physics_process(_delta):
|
||||
var motion = Vector2()
|
||||
|
||||
if Input.is_action_pressed("move_up"):
|
||||
motion += Vector2(0, -1)
|
||||
if Input.is_action_pressed("move_bottom"):
|
||||
motion += Vector2(0, 1)
|
||||
if Input.is_action_pressed("move_left"):
|
||||
motion += Vector2(-1, 0)
|
||||
if Input.is_action_pressed("move_right"):
|
||||
motion += Vector2(1, 0)
|
||||
|
||||
motion.x = Input.get_action_strength("move_right") - Input.get_action_strength("move_left")
|
||||
motion.y = Input.get_action_strength("move_down") - Input.get_action_strength("move_up")
|
||||
motion.y *= 0.5
|
||||
motion = motion.normalized() * MOTION_SPEED
|
||||
|
||||
#warning-ignore:return_value_discarded
|
||||
move_and_slide(motion)
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
[sub_resource type="CircleShape2D" id=1]
|
||||
radius = 16.0
|
||||
|
||||
[node name="troll" type="KinematicBody2D"]
|
||||
[node name="Troll" type="KinematicBody2D"]
|
||||
script = ExtResource( 1 )
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="."]
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
[ext_resource path="res://tileset.tres" type="TileSet" id=1]
|
||||
[ext_resource path="res://troll.tscn" type="PackedScene" id=2]
|
||||
|
||||
[node name="dungeon" type="Node2D"]
|
||||
[node name="Dungeon" type="Node2D"]
|
||||
|
||||
[node name="floor" type="TileMap" parent="."]
|
||||
[node name="Floor" type="TileMap" parent="."]
|
||||
mode = 1
|
||||
tile_set = ExtResource( 1 )
|
||||
cell_size = Vector2( 128, 64 )
|
||||
@@ -13,7 +13,7 @@ cell_tile_origin = 1
|
||||
format = 1
|
||||
tile_data = PoolIntArray( -851956, 0, -1200553578, -851955, 0, -1200553578, -851954, 0, -1200553578, -786420, 1, -1200553578, -786419, 0, -1200553578, -786418, 0, -1200553578, -720884, 0, -1200553578, -720883, 0, -1200553578, -720882, 0, -1200553578, -655348, 1, -1200553578, -655347, 0, -1200553578, -655346, 0, -1200553578, -589812, 1, -1200553578, -589811, 0, -1200553578, -589810, 0, -1200553578, -524276, 0, -1200553578, -524275, 1, -1200553578, -524274, 0, -1200553578, -458740, 0, -1200553578, -458739, 0, -1200553578, -458738, 0, -1200553578, -393210, 0, -1200553578, -393209, 0, -1200553578, -393208, 0, -1200553578, -393207, 0, -1200553578, -393206, 0, -1200553578, -393205, 0, -1200553578, -393204, 0, -1200553578, -393203, 0, -1200553578, -393202, 0, -1200553578, -327674, 0, -1200553578, -327673, 0, -1200553578, -327672, 1, -1200553578, -327671, 1, -1200553578, -327670, 1, -1200553578, -327669, 1, -1200553578, -327668, 1, -1200553578, -327667, 0, -1200553578, -327666, 0, -1200553578, -262138, 0, -1200553578, -262137, 0, -1200553578, -262136, 0, -1200553578, -262135, 0, -1200553578, -262134, 0, -1200553578, -262133, 0, -1200553578, -262132, 0, -1200553578, -262131, 0, -1200553578, -262130, 0, -1200553578, -196602, 0, -1200553578, -196601, 0, -1200553578, -196600, 0, -1200553578, -196599, 0, -1200553578, -196598, 0, -1200553578, -196597, 0, -1200553578, -196596, 0, -1200553578, -196595, 0, -1200553578, -196594, 0, -1200553578, -131066, 0, -1200553578, -131065, 0, -1200553578, -131064, 0, -1200553578, -131063, 0, -1200553578, -65530, 0, -1200553578, -65529, 0, -1200553578, -65528, 0, -1200553578, -65527, 0, -1200553578, 6, 0, -1200553578, 7, 1, -1200553578, 8, 0, -1200553578, 9, 0, -1200553578, 65542, 0, -1200553578, 65543, 0, -1200553578, 65544, 0, -1200553578, 65545, 0, -1200553578, 131078, 0, -1200553578, 131079, 0, -1200553578, 131080, 0, -1200553578, 131081, 0, -1200553578, 196614, 0, -1200553578, 196615, 0, -1200553578, 196616, 0, -1200553578 )
|
||||
|
||||
[node name="walls" type="TileMap" parent="."]
|
||||
[node name="Walls" type="TileMap" parent="."]
|
||||
mode = 1
|
||||
tile_set = ExtResource( 1 )
|
||||
cell_size = Vector2( 128, 64 )
|
||||
@@ -22,5 +22,5 @@ cell_y_sort = true
|
||||
format = 1
|
||||
tile_data = PoolIntArray( -917493, 2, -1200553578, -917492, 2, -1200553578, -917491, 2, -1200553578, -917490, 2, -1200553578, -917489, 2, -1200553578, -851957, 2, -1200553578, -851956, 3, -1200553578, -851954, 3, -1200553578, -851953, 2, -1200553578, -786421, 2, -1200553578, -786420, 3, -1200553578, -786418, 3, -1200553578, -786417, 2, -1200553578, -720885, 2, -1200553578, -720881, 2, -1200553578, -655349, 2, -1200553578, -655348, 2, -1200553578, -655346, 3, -1200553578, -655345, 2, -1200553578, -589813, 2, -1200553578, -589809, 2, -1200553578, -524277, 2, -1200553578, -524273, 2, -1200553578, -458747, 2, -1200553578, -458746, 2, -1200553578, -458745, 2, -1200553578, -458744, 536870916, -1200553578, -458743, 536870916, -1200553578, -458742, 2, -1200553578, -458741, 2, -1200553578, -458740, 2, -1200553578, -458738, 2, -1200553578, -458737, 2, -1200553578, -393211, 2, -1200553578, -393209, 3, -1200553578, -393205, 3, -1200553578, -393201, 2, -1200553578, -327675, 4, -1200553578, -327665, 2, -1200553578, -262139, 4, -1200553578, -262129, 2, -1200553578, -196603, 2, 0, -196601, 3, 0, -196593, 2, -1200553578, -131067, 2, 0, -131062, 2, -1200553578, -131061, 2, -1200553578, -131060, 2, -1200553578, -131059, 2, -1200553578, -131058, 2, -1200553578, -131057, 2, -1200553578, -65531, 2, 0, -65530, 2, 0, -65527, 2, -1200553578, -65526, 2, -1200553578, 5, 2, -1200553578, 10, 2, 0, 65541, 2, -1200553578, 65546, 2, 0, 131077, 2, -1200553578, 131081, 3, 0, 131082, 2, 0, 196613, 2, -1200553578, 196618, 2, 0, 262149, 2, -1200553578, 262150, 2, -1200553578, 262151, 2, -1200553578, 262152, 2, -1200553578, 262153, 2, -1200553578, 262154, 2, -1200553578 )
|
||||
|
||||
[node name="troll" parent="walls" instance=ExtResource( 2 )]
|
||||
[node name="Troll" parent="Walls" instance=ExtResource( 2 )]
|
||||
position = Vector2( 368.142, 347.007 )
|
||||
|
||||
@@ -35,24 +35,36 @@ gen_mipmaps=false
|
||||
|
||||
[input]
|
||||
|
||||
move_bottom={
|
||||
move_down={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777234,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":83,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":13,"pressure":0.0,"pressed":false,"script":null)
|
||||
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":1,"axis_value":1.0,"script":null)
|
||||
]
|
||||
}
|
||||
move_left={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777231,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":65,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":14,"pressure":0.0,"pressed":false,"script":null)
|
||||
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":0,"axis_value":-1.0,"script":null)
|
||||
]
|
||||
}
|
||||
move_right={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777233,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":68,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":15,"pressure":0.0,"pressed":false,"script":null)
|
||||
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":0,"axis_value":1.0,"script":null)
|
||||
]
|
||||
}
|
||||
move_up={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777232,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":87,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":12,"pressure":0.0,"pressed":false,"script":null)
|
||||
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":1,"axis_value":-1.0,"script":null)
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
@@ -3,80 +3,80 @@
|
||||
[ext_resource path="res://isotiles.png" type="Texture" id=1]
|
||||
|
||||
[sub_resource type="ConvexPolygonShape2D" id=1]
|
||||
|
||||
custom_solver_bias = 0.0
|
||||
points = PoolVector2Array( -4, -30, 60, 2, -4, 34, -68, 2 )
|
||||
|
||||
[sub_resource type="ConvexPolygonShape2D" id=2]
|
||||
|
||||
custom_solver_bias = 0.0
|
||||
points = PoolVector2Array( -4, -22, 12, -22, 28, -6, 4, 10, -4, 10, -20, -6 )
|
||||
|
||||
[sub_resource type="ConvexPolygonShape2D" id=3]
|
||||
|
||||
custom_solver_bias = 0.0
|
||||
points = PoolVector2Array( -21.905, 23.3748, 50.095, -8.62516, 66.095, -0.62516, -5.90501, 31.3748 )
|
||||
|
||||
[resource]
|
||||
|
||||
0/name = "base"
|
||||
0/name = "Base"
|
||||
0/texture = ExtResource( 1 )
|
||||
0/tex_offset = Vector2( -66, -42 )
|
||||
0/modulate = Color( 1, 1, 1, 1 )
|
||||
0/region = Rect2( 28, 92, 132, 84 )
|
||||
0/is_autotile = false
|
||||
0/tile_mode = 0
|
||||
0/occluder_offset = Vector2( 0, 0 )
|
||||
0/navigation_offset = Vector2( 0, 0 )
|
||||
0/shapes = [ ]
|
||||
1/name = "base2"
|
||||
0/z_index = 0
|
||||
1/name = "Base2"
|
||||
1/texture = ExtResource( 1 )
|
||||
1/tex_offset = Vector2( -66, -42 )
|
||||
1/modulate = Color( 1, 1, 1, 1 )
|
||||
1/region = Rect2( 220, 92, 132, 84 )
|
||||
1/is_autotile = false
|
||||
1/tile_mode = 0
|
||||
1/occluder_offset = Vector2( 0, 0 )
|
||||
1/navigation_offset = Vector2( 0, 0 )
|
||||
1/shapes = [ ]
|
||||
2/name = "wall"
|
||||
1/z_index = 0
|
||||
2/name = "Wall"
|
||||
2/texture = ExtResource( 1 )
|
||||
2/tex_offset = Vector2( -69.3109, -99.8051 )
|
||||
2/modulate = Color( 1, 1, 1, 1 )
|
||||
2/region = Rect2( 28, 220, 132, 136 )
|
||||
2/is_autotile = false
|
||||
2/tile_mode = 0
|
||||
2/occluder_offset = Vector2( 0, 0 )
|
||||
2/navigation_offset = Vector2( 0, 0 )
|
||||
2/shapes = [ {
|
||||
"autotile_coord": Vector2( 0, 0 ),
|
||||
"one_way": false,
|
||||
"one_way_margin": 1.0,
|
||||
"shape": SubResource( 1 ),
|
||||
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
} ]
|
||||
3/name = "column"
|
||||
2/z_index = 0
|
||||
3/name = "Column"
|
||||
3/texture = ExtResource( 1 )
|
||||
3/tex_offset = Vector2( -69.5632, -100.446 )
|
||||
3/modulate = Color( 1, 1, 1, 1 )
|
||||
3/region = Rect2( 220, 220, 132, 136 )
|
||||
3/is_autotile = false
|
||||
3/tile_mode = 0
|
||||
3/occluder_offset = Vector2( 0, 0 )
|
||||
3/navigation_offset = Vector2( 0, 0 )
|
||||
3/shapes = [ {
|
||||
"autotile_coord": Vector2( 0, 0 ),
|
||||
"one_way": false,
|
||||
"one_way_margin": 1.0,
|
||||
"shape": SubResource( 2 ),
|
||||
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
} ]
|
||||
4/name = "door1"
|
||||
3/z_index = 0
|
||||
4/name = "Door1"
|
||||
4/texture = ExtResource( 1 )
|
||||
4/tex_offset = Vector2( -50.3623, -90.8164 )
|
||||
4/modulate = Color( 1, 1, 1, 1 )
|
||||
4/region = Rect2( 24, 408, 132, 136 )
|
||||
4/is_autotile = false
|
||||
4/tile_mode = 0
|
||||
4/occluder_offset = Vector2( 0, 0 )
|
||||
4/navigation_offset = Vector2( 0, 0 )
|
||||
4/shapes = [ {
|
||||
"autotile_coord": Vector2( 0, 0 ),
|
||||
"one_way": false,
|
||||
"one_way_margin": 1.0,
|
||||
"shape": SubResource( 3 ),
|
||||
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
} ]
|
||||
|
||||
4/z_index = 0
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
|
||||
[ext_resource path="res://isotiles.png" type="Texture" id=1]
|
||||
|
||||
[node name="Node2D" type="Node2D"]
|
||||
[node name="TilesetEdit" type="Node2D"]
|
||||
|
||||
[node name="base" type="Sprite" parent="."]
|
||||
[node name="Base" type="Sprite" parent="."]
|
||||
position = Vector2( 150.049, 61.1264 )
|
||||
texture = ExtResource( 1 )
|
||||
centered = false
|
||||
@@ -12,7 +12,7 @@ offset = Vector2( -66, -42 )
|
||||
region_enabled = true
|
||||
region_rect = Rect2( 28, 92, 132, 84 )
|
||||
|
||||
[node name="base2" type="Sprite" parent="."]
|
||||
[node name="Base2" type="Sprite" parent="."]
|
||||
position = Vector2( 257.013, 124.86 )
|
||||
texture = ExtResource( 1 )
|
||||
centered = false
|
||||
@@ -20,7 +20,7 @@ offset = Vector2( -66, -42 )
|
||||
region_enabled = true
|
||||
region_rect = Rect2( 220, 92, 132, 84 )
|
||||
|
||||
[node name="wall" type="Sprite" parent="."]
|
||||
[node name="Wall" type="Sprite" parent="."]
|
||||
position = Vector2( 421.311, 137.805 )
|
||||
texture = ExtResource( 1 )
|
||||
centered = false
|
||||
@@ -28,12 +28,12 @@ offset = Vector2( -69.3109, -99.8051 )
|
||||
region_enabled = true
|
||||
region_rect = Rect2( 28, 220, 132, 136 )
|
||||
|
||||
[node name="StaticBody2D" type="StaticBody2D" parent="wall"]
|
||||
[node name="StaticBody2D" type="StaticBody2D" parent="Wall"]
|
||||
|
||||
[node name="collision" type="CollisionPolygon2D" parent="wall/StaticBody2D"]
|
||||
[node name="collision" type="CollisionPolygon2D" parent="Wall/StaticBody2D"]
|
||||
polygon = PoolVector2Array( -68, 2, -4, 34, 60, 2, -4, -30 )
|
||||
|
||||
[node name="column" type="Sprite" parent="."]
|
||||
[node name="Column" type="Sprite" parent="."]
|
||||
position = Vector2( 359.563, 266.446 )
|
||||
texture = ExtResource( 1 )
|
||||
centered = false
|
||||
@@ -41,12 +41,12 @@ offset = Vector2( -69.5632, -100.446 )
|
||||
region_enabled = true
|
||||
region_rect = Rect2( 220, 220, 132, 136 )
|
||||
|
||||
[node name="StaticBody" type="StaticBody2D" parent="column"]
|
||||
[node name="StaticBody" type="StaticBody2D" parent="Column"]
|
||||
|
||||
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="column/StaticBody"]
|
||||
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Column/StaticBody"]
|
||||
polygon = PoolVector2Array( -20, -6, -4, 10, 4, 10, 28, -6, 12, -22, -4, -22 )
|
||||
|
||||
[node name="door1" type="Sprite" parent="."]
|
||||
[node name="Door1" type="Sprite" parent="."]
|
||||
position = Vector2( -24.1548, 142.216 )
|
||||
texture = ExtResource( 1 )
|
||||
centered = false
|
||||
@@ -54,8 +54,7 @@ offset = Vector2( -50.3623, -90.8164 )
|
||||
region_enabled = true
|
||||
region_rect = Rect2( 24, 408, 132, 136 )
|
||||
|
||||
[node name="StaticBody2D" type="StaticBody2D" parent="door1"]
|
||||
[node name="StaticBody2D" type="StaticBody2D" parent="Door1"]
|
||||
|
||||
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="door1/StaticBody2D"]
|
||||
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Door1/StaticBody2D"]
|
||||
polygon = PoolVector2Array( -5.90501, 31.3748, 66.095, -0.62516, 50.095, -8.62516, -21.905, 23.3748 )
|
||||
|
||||
|
||||
@@ -1,24 +1,12 @@
|
||||
extends KinematicBody2D
|
||||
|
||||
# This is a demo showing how KinematicBody2D
|
||||
# move_and_slide works.
|
||||
|
||||
# Member variables
|
||||
const MOTION_SPEED = 160 # Pixels/second
|
||||
|
||||
|
||||
func _physics_process(_delta):
|
||||
var motion = Vector2()
|
||||
|
||||
if Input.is_action_pressed("move_up"):
|
||||
motion += Vector2(0, -1)
|
||||
if Input.is_action_pressed("move_bottom"):
|
||||
motion += Vector2(0, 1)
|
||||
if Input.is_action_pressed("move_left"):
|
||||
motion += Vector2(-1, 0)
|
||||
if Input.is_action_pressed("move_right"):
|
||||
motion += Vector2(1, 0)
|
||||
|
||||
motion.x = Input.get_action_strength("move_right") - Input.get_action_strength("move_left")
|
||||
motion.y = Input.get_action_strength("move_down") - Input.get_action_strength("move_up")
|
||||
motion.y *= 0.5
|
||||
motion = motion.normalized() * MOTION_SPEED
|
||||
|
||||
#warning-ignore:return_value_discarded
|
||||
move_and_slide(motion)
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
[sub_resource type="CircleShape2D" id=1]
|
||||
radius = 16.0
|
||||
|
||||
[node name="troll" type="KinematicBody2D"]
|
||||
[node name="Troll" type="KinematicBody2D"]
|
||||
script = ExtResource( 1 )
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="."]
|
||||
@@ -19,4 +19,3 @@ shape = SubResource( 1 )
|
||||
|
||||
[node name="Camera2D" type="Camera2D" parent="."]
|
||||
current = true
|
||||
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
extends Node2D
|
||||
|
||||
|
||||
func _on_princess_body_enter(body):
|
||||
# The name of this editor-generated callback is unfortunate
|
||||
if body.get_name() == "player":
|
||||
$youwin.show()
|
||||
@@ -1,11 +1,6 @@
|
||||
extends KinematicBody2D
|
||||
|
||||
# This demo shows how to build a kinematic controller.
|
||||
|
||||
# Member variables
|
||||
const GRAVITY = 500.0 # pixels/second/second
|
||||
|
||||
# Angle in degrees towards either side that the player can consider "floor"
|
||||
# Angle in degrees towards either side that the player can consider "floor".
|
||||
const FLOOR_ANGLE_TOLERANCE = 40
|
||||
const WALK_FORCE = 600
|
||||
const WALK_MIN_SPEED = 10
|
||||
@@ -14,55 +9,42 @@ const STOP_FORCE = 1300
|
||||
const JUMP_SPEED = 200
|
||||
const JUMP_MAX_AIRBORNE_TIME = 0.2
|
||||
|
||||
const SLIDE_STOP_VELOCITY = 1.0 # one pixel/second
|
||||
const SLIDE_STOP_MIN_TRAVEL = 1.0 # one pixel
|
||||
const SLIDE_STOP_VELOCITY = 1.0 # Pixels/second
|
||||
const SLIDE_STOP_MIN_TRAVEL = 1.0 # Pixels
|
||||
|
||||
var velocity = Vector2()
|
||||
var on_air_time = 100
|
||||
var jumping = false
|
||||
|
||||
var prev_jump_pressed = false
|
||||
|
||||
onready var gravity = ProjectSettings.get_setting("physics/2d/default_gravity")
|
||||
|
||||
func _physics_process(delta):
|
||||
# Create forces
|
||||
var force = Vector2(0, GRAVITY)
|
||||
|
||||
var walk_left = Input.is_action_pressed("move_left")
|
||||
var walk_right = Input.is_action_pressed("move_right")
|
||||
var force = Vector2(0, gravity)
|
||||
var walk = Input.get_action_strength("move_right") - Input.get_action_strength("move_left")
|
||||
var jump = Input.is_action_pressed("jump")
|
||||
|
||||
var stop = true
|
||||
|
||||
if walk_left:
|
||||
if velocity.x <= WALK_MIN_SPEED and velocity.x > -WALK_MAX_SPEED:
|
||||
force.x -= WALK_FORCE
|
||||
stop = false
|
||||
elif walk_right:
|
||||
if velocity.x >= -WALK_MIN_SPEED and velocity.x < WALK_MAX_SPEED:
|
||||
force.x += WALK_FORCE
|
||||
stop = false
|
||||
|
||||
if stop:
|
||||
if (velocity.x <= WALK_MIN_SPEED and velocity.x > -WALK_MAX_SPEED) or (velocity.x >= -WALK_MIN_SPEED and velocity.x < WALK_MAX_SPEED):
|
||||
force.x += WALK_FORCE * walk
|
||||
|
||||
if abs(walk) < 0.5:
|
||||
var vsign = sign(velocity.x)
|
||||
var vlen = abs(velocity.x)
|
||||
|
||||
vlen -= STOP_FORCE * delta
|
||||
if vlen < 0:
|
||||
vlen = 0
|
||||
|
||||
velocity.x = vlen * vsign
|
||||
|
||||
# Integrate forces to velocity
|
||||
# Integrate forces to velocity.
|
||||
velocity += force * delta
|
||||
# Integrate velocity into motion and move
|
||||
velocity = move_and_slide(velocity, Vector2(0, -1))
|
||||
# Integrate velocity into motion and move.
|
||||
velocity = move_and_slide(velocity, Vector2.UP)
|
||||
|
||||
if is_on_floor():
|
||||
on_air_time = 0
|
||||
|
||||
if jumping and velocity.y > 0:
|
||||
# If falling, no longer jumping
|
||||
# If falling, no longer jumping.
|
||||
jumping = false
|
||||
|
||||
if on_air_time < JUMP_MAX_AIRBORNE_TIME and jump and not prev_jump_pressed and not jumping:
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
[sub_resource type="RectangleShape2D" id=1]
|
||||
extents = Vector2( 7, 7 )
|
||||
|
||||
[node name="player" type="KinematicBody2D"]
|
||||
[node name="Player" type="KinematicBody2D"]
|
||||
script = ExtResource( 1 )
|
||||
|
||||
[node name="sprite" type="Sprite" parent="."]
|
||||
[node name="Sprite" type="Sprite" parent="."]
|
||||
texture = ExtResource( 2 )
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
|
||||
@@ -16,7 +16,7 @@ _global_script_class_icons={
|
||||
[application]
|
||||
|
||||
config/name="Kinematic Character"
|
||||
run/main_scene="res://colworld.tscn"
|
||||
run/main_scene="res://world.tscn"
|
||||
config/icon="res://icon.png"
|
||||
|
||||
[display]
|
||||
@@ -37,26 +37,27 @@ singletons=[ ]
|
||||
jump={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":32,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
move_bottom={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777234,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":87,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777232,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":0,"pressure":0.0,"pressed":false,"script":null)
|
||||
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":12,"pressure":0.0,"pressed":false,"script":null)
|
||||
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":1,"axis_value":-1.0,"script":null)
|
||||
]
|
||||
}
|
||||
move_left={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777231,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":65,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":14,"pressure":0.0,"pressed":false,"script":null)
|
||||
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":0,"axis_value":-1.0,"script":null)
|
||||
]
|
||||
}
|
||||
move_right={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777233,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
move_up={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777232,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":68,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":15,"pressure":0.0,"pressed":false,"script":null)
|
||||
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":0,"axis_value":1.0,"script":null)
|
||||
]
|
||||
}
|
||||
|
||||
@@ -64,6 +65,10 @@ move_up={
|
||||
|
||||
multithread/thread_rid_pool_prealloc=60
|
||||
|
||||
[physics]
|
||||
|
||||
2d/default_gravity=500
|
||||
|
||||
[rendering]
|
||||
|
||||
environment/default_clear_color=Color( 0.156, 0.1325, 0.25, 1 )
|
||||
|
||||
6
2d/kinematic_character/world.gd
Normal file
@@ -0,0 +1,6 @@
|
||||
extends Node2D
|
||||
|
||||
func _on_princess_body_enter(body):
|
||||
# The name of this editor-generated callback is unfortunate.
|
||||
if body.get_name() == "Player":
|
||||
$WinText.show()
|
||||
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 453 B |
@@ -1,34 +0,0 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/obstacle.png-dfb3e99d3af573251007cdf5e1c252b9.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://obstacle.png"
|
||||
dest_files=[ "res://.import/obstacle.png-dfb3e99d3af573251007cdf5e1c252b9.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/bptc_ldr=0
|
||||
compress/normal_map=0
|
||||
flags/repeat=0
|
||||
flags/filter=true
|
||||
flags/mipmaps=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
||||
@@ -1,24 +0,0 @@
|
||||
extends KinematicBody2D
|
||||
|
||||
# This is a demo showing how KinematicBody2D
|
||||
# move_and_slide works.
|
||||
|
||||
# Member variables
|
||||
const MOTION_SPEED = 160 # Pixels/second
|
||||
|
||||
|
||||
func _physics_process(_delta):
|
||||
var motion = Vector2()
|
||||
|
||||
if Input.is_action_pressed("move_up"):
|
||||
motion += Vector2(0, -1)
|
||||
if Input.is_action_pressed("move_bottom"):
|
||||
motion += Vector2(0, 1)
|
||||
if Input.is_action_pressed("move_left"):
|
||||
motion += Vector2(-1, 0)
|
||||
if Input.is_action_pressed("move_right"):
|
||||
motion += Vector2(1, 0)
|
||||
|
||||
motion = motion.normalized() * MOTION_SPEED
|
||||
|
||||
move_and_slide(motion)
|
||||
|
Before Width: | Height: | Size: 502 B |
@@ -1,34 +0,0 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/player.png-2dd0af52de4b213777cd8c9df94c0978.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://player.png"
|
||||
dest_files=[ "res://.import/player.png-2dd0af52de4b213777cd8c9df94c0978.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/bptc_ldr=0
|
||||
compress/normal_map=0
|
||||
flags/repeat=0
|
||||
flags/filter=true
|
||||
flags/mipmaps=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
||||
@@ -1,17 +0,0 @@
|
||||
[gd_scene load_steps=4 format=2]
|
||||
|
||||
[ext_resource path="res://player.gd" type="Script" id=1]
|
||||
[ext_resource path="res://player.png" type="Texture" id=2]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=1]
|
||||
extents = Vector2( 8, 8 )
|
||||
|
||||
[node name="player" type="KinematicBody2D"]
|
||||
script = ExtResource( 1 )
|
||||
|
||||
[node name="sprite" type="Sprite" parent="."]
|
||||
texture = ExtResource( 2 )
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
shape = SubResource( 1 )
|
||||
|
||||
@@ -1,56 +0,0 @@
|
||||
; Engine configuration file.
|
||||
; It's best edited using the editor UI and not directly,
|
||||
; since the parameters that go here are not all obvious.
|
||||
;
|
||||
; Format:
|
||||
; [section] ; section goes between []
|
||||
; param=value ; assign values to parameters
|
||||
|
||||
config_version=4
|
||||
|
||||
_global_script_classes=[ ]
|
||||
_global_script_class_icons={
|
||||
|
||||
}
|
||||
|
||||
[application]
|
||||
|
||||
config/name="Kinematic Collision"
|
||||
run/main_scene="res://colworld.tscn"
|
||||
config/icon="res://icon.png"
|
||||
|
||||
[display]
|
||||
|
||||
window/stretch/mode="2d"
|
||||
window/stretch/aspect="expand"
|
||||
|
||||
[gdnative]
|
||||
|
||||
singletons=[ ]
|
||||
|
||||
[input]
|
||||
|
||||
move_bottom={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777234,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
move_left={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777231,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
move_right={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777233,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
move_up={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777232,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
|
||||
[rendering]
|
||||
|
||||
environment/default_clear_color=Color( 0.219608, 0.145098, 0.145098, 1 )
|
||||
@@ -10,7 +10,7 @@ light_mode = 2
|
||||
length = 4.0
|
||||
loop = true
|
||||
tracks/0/type = "value"
|
||||
tracks/0/path = NodePath("light1:position")
|
||||
tracks/0/path = NodePath("Light1:position")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/imported = false
|
||||
@@ -22,7 +22,7 @@ tracks/0/keys = {
|
||||
"values": [ Vector2( 601.028, 242.639 ), Vector2( 318.649, 327.353 ), Vector2( 381.263, 130.915 ), Vector2( 462.294, 389.968 ) ]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/path = NodePath("light2:position")
|
||||
tracks/1/path = NodePath("Light2:position")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/imported = false
|
||||
@@ -34,7 +34,7 @@ tracks/1/keys = {
|
||||
"values": [ Vector2( 196.528, 185.139 ), Vector2( 135.142, 454.013 ), Vector2( 638.105, 334.923 ), Vector2( 331.375, 101.653 ) ]
|
||||
}
|
||||
tracks/2/type = "value"
|
||||
tracks/2/path = NodePath("light3:position")
|
||||
tracks/2/path = NodePath("Light3:position")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/imported = false
|
||||
@@ -46,7 +46,7 @@ tracks/2/keys = {
|
||||
"values": [ Vector2( 442.528, 411.139 ), Vector2( 635.283, 236.8 ), Vector2( 216.215, 396.815 ), Vector2( 682.96, 294.708 ) ]
|
||||
}
|
||||
|
||||
[node name="lightmask_demo" type="Control"]
|
||||
[node name="Lightmask" type="Control"]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
size_flags_horizontal = 2
|
||||
@@ -55,7 +55,7 @@ __meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="burano" type="TextureRect" parent="."]
|
||||
[node name="Burano" type="TextureRect" parent="."]
|
||||
material = SubResource( 1 )
|
||||
margin_right = 800.0
|
||||
margin_bottom = 600.0
|
||||
@@ -63,22 +63,22 @@ size_flags_horizontal = 2
|
||||
size_flags_vertical = 2
|
||||
texture = ExtResource( 1 )
|
||||
|
||||
[node name="light1" type="Light2D" parent="."]
|
||||
[node name="Light1" type="Light2D" parent="."]
|
||||
position = Vector2( 601.028, 242.639 )
|
||||
texture = ExtResource( 2 )
|
||||
mode = 2
|
||||
|
||||
[node name="light2" type="Light2D" parent="."]
|
||||
[node name="Light2" type="Light2D" parent="."]
|
||||
position = Vector2( 196.528, 185.139 )
|
||||
texture = ExtResource( 2 )
|
||||
mode = 2
|
||||
|
||||
[node name="light3" type="Light2D" parent="."]
|
||||
[node name="Light3" type="Light2D" parent="."]
|
||||
position = Vector2( 442.528, 411.139 )
|
||||
texture = ExtResource( 2 )
|
||||
mode = 2
|
||||
|
||||
[node name="anim" type="AnimationPlayer" parent="."]
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||
autoplay = "maskmotion"
|
||||
anims/maskmotion = SubResource( 2 )
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 168 B After Width: | Height: | Size: 168 B |
34
2d/lights_and_shadows/background.png.import
Normal file
@@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/background.png-98289422cd7d93003950872a7b97021f.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://background.png"
|
||||
dest_files=[ "res://.import/background.png-98289422cd7d93003950872a7b97021f.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/bptc_ldr=0
|
||||
compress/normal_map=0
|
||||
flags/repeat=0
|
||||
flags/filter=true
|
||||
flags/mipmaps=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
||||
@@ -1,34 +0,0 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/bg.png-24bff804693ee063127ad100e04c5185.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://bg.png"
|
||||
dest_files=[ "res://.import/bg.png-24bff804693ee063127ad100e04c5185.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/bptc_ldr=0
|
||||
compress/normal_map=0
|
||||
flags/repeat=0
|
||||
flags/filter=true
|
||||
flags/mipmaps=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
||||
@@ -1,6 +1,6 @@
|
||||
[gd_scene load_steps=12 format=2]
|
||||
|
||||
[ext_resource path="res://bg.png" type="Texture" id=1]
|
||||
[ext_resource path="res://background.png" type="Texture" id=1]
|
||||
[ext_resource path="res://caster.png" type="Texture" id=2]
|
||||
[ext_resource path="res://light.png" type="Texture" id=3]
|
||||
[ext_resource path="res://spot.png" type="Texture" id=4]
|
||||
@@ -65,124 +65,124 @@ tracks/0/keys = {
|
||||
"values": [ Vector2( 692.078, 29.8849 ), Vector2( 309.606, 31.5551 ), Vector2( 40.7064, 238.658 ), Vector2( 685.397, 282.082 ) ]
|
||||
}
|
||||
|
||||
[node name="base" type="Node2D"]
|
||||
[node name="LightShadows" type="Node2D"]
|
||||
|
||||
[node name="ambient" type="CanvasModulate" parent="."]
|
||||
[node name="Ambient" type="CanvasModulate" parent="."]
|
||||
color = Color( 0.27451, 0.27451, 0.27451, 1 )
|
||||
|
||||
[node name="bg" type="Sprite" parent="."]
|
||||
[node name="Background" type="Sprite" parent="."]
|
||||
position = Vector2( 401.251, 301.906 )
|
||||
scale = Vector2( 128, 128 )
|
||||
texture = ExtResource( 1 )
|
||||
|
||||
[node name="casters" type="Node2D" parent="."]
|
||||
[node name="Casters" type="Node2D" parent="."]
|
||||
|
||||
[node name="shadow_caster" type="Sprite" parent="casters"]
|
||||
[node name="ShadowCaster" type="Sprite" parent="Casters"]
|
||||
position = Vector2( 95.2909, 85.3186 )
|
||||
texture = ExtResource( 2 )
|
||||
|
||||
[node name="occluder" type="LightOccluder2D" parent="casters/shadow_caster"]
|
||||
[node name="Occluder" type="LightOccluder2D" parent="Casters/ShadowCaster"]
|
||||
occluder = SubResource( 1 )
|
||||
|
||||
[node name="shadow_caster1" type="Sprite" parent="casters"]
|
||||
[node name="ShadowCaster1" type="Sprite" parent="Casters"]
|
||||
position = Vector2( 200.291, 313.319 )
|
||||
texture = ExtResource( 2 )
|
||||
|
||||
[node name="occluder" type="LightOccluder2D" parent="casters/shadow_caster1"]
|
||||
[node name="Occluder" type="LightOccluder2D" parent="Casters/ShadowCaster1"]
|
||||
occluder = SubResource( 1 )
|
||||
|
||||
[node name="shadow_caster2" type="Sprite" parent="casters"]
|
||||
[node name="ShadowCaster2" type="Sprite" parent="Casters"]
|
||||
position = Vector2( 76.2909, 405.319 )
|
||||
texture = ExtResource( 2 )
|
||||
|
||||
[node name="occluder" type="LightOccluder2D" parent="casters/shadow_caster2"]
|
||||
[node name="Occluder" type="LightOccluder2D" parent="Casters/ShadowCaster2"]
|
||||
occluder = SubResource( 1 )
|
||||
|
||||
[node name="shadow_caster3" type="Sprite" parent="casters"]
|
||||
[node name="ShadowCaster3" type="Sprite" parent="Casters"]
|
||||
position = Vector2( 348.291, 206.319 )
|
||||
texture = ExtResource( 2 )
|
||||
|
||||
[node name="occluder" type="LightOccluder2D" parent="casters/shadow_caster3"]
|
||||
[node name="Occluder" type="LightOccluder2D" parent="Casters/ShadowCaster3"]
|
||||
occluder = SubResource( 1 )
|
||||
|
||||
[node name="shadow_caster4" type="Sprite" parent="casters"]
|
||||
[node name="ShadowCaster4" type="Sprite" parent="Casters"]
|
||||
position = Vector2( 239.291, 48.3186 )
|
||||
texture = ExtResource( 2 )
|
||||
|
||||
[node name="occluder" type="LightOccluder2D" parent="casters/shadow_caster4"]
|
||||
[node name="Occluder" type="LightOccluder2D" parent="Casters/ShadowCaster4"]
|
||||
occluder = SubResource( 1 )
|
||||
|
||||
[node name="shadow_caster5" type="Sprite" parent="casters"]
|
||||
[node name="ShadowCaster5" type="Sprite" parent="Casters"]
|
||||
position = Vector2( 140.291, 561.319 )
|
||||
texture = ExtResource( 2 )
|
||||
|
||||
[node name="occluder" type="LightOccluder2D" parent="casters/shadow_caster5"]
|
||||
[node name="Occluder" type="LightOccluder2D" parent="Casters/ShadowCaster5"]
|
||||
occluder = SubResource( 1 )
|
||||
|
||||
[node name="shadow_caster6" type="Sprite" parent="casters"]
|
||||
[node name="ShadowCaster6" type="Sprite" parent="Casters"]
|
||||
position = Vector2( 392.291, 499.319 )
|
||||
texture = ExtResource( 2 )
|
||||
|
||||
[node name="occluder" type="LightOccluder2D" parent="casters/shadow_caster6"]
|
||||
[node name="Occluder" type="LightOccluder2D" parent="Casters/ShadowCaster6"]
|
||||
occluder = SubResource( 1 )
|
||||
|
||||
[node name="shadow_caster7" type="Sprite" parent="casters"]
|
||||
[node name="ShadowCaster7" type="Sprite" parent="Casters"]
|
||||
position = Vector2( 735.291, 552.319 )
|
||||
texture = ExtResource( 2 )
|
||||
|
||||
[node name="occluder" type="LightOccluder2D" parent="casters/shadow_caster7"]
|
||||
[node name="Occluder" type="LightOccluder2D" parent="Casters/ShadowCaster7"]
|
||||
occluder = SubResource( 1 )
|
||||
|
||||
[node name="shadow_caster8" type="Sprite" parent="casters"]
|
||||
[node name="ShadowCaster8" type="Sprite" parent="Casters"]
|
||||
position = Vector2( 661.291, 371.319 )
|
||||
texture = ExtResource( 2 )
|
||||
|
||||
[node name="occluder" type="LightOccluder2D" parent="casters/shadow_caster8"]
|
||||
[node name="Occluder" type="LightOccluder2D" parent="Casters/ShadowCaster8"]
|
||||
occluder = SubResource( 1 )
|
||||
|
||||
[node name="shadow_caster9" type="Sprite" parent="casters"]
|
||||
[node name="ShadowCaster9" type="Sprite" parent="Casters"]
|
||||
position = Vector2( 567.291, 574.319 )
|
||||
texture = ExtResource( 2 )
|
||||
|
||||
[node name="occluder" type="LightOccluder2D" parent="casters/shadow_caster9"]
|
||||
[node name="occluder" type="LightOccluder2D" parent="Casters/ShadowCaster9"]
|
||||
occluder = SubResource( 1 )
|
||||
|
||||
[node name="shadow_caster10" type="Sprite" parent="casters"]
|
||||
[node name="ShadowCaster10" type="Sprite" parent="Casters"]
|
||||
position = Vector2( 420.291, 350.319 )
|
||||
texture = ExtResource( 2 )
|
||||
|
||||
[node name="occluder" type="LightOccluder2D" parent="casters/shadow_caster10"]
|
||||
[node name="Occluder" type="LightOccluder2D" parent="Casters/ShadowCaster10"]
|
||||
occluder = SubResource( 1 )
|
||||
|
||||
[node name="shadow_caster11" type="Sprite" parent="casters"]
|
||||
[node name="ShadowCaster11" type="Sprite" parent="Casters"]
|
||||
position = Vector2( 463.291, 106.319 )
|
||||
texture = ExtResource( 2 )
|
||||
|
||||
[node name="occluder" type="LightOccluder2D" parent="casters/shadow_caster11"]
|
||||
[node name="Occluder" type="LightOccluder2D" parent="Casters/ShadowCaster11"]
|
||||
occluder = SubResource( 1 )
|
||||
|
||||
[node name="shadow_caster12" type="Sprite" parent="casters"]
|
||||
[node name="ShadowCaster12" type="Sprite" parent="Casters"]
|
||||
position = Vector2( 621.291, 78.3186 )
|
||||
texture = ExtResource( 2 )
|
||||
|
||||
[node name="occluder" type="LightOccluder2D" parent="casters/shadow_caster12"]
|
||||
[node name="Occluder" type="LightOccluder2D" parent="Casters/ShadowCaster12"]
|
||||
occluder = SubResource( 1 )
|
||||
|
||||
[node name="shadow_caster13" type="Sprite" parent="casters"]
|
||||
[node name="ShadowCaster13" type="Sprite" parent="Casters"]
|
||||
position = Vector2( 761.291, 240.319 )
|
||||
texture = ExtResource( 2 )
|
||||
|
||||
[node name="occluder" type="LightOccluder2D" parent="casters/shadow_caster13"]
|
||||
[node name="Occluder" type="LightOccluder2D" parent="Casters/ShadowCaster13"]
|
||||
occluder = SubResource( 1 )
|
||||
|
||||
[node name="shadow_caster14" type="Sprite" parent="casters"]
|
||||
[node name="ShadowCaster14" type="Sprite" parent="Casters"]
|
||||
position = Vector2( 771.291, 29.3186 )
|
||||
texture = ExtResource( 2 )
|
||||
|
||||
[node name="occluder" type="LightOccluder2D" parent="casters/shadow_caster14"]
|
||||
[node name="Occluder" type="LightOccluder2D" parent="Casters/ShadowCaster14"]
|
||||
occluder = SubResource( 1 )
|
||||
|
||||
[node name="red_light" type="Light2D" parent="."]
|
||||
[node name="RedLight" type="Light2D" parent="."]
|
||||
position = Vector2( 159.289, 452.441 )
|
||||
texture = ExtResource( 3 )
|
||||
color = Color( 1, 0.446392, 0.0576646, 1 )
|
||||
@@ -191,16 +191,16 @@ shadow_gradient_length = 1.3
|
||||
shadow_filter = 3
|
||||
shadow_filter_smooth = 11.1
|
||||
|
||||
[node name="blob" type="Sprite" parent="red_light"]
|
||||
[node name="Blob" type="Sprite" parent="RedLight"]
|
||||
material = SubResource( 2 )
|
||||
texture = ExtResource( 4 )
|
||||
|
||||
[node name="anim" type="AnimationPlayer" parent="red_light"]
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="RedLight"]
|
||||
autoplay = "motion"
|
||||
anims/motion = SubResource( 3 )
|
||||
anims/motion2 = SubResource( 4 )
|
||||
|
||||
[node name="green_light" type="Light2D" parent="."]
|
||||
[node name="GreenLight" type="Light2D" parent="."]
|
||||
position = Vector2( 753.756, 314.336 )
|
||||
texture = ExtResource( 3 )
|
||||
color = Color( 0.49247, 0.878537, 0.409146, 1 )
|
||||
@@ -209,17 +209,17 @@ shadow_gradient_length = 1.2
|
||||
shadow_filter = 3
|
||||
shadow_filter_smooth = 7.1
|
||||
|
||||
[node name="blob" type="Sprite" parent="green_light"]
|
||||
[node name="blob" type="Sprite" parent="GreenLight"]
|
||||
material = SubResource( 5 )
|
||||
texture = ExtResource( 4 )
|
||||
|
||||
[node name="anim" type="AnimationPlayer" parent="green_light"]
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="GreenLight"]
|
||||
autoplay = "m2"
|
||||
anims/m2 = SubResource( 4 )
|
||||
anims/motion = SubResource( 3 )
|
||||
|
||||
[node name="blue_light" type="Light2D" parent="."]
|
||||
position = Vector2( 692.078, 29.8849 )
|
||||
[node name="BlueLight" type="Light2D" parent="."]
|
||||
position = Vector2( 692.078, 31.1773 )
|
||||
texture = ExtResource( 3 )
|
||||
color = Color( 0.396752, 0.446392, 0.929792, 1 )
|
||||
shadow_enabled = true
|
||||
@@ -227,11 +227,11 @@ shadow_gradient_length = 1.4
|
||||
shadow_filter = 3
|
||||
shadow_filter_smooth = 5.3
|
||||
|
||||
[node name="blob" type="Sprite" parent="blue_light"]
|
||||
[node name="blob" type="Sprite" parent="BlueLight"]
|
||||
material = SubResource( 6 )
|
||||
texture = ExtResource( 4 )
|
||||
|
||||
[node name="anim" type="AnimationPlayer" parent="blue_light"]
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="BlueLight"]
|
||||
autoplay = "motion3"
|
||||
anims/motion = SubResource( 3 )
|
||||
anims/motion2 = SubResource( 4 )
|
||||
|
||||
@@ -1,46 +1,44 @@
|
||||
extends Navigation2D
|
||||
|
||||
export(float) var CHARACTER_SPEED = 400.0
|
||||
export(float) var character_speed = 400.0
|
||||
var path = []
|
||||
|
||||
func _process(delta):
|
||||
var walk_distance = character_speed * delta
|
||||
move_along_path(walk_distance)
|
||||
|
||||
|
||||
# The 'click' event is a custom input action defined in
|
||||
# Project > Project Settings > Input Map tab
|
||||
# Project > Project Settings > Input Map tab.
|
||||
func _input(event):
|
||||
if not event.is_action_pressed('click'):
|
||||
if not event.is_action_pressed("click"):
|
||||
return
|
||||
_update_navigation_path($Character.position, get_local_mouse_position())
|
||||
|
||||
|
||||
func _update_navigation_path(start_position, end_position):
|
||||
# get_simple_path is part of the Navigation2D class
|
||||
# it returns a PoolVector2Array of points that lead you from the
|
||||
# start_position to the end_position
|
||||
path = get_simple_path(start_position, end_position, true)
|
||||
# The first point is always the start_position
|
||||
# We don't need it in this example as it corresponds to the character's position
|
||||
path.remove(0)
|
||||
set_process(true)
|
||||
|
||||
|
||||
func _process(delta):
|
||||
var walk_distance = CHARACTER_SPEED * delta
|
||||
move_along_path(walk_distance)
|
||||
|
||||
|
||||
func move_along_path(distance):
|
||||
var last_point = $Character.position
|
||||
while path.size():
|
||||
var distance_between_points = last_point.distance_to(path[0])
|
||||
|
||||
# the position to move to falls between two points
|
||||
# The position to move to falls between two points.
|
||||
if distance <= distance_between_points:
|
||||
$Character.position = last_point.linear_interpolate(path[0], distance / distance_between_points)
|
||||
return
|
||||
|
||||
# the position is past the end of the segment
|
||||
# The position is past the end of the segment.
|
||||
distance -= distance_between_points
|
||||
last_point = path[0]
|
||||
path.remove(0)
|
||||
# the character reached the end of the path
|
||||
# The character reached the end of the path.
|
||||
$Character.position = last_point
|
||||
set_process(false)
|
||||
|
||||
|
||||
func _update_navigation_path(start_position, end_position):
|
||||
# get_simple_path is part of the Navigation2D class.
|
||||
# It returns a PoolVector2Array of points that lead you
|
||||
# from the start_position to the end_position.
|
||||
path = get_simple_path(start_position, end_position, true)
|
||||
# The first point is always the start_position.
|
||||
# We don't need it in this example as it corresponds to the character's position.
|
||||
path.remove(0)
|
||||
set_process(true)
|
||||
|
||||