Removed demos
they go to their own project now
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 3 KiB |
|
@ -1,5 +0,0 @@
|
|||
[application]
|
||||
|
||||
name="Area 2D Input Events"
|
||||
main_scene="res://input.tscn"
|
||||
icon="res://icon.png"
|
Before Width: | Height: | Size: 3.3 KiB |
|
@ -1,15 +0,0 @@
|
|||
|
||||
extends Area2D
|
||||
|
||||
|
||||
# Virtual from CollisionObject2D (also available as signal)
|
||||
func _input_event(viewport, event, shape_idx):
|
||||
# Convert event to local coordinates
|
||||
if (event.type == InputEvent.MOUSE_MOTION):
|
||||
event = make_input_local(event)
|
||||
get_node("label").set_text(str(event.pos))
|
||||
|
||||
|
||||
# Virtual from CollisionObject2D (also available as signal)
|
||||
func _mouse_exit():
|
||||
get_node("label").set_text("")
|
|
@ -1,109 +0,0 @@
|
|||
[gd_scene load_steps=6 format=1]
|
||||
|
||||
[ext_resource path="res://input.gd" type="Script" id=1]
|
||||
[ext_resource path="res://box_area.png" type="Texture" id=2]
|
||||
[ext_resource path="res://circle_area.png" type="Texture" id=3]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=1]
|
||||
|
||||
custom_solver_bias = 0.0
|
||||
extents = Vector2( 64, 64 )
|
||||
|
||||
[sub_resource type="CircleShape2D" id=2]
|
||||
|
||||
custom_solver_bias = 0.0
|
||||
radius = 64.0
|
||||
|
||||
[node name="base" type="Node2D"]
|
||||
|
||||
[node name="box" type="Area2D" parent="."]
|
||||
|
||||
transform/pos = Vector2( 212, 281 )
|
||||
transform/rot = 35.4081
|
||||
input/pickable = true
|
||||
shapes/0/shape = SubResource( 1 )
|
||||
shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 )
|
||||
shapes/0/trigger = false
|
||||
gravity_vec = Vector2( 0, 1 )
|
||||
gravity = 98.0
|
||||
linear_damp = 0.1
|
||||
angular_damp = 1.0
|
||||
script/script = ExtResource( 1 )
|
||||
|
||||
[node name="sprite" type="Sprite" parent="box"]
|
||||
|
||||
texture = ExtResource( 2 )
|
||||
|
||||
[node name="label" type="Label" parent="box"]
|
||||
|
||||
focus/ignore_mouse = true
|
||||
focus/stop_mouse = true
|
||||
size_flags/horizontal = 2
|
||||
margin/left = -43.0
|
||||
margin/top = 71.0
|
||||
margin/right = 43.0
|
||||
margin/bottom = 84.0
|
||||
align = 1
|
||||
percent_visible = 1.0
|
||||
lines_skipped = 0
|
||||
max_lines_visible = -1
|
||||
|
||||
[node name="shape" type="CollisionShape2D" parent="box"]
|
||||
|
||||
shape = SubResource( 1 )
|
||||
trigger = false
|
||||
_update_shape_index = -1
|
||||
|
||||
[node name="circle" type="Area2D" parent="."]
|
||||
|
||||
transform/pos = Vector2( 547.877, 286.808 )
|
||||
transform/rot = -40.5985
|
||||
input/pickable = true
|
||||
shapes/0/shape = SubResource( 2 )
|
||||
shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 )
|
||||
shapes/0/trigger = false
|
||||
gravity_vec = Vector2( 0, 1 )
|
||||
gravity = 98.0
|
||||
linear_damp = 0.1
|
||||
angular_damp = 1.0
|
||||
script/script = ExtResource( 1 )
|
||||
|
||||
[node name="sprite" type="Sprite" parent="circle"]
|
||||
|
||||
texture = ExtResource( 3 )
|
||||
|
||||
[node name="label" type="Label" parent="circle"]
|
||||
|
||||
focus/ignore_mouse = true
|
||||
focus/stop_mouse = true
|
||||
size_flags/horizontal = 2
|
||||
margin/left = -43.0
|
||||
margin/top = 71.0
|
||||
margin/right = 43.0
|
||||
margin/bottom = 84.0
|
||||
align = 1
|
||||
percent_visible = 1.0
|
||||
lines_skipped = 0
|
||||
max_lines_visible = -1
|
||||
|
||||
[node name="shape" type="CollisionShape2D" parent="circle"]
|
||||
|
||||
shape = SubResource( 2 )
|
||||
trigger = false
|
||||
_update_shape_index = -1
|
||||
|
||||
[node name="Label" type="Label" parent="."]
|
||||
|
||||
focus/ignore_mouse = true
|
||||
focus/stop_mouse = true
|
||||
size_flags/horizontal = 2
|
||||
margin/left = 0.0
|
||||
margin/top = 0.0
|
||||
margin/right = 40.0
|
||||
margin/bottom = 13.0
|
||||
text = "This demo shows how to use a regular Area2D to get input events, and how to convert the input events to local coordinates of the node.\nUnlike controls, Input on Area2D or PhysicsBody2D nodes only works properly (with scrolling) on canvas layer 0."
|
||||
percent_visible = 1.0
|
||||
lines_skipped = 0
|
||||
max_lines_visible = -1
|
||||
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
|
||||
extends RigidBody2D
|
||||
|
||||
# Member variables
|
||||
var timeout = 5
|
||||
|
||||
|
||||
func _process(delta):
|
||||
timeout -= delta
|
||||
if (timeout < 1):
|
||||
set_opacity(timeout)
|
||||
if (timeout < 0):
|
||||
queue_free()
|
||||
|
||||
|
||||
func _ready():
|
||||
set_process(true)
|
Before Width: | Height: | Size: 321 B |
|
@ -1,47 +0,0 @@
|
|||
[gd_scene load_steps=4 format=1]
|
||||
|
||||
[ext_resource path="res://ball.gd" type="Script" id=1]
|
||||
[ext_resource path="res://ball.png" type="Texture" id=2]
|
||||
|
||||
[sub_resource type="CircleShape2D" id=1]
|
||||
|
||||
custom_solver_bias = 0.0
|
||||
radius = 7.45713
|
||||
|
||||
[node name="bal" type="RigidBody2D"]
|
||||
|
||||
input/pickable = false
|
||||
shapes/0/shape = SubResource( 1 )
|
||||
shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 )
|
||||
shapes/0/trigger = false
|
||||
collision/layers = 1
|
||||
collision/mask = 1
|
||||
mode = 0
|
||||
mass = 1.0
|
||||
friction = 1.0
|
||||
bounce = 0.0
|
||||
gravity_scale = 1.0
|
||||
custom_integrator = false
|
||||
continuous_cd = 0
|
||||
contacts_reported = 0
|
||||
contact_monitor = false
|
||||
sleeping = false
|
||||
can_sleep = true
|
||||
velocity/linear = Vector2( 0, 0 )
|
||||
velocity/angular = 0.0
|
||||
damp_override/linear = -1.0
|
||||
damp_override/angular = -1.0
|
||||
script/script = ExtResource( 1 )
|
||||
|
||||
[node name="sprite" type="Sprite" parent="."]
|
||||
|
||||
transform/pos = Vector2( 0, 1 )
|
||||
texture = ExtResource( 2 )
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
|
||||
shape = SubResource( 1 )
|
||||
trigger = false
|
||||
_update_shape_index = 0
|
||||
|
||||
|
Before Width: | Height: | Size: 253 B |
Before Width: | Height: | Size: 889 B |
|
@ -1,19 +0,0 @@
|
|||
|
||||
extends Node2D
|
||||
|
||||
# Member variables
|
||||
const EMIT_INTERVAL = 0.1
|
||||
var timeout = EMIT_INTERVAL
|
||||
|
||||
|
||||
func _process(delta):
|
||||
timeout -= delta
|
||||
if (timeout < 0):
|
||||
timeout = EMIT_INTERVAL
|
||||
var ball = preload("res://ball.tscn").instance()
|
||||
ball.set_pos(Vector2(randf()*get_viewport_rect().size.x, 0))
|
||||
add_child(ball)
|
||||
|
||||
|
||||
func _ready():
|
||||
set_process(true)
|
|
@ -1,178 +0,0 @@
|
|||
[gd_scene load_steps=13 format=1]
|
||||
|
||||
[ext_resource path="res://dynamic_colobjs.gd" type="Script" id=1]
|
||||
[ext_resource path="res://circle.png" type="Texture" id=2]
|
||||
[ext_resource path="res://box.png" type="Texture" id=3]
|
||||
[ext_resource path="res://poly.png" type="Texture" id=4]
|
||||
|
||||
[sub_resource type="CircleShape2D" id=1]
|
||||
|
||||
custom_solver_bias = 0.0
|
||||
radius = 28.8504
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=2]
|
||||
|
||||
custom_solver_bias = 0.0
|
||||
extents = Vector2( 32.1805, 30.0328 )
|
||||
|
||||
[sub_resource type="ConvexPolygonShape2D" id=3]
|
||||
|
||||
custom_solver_bias = 0.0
|
||||
points = Vector2Array( 49.5669, -27.9744, 45.1564, 15.3961, 18.6931, -1.51105 )
|
||||
|
||||
[sub_resource type="ConvexPolygonShape2D" id=4]
|
||||
|
||||
custom_solver_bias = 0.0
|
||||
points = Vector2Array( -55.093, -14.2052, -37.1739, 2.89948, -40.1345, 21.2602, -53.3067, 15.8716 )
|
||||
|
||||
[sub_resource type="ConvexPolygonShape2D" id=5]
|
||||
|
||||
custom_solver_bias = 0.0
|
||||
points = Vector2Array( -40.1345, 21.2602, -37.1739, 2.89948, -14.386, -14.0076, -6.30005, 0.694214 )
|
||||
|
||||
[sub_resource type="ConvexPolygonShape2D" id=6]
|
||||
|
||||
custom_solver_bias = 0.0
|
||||
points = Vector2Array( -14.386, -14.0076, 18.6931, -1.51105, 45.1564, 15.3961, -6.30005, 0.694214 )
|
||||
|
||||
[sub_resource type="Animation" id=7]
|
||||
|
||||
resource/name = "movethem"
|
||||
length = 4.0
|
||||
loop = true
|
||||
step = 0.1
|
||||
tracks/0/type = "value"
|
||||
tracks/0/path = NodePath("base/circle:transform/pos")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/keys = { "cont":true, "times":FloatArray( 0, 2 ), "transitions":FloatArray( 1, 1 ), "values":[ Vector2( 0, 0 ), Vector2( 52.7569, -70.845 ) ] }
|
||||
tracks/1/type = "value"
|
||||
tracks/1/path = NodePath("base/box:transform/pos")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/keys = { "cont":true, "times":FloatArray( 0, 2 ), "transitions":FloatArray( 1, 1 ), "values":[ Vector2( 193.173, -2.72076 ), Vector2( 195.894, -72.0999 ) ] }
|
||||
tracks/2/type = "value"
|
||||
tracks/2/path = NodePath("base/box:transform/rot")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/keys = { "cont":true, "times":FloatArray( 0, 2 ), "transitions":FloatArray( 1, 1 ), "values":[ 0.0, 92.8111 ] }
|
||||
tracks/3/type = "value"
|
||||
tracks/3/path = NodePath("base/polygon:transform/pos")
|
||||
tracks/3/interp = 1
|
||||
tracks/3/keys = { "cont":true, "times":FloatArray( 0, 2 ), "transitions":FloatArray( 1, 1 ), "values":[ Vector2( 382.265, -2.72076 ), Vector2( 495.176, -10.883 ) ] }
|
||||
|
||||
[sub_resource type="Animation" id=8]
|
||||
|
||||
resource/name = "toggletrigger"
|
||||
length = 6.0
|
||||
loop = true
|
||||
step = 0.1
|
||||
tracks/0/type = "value"
|
||||
tracks/0/path = NodePath("base/box:trigger")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/keys = { "cont":false, "times":FloatArray( 0, 4 ), "transitions":FloatArray( 1, 1 ), "values":[ false, true ] }
|
||||
tracks/1/type = "value"
|
||||
tracks/1/path = NodePath("base/box:visibility/opacity")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/keys = { "cont":false, "times":FloatArray( 0, 4 ), "transitions":FloatArray( 1, 1 ), "values":[ 1.0, 0.2 ] }
|
||||
|
||||
[node name="base" type="Node2D"]
|
||||
|
||||
script/script = ExtResource( 1 )
|
||||
|
||||
[node name="base" type="KinematicBody2D" parent="."]
|
||||
|
||||
transform/pos = Vector2( 137, 470 )
|
||||
input/pickable = false
|
||||
shapes/0/shape = SubResource( 1 )
|
||||
shapes/0/transform = Matrix32( 1, 0, 0, 1, 7.91353, -10.6267 )
|
||||
shapes/0/trigger = false
|
||||
shapes/1/shape = SubResource( 2 )
|
||||
shapes/1/transform = Matrix32( 0.970626, -0.240595, 0.240595, 0.970626, 193.581, -13.1276 )
|
||||
shapes/1/trigger = false
|
||||
shapes/2/shape = SubResource( 3 )
|
||||
shapes/2/transform = Matrix32( 1, 0, 0, 1, 399.202, -3.9451 )
|
||||
shapes/2/trigger = false
|
||||
shapes/3/shape = SubResource( 4 )
|
||||
shapes/3/transform = Matrix32( 1, 0, 0, 1, 399.202, -3.9451 )
|
||||
shapes/3/trigger = false
|
||||
shapes/4/shape = SubResource( 5 )
|
||||
shapes/4/transform = Matrix32( 1, 0, 0, 1, 399.202, -3.9451 )
|
||||
shapes/4/trigger = false
|
||||
shapes/5/shape = SubResource( 6 )
|
||||
shapes/5/transform = Matrix32( 1, 0, 0, 1, 399.202, -3.9451 )
|
||||
shapes/5/trigger = false
|
||||
collision/layers = 1
|
||||
collision/mask = 1
|
||||
collision/margin = 0.08
|
||||
|
||||
[node name="circle" type="CollisionShape2D" parent="base"]
|
||||
|
||||
transform/pos = Vector2( 7.91353, -10.6267 )
|
||||
shape = SubResource( 1 )
|
||||
trigger = false
|
||||
_update_shape_index = 0
|
||||
|
||||
[node name="sprite" type="Sprite" parent="base/circle"]
|
||||
|
||||
texture = ExtResource( 2 )
|
||||
|
||||
[node name="box" type="CollisionShape2D" parent="base"]
|
||||
|
||||
transform/pos = Vector2( 193.581, -13.1276 )
|
||||
transform/rot = 13.9217
|
||||
shape = SubResource( 2 )
|
||||
trigger = false
|
||||
_update_shape_index = 1
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="base/box"]
|
||||
|
||||
texture = ExtResource( 3 )
|
||||
|
||||
[node name="polygon" type="CollisionPolygon2D" parent="base"]
|
||||
|
||||
transform/pos = Vector2( 399.202, -3.9451 )
|
||||
build_mode = 0
|
||||
polygon = Vector2Array( -55.093, -14.2052, -37.1739, 2.89948, -14.386, -14.0076, 18.6931, -1.51105, 49.5669, -27.9744, 45.1564, 15.3961, -6.30005, 0.694214, -40.1345, 21.2602, -53.3067, 15.8716 )
|
||||
shape_range = Vector2( 2, 5 )
|
||||
trigger = false
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="base/polygon"]
|
||||
|
||||
texture = ExtResource( 4 )
|
||||
|
||||
[node name="shapemove" type="AnimationPlayer" parent="."]
|
||||
|
||||
playback/process_mode = 1
|
||||
playback/default_blend_time = 0.0
|
||||
root/root = NodePath("..")
|
||||
anims/movethem = SubResource( 7 )
|
||||
playback/active = true
|
||||
playback/speed = 1.0
|
||||
blend_times = [ ]
|
||||
autoplay = "movethem"
|
||||
|
||||
[node name="triggertoggle" type="AnimationPlayer" parent="."]
|
||||
|
||||
playback/process_mode = 1
|
||||
playback/default_blend_time = 0.0
|
||||
root/root = NodePath("..")
|
||||
anims/movethem = SubResource( 7 )
|
||||
anims/toggletrigger = SubResource( 8 )
|
||||
playback/active = true
|
||||
playback/speed = 1.0
|
||||
blend_times = [ ]
|
||||
autoplay = "toggletrigger"
|
||||
|
||||
[node name="Label" type="Label" parent="."]
|
||||
|
||||
focus/ignore_mouse = true
|
||||
focus/stop_mouse = true
|
||||
size_flags/horizontal = 2
|
||||
margin/left = 21.0
|
||||
margin/top = 21.0
|
||||
margin/right = 719.0
|
||||
margin/bottom = 73.0
|
||||
text = "This demo simply shows that it\'s possible now to move a CollisionShape and CollisionPolygon after it was created\nand also turn it into a trigger at run-time. CollisionShape will remain alive during the running game and you can\ninteract with them, even though they are just meant to be helpers.\nIt is always recommended in a real use-case scenario, to move a body instead of a shape, as that path is better optimized."
|
||||
percent_visible = 1.0
|
||||
lines_skipped = 0
|
||||
max_lines_visible = -1
|
||||
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
[application]
|
||||
|
||||
name="Run-Time CollisionShape"
|
||||
main_scene="res://dynamic_colobjs.tscn"
|
||||
icon="res://icon.png"
|
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.6 KiB |
|
@ -1,12 +0,0 @@
|
|||
[application]
|
||||
|
||||
name="Fog of War"
|
||||
main_scene="res://fog.tscn"
|
||||
icon="res://icon.png"
|
||||
|
||||
[input]
|
||||
|
||||
move_up=[key(Up)]
|
||||
move_bottom=[key(Down)]
|
||||
move_left=[key(Left)]
|
||||
move_right=[key(Right)]
|
Before Width: | Height: | Size: 572 B |
|
@ -1,78 +0,0 @@
|
|||
|
||||
extends TileMap
|
||||
|
||||
# Member variables
|
||||
|
||||
# Boundaries for the fog rectangle
|
||||
var x_min = -20 # Left start tile
|
||||
var x_max = 20 # Right end tile
|
||||
var y_min = -20 # Top start tile
|
||||
var y_max = 20 # Bottom end tile
|
||||
|
||||
var position # Player's position
|
||||
|
||||
# Iteration variables
|
||||
var x
|
||||
var y
|
||||
|
||||
# Variables to check if the player moved
|
||||
var x_old
|
||||
var y_old
|
||||
|
||||
# Array to build up the visible area like a square.
|
||||
# First value determines the width/height of the tip.
|
||||
# Here it would be 2*2 + 1 = 5 tiles wide/high.
|
||||
# Second value determines the total squares size.
|
||||
# Here it would be 5*2 + 1 = 10 tiles wide/high.
|
||||
var l = range(2, 5)
|
||||
|
||||
|
||||
# Process that runs in realtime
|
||||
func _fixed_process(delta):
|
||||
position = get_node("../troll").get_pos()
|
||||
|
||||
# Calculate the corresponding tile
|
||||
# from the players position
|
||||
x = int(position.x/get_cell_size().x)
|
||||
# Switching from positive to negative tile positions
|
||||
# causes problems because of rounding problems
|
||||
if position.x < 0:
|
||||
x -= 1 # Correct negative values
|
||||
|
||||
y = int(position.y/get_cell_size().y)
|
||||
if (position.y < 0):
|
||||
y -= 1
|
||||
|
||||
# Check if the player moved one tile further
|
||||
if ((x_old != x) or (y_old != y)):
|
||||
# Create the transparent part (visited area)
|
||||
var end = l.size() - 1
|
||||
var start = 0
|
||||
for steps in range(l.size()):
|
||||
for m in range(x - l[end] - 1, x + l[end] + 2):
|
||||
for n in range(y - l[start] - 1, y + l[start] + 2):
|
||||
if (get_cell(m, n) != 0):
|
||||
set_cell(m, n, 1, 0, 0)
|
||||
end -= 1
|
||||
start += 1
|
||||
|
||||
# Create the actual and active visible part
|
||||
var end = l.size() - 1
|
||||
var start = 0
|
||||
for steps in range(l.size()):
|
||||
for m in range(x - l[end], x + l[end] + 1):
|
||||
for n in range(y - l[start], y + l[start] + 1):
|
||||
set_cell(m, n, -1)
|
||||
end -= 1
|
||||
start += 1
|
||||
|
||||
x_old = x
|
||||
y_old = y
|
||||
|
||||
|
||||
func _ready():
|
||||
# Create a square filled with the 100% opaque fog
|
||||
for x in range(x_min, x_max):
|
||||
for y in range(y_min, y_max):
|
||||
set_cell(x, y, 0, 0, 0)
|
||||
set_fixed_process(true)
|
Before Width: | Height: | Size: 31 KiB |
|
@ -1,51 +0,0 @@
|
|||
[gd_scene load_steps=4 format=1]
|
||||
|
||||
[ext_resource path="res://tileset.tres" type="TileSet" id=1]
|
||||
[ext_resource path="res://troll.tscn" type="PackedScene" id=2]
|
||||
[ext_resource path="res://fog.gd" type="Script" id=3]
|
||||
|
||||
[node name="Node2D" type="Node2D"]
|
||||
|
||||
[node name="TileMap" type="TileMap" parent="."]
|
||||
|
||||
transform/pos = Vector2( 206, 112 )
|
||||
mode = 0
|
||||
tile_set = ExtResource( 1 )
|
||||
cell/size = Vector2( 48, 48 )
|
||||
cell/quadrant_size = 16
|
||||
cell/custom_transform = Matrix32( 1, 0, 0, 1, 0, 0 )
|
||||
cell/half_offset = 2
|
||||
cell/tile_origin = 0
|
||||
cell/y_sort = false
|
||||
collision/use_kinematic = false
|
||||
collision/friction = 1.0
|
||||
collision/bounce = 0.0
|
||||
collision/layers = 1
|
||||
collision/mask = 1
|
||||
occluder/light_mask = 1
|
||||
tile_data = IntArray( -589834, 2, -589833, 2, -589832, 2, -589831, 2, -589830, 2, -589829, 2, -589828, 2, -589827, 2, -589826, 2, -589825, 2, -655360, 2, -655359, 2, -655358, 2, -655357, 2, -655356, 2, -655355, 2, -655354, 2, -655353, 2, -655352, 2, -655351, 2, -524298, 2, -524297, 2, -524296, 2, -524295, 2, -524294, 2, -524293, 2, -524292, 2, -524291, 2, -524290, 2, -524289, 2, -589824, 2, -589823, 2, -589822, 2, -589821, 2, -589820, 2, -589819, 2, -589818, 2, -589817, 2, -589816, 2, -589815, 2, -458762, 2, -458761, 2, -458760, 2, -458759, 2, -458758, 2, -458757, 2, -458756, 2, -458755, 2, -458754, 2, -458753, 2, -524288, 2, -524287, 2, -524286, 2, -524285, 2, -524284, 2, -524283, 2, -524282, 2, -524281, 2, -524280, 2, -524279, 2, -393226, 2, -393225, 2, -393224, 2, -393223, 2, -393222, 2, -393221, 2, -393220, 2, -393219, 2, -393218, 2, -393217, 2, -458752, 2, -458751, 2, -458750, 2, -458749, 2, -458748, 2, -458747, 2, -458746, 2, -458745, 2, -458744, 2, -458743, 2, -327690, 2, -327689, 2, -327688, 2, -327687, 2, -327686, 2, -327685, 2, -327684, 2, -327683, 2, -327682, 2, -327681, 2, -393216, 2, -393215, 2, -393214, 2, -393213, 2, -393212, 2, -393211, 2, -393210, 2, -393209, 2, -393208, 2, -393207, 2, -262154, 2, -262153, 2, -262152, 2, -262151, 2, -262150, 2, -262149, 2, -262148, 2, -262147, 2, -262146, 2, -262145, 2, -327680, 2, -327679, 2, -327678, 2, -327677, 2, -327676, 2, -327675, 2, -327674, 2, -327673, 2, -327672, 2, -327671, 2, -196618, 2, -196617, 2, -196616, 2, -196615, 2, -196614, 2, -196613, 2, -196612, 2, -196611, 2, -196610, 2, -196609, 2, -262144, 2, -262143, 2, -262142, 2, -262141, 2, -262140, 2, -262139, 2, -262138, 2, -262137, 2, -262136, 2, -262135, 2, -131082, 2, -131081, 2, -131080, 2, -131079, 2, -131078, 2, -131077, 2, -131076, 2, -131075, 2, -131074, 2, -131073, 2, -196608, 2, -196607, 2, -196606, 2, -196605, 2, -196604, 2, -196603, 2, -196602, 2, -196601, 2, -196600, 2, -196599, 2, -65546, 2, -65545, 2, -65544, 2, -65543, 2, -65542, 2, -65541, 2, -65540, 2, -65539, 2, -65538, 2, -65537, 2, -131072, 2, -131071, 2, -131070, 2, -131069, 2, -131068, 2, -131067, 2, -131066, 2, -131065, 2, -131064, 2, -131063, 2, -10, 2, -9, 2, -8, 2, -7, 2, -6, 2, -5, 2, -4, 2, -3, 2, -2, 2, -1, 2, -65536, 2, -65535, 2, -65534, 2, -65533, 2, -65532, 2, -65531, 2, -65530, 2, -65529, 2, -65528, 2, -65527, 2, 65526, 2, 65527, 2, 65528, 2, 65529, 2, 65530, 2, 65531, 2, 65532, 2, 65533, 2, 65534, 2, 65535, 2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5, 2, 6, 2, 7, 2, 8, 2, 9, 2, 131062, 2, 131063, 2, 131064, 2, 131065, 2, 131066, 2, 131067, 2, 131068, 2, 131069, 2, 131070, 2, 131071, 2, 65536, 2, 65537, 2, 65538, 2, 65539, 2, 65540, 2, 65541, 2, 65542, 2, 65543, 2, 65544, 2, 65545, 2, 196598, 2, 196599, 2, 196600, 2, 196601, 2, 196602, 2, 196603, 2, 196604, 2, 196605, 2, 196606, 2, 196607, 2, 131072, 2, 131073, 2, 131074, 2, 131075, 2, 131076, 2, 131077, 2, 131078, 2, 131079, 2, 131080, 2, 131081, 2, 262134, 2, 262135, 2, 262136, 2, 262137, 2, 262138, 2, 262139, 2, 262140, 2, 262141, 2, 262142, 2, 262143, 2, 196608, 2, 196609, 2, 196610, 2, 196611, 2, 196612, 2, 196613, 2, 196614, 2, 196615, 2, 196616, 2, 196617, 2, 327670, 2, 327671, 2, 327672, 2, 327673, 2, 327674, 2, 327675, 2, 327676, 2, 327677, 2, 327678, 2, 327679, 2, 262144, 2, 262145, 2, 262146, 2, 262147, 2, 262148, 2, 262149, 2, 262150, 2, 262151, 2, 262152, 2, 262153, 2, 393206, 2, 393207, 2, 393208, 2, 393209, 2, 393210, 2, 393211, 2, 393212, 2, 393213, 2, 393214, 2, 393215, 2, 327680, 2, 327681, 2, 327682, 2, 327683, 2, 327684, 2, 327685, 2, 327686, 2, 327687, 2, 327688, 2, 327689, 2, 458742, 2, 458743, 2, 458744, 2, 458745, 2, 458746, 2, 458747, 2, 458748, 2, 458749, 2, 458750, 2, 458751, 2, 393216, 2, 393217, 2, 393218, 2, 393219, 2, 393220, 2, 393221, 2, 393222, 2, 393223, 2, 393224, 2, 393225, 2, 524278, 2, 524279, 2, 524280, 2, 524281, 2, 524282, 2, 524283, 2, 524284, 2, 524285, 2, 524286, 2, 524287, 2, 458752, 2, 458753, 2, 458754, 2, 458755, 2, 458756, 2, 458757, 2, 458758, 2, 458759, 2, 458760, 2, 458761, 2, 589814, 2, 589815, 2, 589816, 2, 589817, 2, 589818, 2, 589819, 2, 589820, 2, 589821, 2, 589822, 2, 589823, 2, 524288, 2, 524289, 2, 524290, 2, 524291, 2, 524292, 2, 524293, 2, 524294, 2, 524295, 2, 524296, 2, 524297, 2, 655350, 2, 655351, 2, 655352, 2, 655353, 2, 655354, 2, 655355, 2, 655356, 2, 655357, 2, 655358, 2, 655359, 2, 589824, 2, 589825, 2, 589826, 2, 589827, 2, 589828, 2, 589829, 2, 589830, 2, 589831, 2, 589832, 2, 589833, 2 )
|
||||
|
||||
[node name="troll" parent="." instance=ExtResource( 2 )]
|
||||
|
||||
collision/margin = 0.001
|
||||
|
||||
[node name="Fog" type="TileMap" parent="."]
|
||||
|
||||
mode = 0
|
||||
tile_set = ExtResource( 1 )
|
||||
cell/size = Vector2( 48, 48 )
|
||||
cell/quadrant_size = 16
|
||||
cell/custom_transform = Matrix32( 1, 0, 0, 1, 0, 0 )
|
||||
cell/half_offset = 2
|
||||
cell/tile_origin = 0
|
||||
cell/y_sort = false
|
||||
collision/use_kinematic = false
|
||||
collision/friction = 1.0
|
||||
collision/bounce = 0.0
|
||||
collision/layers = 1
|
||||
collision/mask = 1
|
||||
occluder/light_mask = 1
|
||||
tile_data = IntArray( )
|
||||
script/script = ExtResource( 3 )
|
||||
|
||||
|
Before Width: | Height: | Size: 8.5 KiB |
|
@ -1,32 +0,0 @@
|
|||
[gd_resource type="TileSet" load_steps=3 format=1]
|
||||
|
||||
[ext_resource path="res://fog.png" type="Texture" id=1]
|
||||
[ext_resource path="res://floor.png" type="Texture" id=2]
|
||||
|
||||
[resource]
|
||||
|
||||
0/name = "fog opaque"
|
||||
0/texture = ExtResource( 1 )
|
||||
0/tex_offset = Vector2( -48, -48 )
|
||||
0/region = Rect2( 0, 0, 144, 144 )
|
||||
0/occluder_offset = Vector2( 0, 0 )
|
||||
0/navigation_offset = Vector2( 0, 0 )
|
||||
0/shape_offset = Vector2( 0, 0 )
|
||||
0/shapes = [ ]
|
||||
1/name = "fog transparent"
|
||||
1/texture = ExtResource( 1 )
|
||||
1/tex_offset = Vector2( -48, -48 )
|
||||
1/region = Rect2( 144, 0, 144, 144 )
|
||||
1/occluder_offset = Vector2( 0, 0 )
|
||||
1/navigation_offset = Vector2( 0, 0 )
|
||||
1/shape_offset = Vector2( 0, 0 )
|
||||
1/shapes = [ ]
|
||||
2/name = "floor"
|
||||
2/texture = ExtResource( 2 )
|
||||
2/tex_offset = Vector2( 0, 0 )
|
||||
2/region = Rect2( 0, 0, 0, 0 )
|
||||
2/occluder_offset = Vector2( 24, 24 )
|
||||
2/navigation_offset = Vector2( 24, 24 )
|
||||
2/shape_offset = Vector2( 0, 0 )
|
||||
2/shapes = [ ]
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
[gd_scene load_steps=3 format=1]
|
||||
|
||||
[ext_resource path="res://fog.png" type="Texture" id=1]
|
||||
[ext_resource path="res://floor.png" type="Texture" id=2]
|
||||
|
||||
[node name="Node2D" type="Node2D"]
|
||||
|
||||
[node name="fog opaque" type="Sprite" parent="."]
|
||||
|
||||
texture = ExtResource( 1 )
|
||||
centered = false
|
||||
offset = Vector2( -48, -48 )
|
||||
region = true
|
||||
region_rect = Rect2( 0, 0, 144, 144 )
|
||||
|
||||
[node name="fog transparent" type="Sprite" parent="."]
|
||||
|
||||
transform/pos = Vector2( 144, 0 )
|
||||
texture = ExtResource( 1 )
|
||||
centered = false
|
||||
offset = Vector2( -48, -48 )
|
||||
region = true
|
||||
region_rect = Rect2( 144, 0, 144, 144 )
|
||||
|
||||
[node name="floor" type="Sprite" parent="."]
|
||||
|
||||
transform/pos = Vector2( 264, 24 )
|
||||
texture = ExtResource( 2 )
|
||||
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
|
||||
extends KinematicBody2D
|
||||
|
||||
# This is a simple collision demo showing how
|
||||
# the kinematic controller works.
|
||||
# move() will allow to move the node, and will
|
||||
# always move it to a non-colliding spot,
|
||||
# as long as it starts from a non-colliding spot too.
|
||||
|
||||
# Member variables
|
||||
const MOTION_SPEED = 160 # Pixels/second
|
||||
|
||||
|
||||
func _fixed_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*delta
|
||||
motion = move(motion)
|
||||
|
||||
# Make character slide nicely through the world
|
||||
var slide_attempts = 4
|
||||
while(is_colliding() and slide_attempts > 0):
|
||||
motion = get_collision_normal().slide(motion)
|
||||
motion = move(motion)
|
||||
slide_attempts -= 1
|
||||
|
||||
|
||||
func _ready():
|
||||
set_fixed_process(true)
|
Before Width: | Height: | Size: 7.1 KiB |
|
@ -1,52 +0,0 @@
|
|||
[gd_scene load_steps=4 format=1]
|
||||
|
||||
[ext_resource path="res://troll.gd" type="Script" id=1]
|
||||
[ext_resource path="res://troll.png" type="Texture" id=2]
|
||||
|
||||
[sub_resource type="CircleShape2D" id=1]
|
||||
|
||||
custom_solver_bias = 0.0
|
||||
radius = 16.0
|
||||
|
||||
[node name="troll" type="KinematicBody2D"]
|
||||
|
||||
input/pickable = false
|
||||
shapes/0/shape = SubResource( 1 )
|
||||
shapes/0/transform = Matrix32( 1, 0, 0, 1, 3.24216, 19.453 )
|
||||
shapes/0/trigger = false
|
||||
collision/layers = 1
|
||||
collision/mask = 1
|
||||
collision/margin = 0.001
|
||||
script/script = ExtResource( 1 )
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="."]
|
||||
|
||||
texture = ExtResource( 2 )
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
|
||||
transform/pos = Vector2( 3.24216, 19.453 )
|
||||
shape = SubResource( 1 )
|
||||
trigger = false
|
||||
_update_shape_index = -1
|
||||
|
||||
[node name="Camera2D" type="Camera2D" parent="."]
|
||||
|
||||
anchor_mode = 1
|
||||
rotating = false
|
||||
current = true
|
||||
zoom = Vector2( 1, 1 )
|
||||
limit/left = -10000000
|
||||
limit/top = -10000000
|
||||
limit/right = 10000000
|
||||
limit/bottom = 10000000
|
||||
drag_margin/h_enabled = true
|
||||
drag_margin/v_enabled = true
|
||||
smoothing/enable = false
|
||||
smoothing/speed = 5.0
|
||||
drag_margin/left = 0.2
|
||||
drag_margin/top = 0.2
|
||||
drag_margin/right = 0.2
|
||||
drag_margin/bottom = 0.2
|
||||
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
|
||||
extends Node2D
|
||||
|
||||
# Member variables
|
||||
const CAVE_LIMIT = 1000
|
||||
|
||||
|
||||
func _input(event):
|
||||
if (event.type == InputEvent.MOUSE_MOTION and event.button_mask&1):
|
||||
var rel_x = event.relative_x
|
||||
var cavepos = get_node("cave").get_pos()
|
||||
cavepos.x += rel_x
|
||||
if (cavepos.x < -CAVE_LIMIT):
|
||||
cavepos.x = -CAVE_LIMIT
|
||||
elif (cavepos.x > 0):
|
||||
cavepos.x = 0
|
||||
get_node("cave").set_pos(cavepos)
|
||||
|
||||
|
||||
func _ready():
|
||||
set_process_input(true)
|
|
@ -1,88 +0,0 @@
|
|||
[gd_scene load_steps=5 format=1]
|
||||
|
||||
[ext_resource path="res://beach_cave.gd" type="Script" id=1]
|
||||
[ext_resource path="res://ocean_beach.png" type="Texture" id=2]
|
||||
[ext_resource path="res://ocean_cave.png" type="Texture" id=3]
|
||||
|
||||
[sub_resource type="Environment" id=1]
|
||||
|
||||
ambient_light/enabled = false
|
||||
ambient_light/color = Color( 0, 0, 0, 1 )
|
||||
ambient_light/energy = 1.0
|
||||
fxaa/enabled = false
|
||||
background/mode = 5
|
||||
background/color = Color( 0, 0, 0, 1 )
|
||||
background/energy = 1.0
|
||||
background/scale = 1.0
|
||||
background/glow = 0.0
|
||||
background/canvas_max_layer = null
|
||||
glow/enabled = true
|
||||
glow/blur_passes = 3
|
||||
glow/blur_scale = 1.2
|
||||
glow/blur_strength = 1.2
|
||||
glow/blur_blend_mode = 0
|
||||
glow/bloom = 0.0
|
||||
glow/bloom_treshold = 0.5
|
||||
dof_blur/enabled = false
|
||||
dof_blur/blur_passes = 1
|
||||
dof_blur/begin = 100.0
|
||||
dof_blur/range = 10.0
|
||||
hdr/enabled = true
|
||||
hdr/tonemapper = 0.0
|
||||
hdr/exposure = 0.5
|
||||
hdr/white = 1.0
|
||||
hdr/glow_treshold = 0.7
|
||||
hdr/glow_scale = 0.5
|
||||
hdr/min_luminance = 0.3
|
||||
hdr/max_luminance = 8.0
|
||||
hdr/exposure_adj_speed = 2.0
|
||||
fog/enabled = false
|
||||
fog/begin = 100.0
|
||||
fog/begin_color = Color( 0, 0, 0, 1 )
|
||||
fog/end_color = Color( 0, 0, 0, 1 )
|
||||
fog/attenuation = 1.0
|
||||
fog/bg = true
|
||||
bcs/enabled = false
|
||||
bcs/brightness = 1.0
|
||||
bcs/contrast = 1.0
|
||||
bcs/saturation = 1.0
|
||||
srgb/enabled = true
|
||||
|
||||
[node name="hdr" type="Node2D"]
|
||||
|
||||
script/script = ExtResource( 1 )
|
||||
|
||||
[node name="beach" type="Sprite" parent="."]
|
||||
|
||||
texture = ExtResource( 2 )
|
||||
centered = false
|
||||
modulate = Color( 2, 2, 2, 1 )
|
||||
|
||||
[node name="cave" type="Sprite" parent="."]
|
||||
|
||||
transform/scale = Vector2( 1.2, 1 )
|
||||
texture = ExtResource( 3 )
|
||||
centered = false
|
||||
modulate = Color( 0.233166, 0.221219, 0.23582, 1 )
|
||||
|
||||
[node name="environment" type="WorldEnvironment" parent="."]
|
||||
|
||||
_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )
|
||||
environment = SubResource( 1 )
|
||||
|
||||
[node name="Label" type="Label" parent="."]
|
||||
|
||||
focus/ignore_mouse = true
|
||||
focus/stop_mouse = true
|
||||
size_flags/horizontal = 2
|
||||
margin/left = 0.0
|
||||
margin/top = 0.0
|
||||
margin/right = 40.0
|
||||
margin/bottom = 13.0
|
||||
custom_colors/font_color = Color( 0.213955, 0.205626, 0.20313, 1 )
|
||||
text = "Drag Left and Right"
|
||||
percent_visible = 1.0
|
||||
lines_skipped = 0
|
||||
max_lines_visible = -1
|
||||
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
[application]
|
||||
|
||||
name="HDR for 2D"
|
||||
main_scene="res://beach_cave.tscn"
|
||||
icon="res://icon.png"
|
||||
|
||||
[display]
|
||||
|
||||
width=1080
|
||||
height=720
|
||||
|
||||
[rasterizer]
|
||||
|
||||
blur_buffer_size=128
|
Before Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 433 KiB |
|
@ -1 +0,0 @@
|
|||
tolinear=true
|
Before Width: | Height: | Size: 728 KiB |
|
@ -1 +0,0 @@
|
|||
tolinear=true
|
Before Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 21 KiB |
|
@ -1,12 +0,0 @@
|
|||
[application]
|
||||
|
||||
name="Hexagonal Game"
|
||||
main_scene="res://map.tscn"
|
||||
icon="res://icon.png"
|
||||
|
||||
[input]
|
||||
|
||||
move_up=[key(Up)]
|
||||
move_left=[key(Left)]
|
||||
move_right=[key(Right)]
|
||||
move_bottom=[key(Down)]
|
Before Width: | Height: | Size: 5.8 KiB |
|
@ -1,31 +0,0 @@
|
|||
[gd_scene load_steps=3 format=1]
|
||||
|
||||
[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="TileMap" type="TileMap" parent="."]
|
||||
|
||||
mode = 0
|
||||
tile_set = ExtResource( 1 )
|
||||
cell/size = Vector2( 82, 94 )
|
||||
cell/quadrant_size = 16
|
||||
cell/custom_transform = Matrix32( 1, 0, 0, 1, 0, 0 )
|
||||
cell/half_offset = 1
|
||||
cell/tile_origin = 0
|
||||
cell/y_sort = false
|
||||
collision/use_kinematic = false
|
||||
collision/friction = 1.0
|
||||
collision/bounce = 0.0
|
||||
collision/layers = 1
|
||||
collision/mask = 1
|
||||
occluder/light_mask = 1
|
||||
tile_data = IntArray( -458747, 1073741831, -393213, 1073741831, -393212, 1073741831, -393211, 6, -393210, 1073741831, -393209, 1073741830, -393208, 1073741830, -393207, 6, -393206, 8, -327679, 1073741831, -327678, 1073741831, -327677, 1073741831, -327676, 1073741830, -327675, 1073741831, -327674, 6, -327673, 6, -327672, 6, -327671, 6, -327670, 6, -327669, 0, -327668, 0, -262143, 1073741831, -262142, 1073741831, -262141, 6, -262140, 6, -262139, 0, -262138, 6, -262137, 1, -262136, 0, -262135, 1, -262134, 1, -262133, 0, -262132, 0, -262131, 0, -196608, 9, -196607, 1073741832, -196606, 1073741830, -196605, 2, -196604, 2, -196603, 1073741845, -196602, 21, -196601, 19, -196600, 1073741826, -196599, 0, -196598, 16, -196597, 0, -196596, 0, -196595, 0, -196594, 0, -196593, 0, -131071, 0, -131070, 1, -131069, 1073741827, -131068, 1073741846, -131067, 20, -131066, 19, -131065, 2, -131064, 0, -131063, 14, -131062, 0, -131061, 0, -131060, 0, -131059, 0, -131058, 0, -131057, 0, -131056, 0, -65534, 1, -65533, 2, -65532, 1073741827, -65531, 1, -65530, 1, -65529, 0, -65528, 10, -65527, 12, -65526, 0, -65525, 0, -65524, 0, -65523, 0, -65522, 0, -65521, 0, -65520, 0, 1, 0, 2, 0, 3, 2, 4, 1073741826, 5, 1, 6, 15, 7, 0, 8, 0, 9, 0, 10, 0, 11, 0, 12, 0, 13, 0, 14, 0, 15, 0, 16, 0, 65537, 0, 65538, 1, 65539, 1610612749, 65540, 1, 65541, 0, 65542, 0, 65543, 0, 65544, 0, 65545, 1610612753, 65546, 0, 65547, 0, 65548, 0, 65549, 0, 65550, 1073741848, 65551, 1073741849, 65552, 0, 131073, 0, 131074, 0, 131075, 0, 131076, 0, 131077, 1610612751, 131078, 1610612752, 131079, 1610612752, 131080, 1610612751, 131081, 1610612751, 131082, 0, 131083, 0, 131084, 0, 131085, 0, 131086, 0, 196612, 0, 196613, 1610612751, 196614, 1610612752, 196615, 1610612751, 196616, 1610612751, 196617, 1073741839, 196618, 1073741839, 196619, 0, 196620, 0, 196621, 0, 262150, 0, 262152, 0, 262154, 0, 262156, 0 )
|
||||
|
||||
[node name="troll" parent="." instance=ExtResource( 2 )]
|
||||
|
||||
transform/pos = Vector2( 602.819, -39.2876 )
|
||||
collision/margin = 0.001
|
||||
|
||||
|
|
@ -1,240 +0,0 @@
|
|||
[gd_resource type="TileSet" load_steps=27 format=1]
|
||||
|
||||
[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]
|
||||
|
||||
[resource]
|
||||
|
||||
0/name = "Tile 1"
|
||||
0/texture = ExtResource( 1 )
|
||||
0/tex_offset = Vector2( -24, -17 )
|
||||
0/region = Rect2( 0, 0, 0, 0 )
|
||||
0/occluder_offset = Vector2( -0, -0 )
|
||||
0/navigation_offset = Vector2( -0, -0 )
|
||||
0/shape_offset = Vector2( 0, 0 )
|
||||
0/shapes = [ ]
|
||||
1/name = "Tile 2"
|
||||
1/texture = ExtResource( 2 )
|
||||
1/tex_offset = Vector2( -24, -17 )
|
||||
1/region = Rect2( 0, 0, 0, 0 )
|
||||
1/occluder_offset = Vector2( -0, -0 )
|
||||
1/navigation_offset = Vector2( -0, -0 )
|
||||
1/shape_offset = Vector2( 0, 0 )
|
||||
1/shapes = [ ]
|
||||
2/name = "Tile 3"
|
||||
2/texture = ExtResource( 13 )
|
||||
2/tex_offset = Vector2( -24, -17 )
|
||||
2/region = Rect2( 0, 0, 0, 0 )
|
||||
2/occluder_offset = Vector2( -0, -0 )
|
||||
2/navigation_offset = Vector2( -0, -0 )
|
||||
2/shape_offset = Vector2( 0, 0 )
|
||||
2/shapes = [ ]
|
||||
3/name = "Tile 4"
|
||||
3/texture = ExtResource( 20 )
|
||||
3/tex_offset = Vector2( -24, -17 )
|
||||
3/region = Rect2( 0, 0, 0, 0 )
|
||||
3/occluder_offset = Vector2( -0, -0 )
|
||||
3/navigation_offset = Vector2( -0, -0 )
|
||||
3/shape_offset = Vector2( 0, 0 )
|
||||
3/shapes = [ ]
|
||||
4/name = "Tile 5"
|
||||
4/texture = ExtResource( 21 )
|
||||
4/tex_offset = Vector2( -24, -17 )
|
||||
4/region = Rect2( 0, 0, 0, 0 )
|
||||
4/occluder_offset = Vector2( -0, -0 )
|
||||
4/navigation_offset = Vector2( -0, -0 )
|
||||
4/shape_offset = Vector2( 0, 0 )
|
||||
4/shapes = [ ]
|
||||
5/name = "Tile 6"
|
||||
5/texture = ExtResource( 22 )
|
||||
5/tex_offset = Vector2( -24, -17 )
|
||||
5/region = Rect2( 0, 0, 0, 0 )
|
||||
5/occluder_offset = Vector2( -0, -0 )
|
||||
5/navigation_offset = Vector2( -0, -0 )
|
||||
5/shape_offset = Vector2( 0, 0 )
|
||||
5/shapes = [ ]
|
||||
6/name = "Tile 7"
|
||||
6/texture = ExtResource( 23 )
|
||||
6/tex_offset = Vector2( -24, -17 )
|
||||
6/region = Rect2( 0, 0, 0, 0 )
|
||||
6/occluder_offset = Vector2( -0, -0 )
|
||||
6/navigation_offset = Vector2( -0, -0 )
|
||||
6/shape_offset = Vector2( 0, 0 )
|
||||
6/shapes = [ ]
|
||||
7/name = "Tile 8"
|
||||
7/texture = ExtResource( 24 )
|
||||
7/tex_offset = Vector2( -24, -17 )
|
||||
7/region = Rect2( 0, 0, 0, 0 )
|
||||
7/occluder_offset = Vector2( -0, -0 )
|
||||
7/navigation_offset = Vector2( -0, -0 )
|
||||
7/shape_offset = Vector2( 0, 0 )
|
||||
7/shapes = [ ]
|
||||
8/name = "Tile 9"
|
||||
8/texture = ExtResource( 25 )
|
||||
8/tex_offset = Vector2( -24, -17 )
|
||||
8/region = Rect2( 0, 0, 0, 0 )
|
||||
8/occluder_offset = Vector2( -0, -0 )
|
||||
8/navigation_offset = Vector2( -0, -0 )
|
||||
8/shape_offset = Vector2( 0, 0 )
|
||||
8/shapes = [ ]
|
||||
9/name = "Tile 10"
|
||||
9/texture = ExtResource( 26 )
|
||||
9/tex_offset = Vector2( -24, -17 )
|
||||
9/region = Rect2( 0, 0, 0, 0 )
|
||||
9/occluder_offset = Vector2( -0, -0 )
|
||||
9/navigation_offset = Vector2( -0, -0 )
|
||||
9/shape_offset = Vector2( 0, 0 )
|
||||
9/shapes = [ ]
|
||||
10/name = "Tile 11"
|
||||
10/texture = ExtResource( 3 )
|
||||
10/tex_offset = Vector2( -24, -17 )
|
||||
10/region = Rect2( 0, 0, 0, 0 )
|
||||
10/occluder_offset = Vector2( -0, -0 )
|
||||
10/navigation_offset = Vector2( -0, -0 )
|
||||
10/shape_offset = Vector2( 0, 0 )
|
||||
10/shapes = [ ]
|
||||
11/name = "Tile 12"
|
||||
11/texture = ExtResource( 4 )
|
||||
11/tex_offset = Vector2( -24, -17 )
|
||||
11/region = Rect2( 0, 0, 0, 0 )
|
||||
11/occluder_offset = Vector2( -0, -0 )
|
||||
11/navigation_offset = Vector2( -0, -0 )
|
||||
11/shape_offset = Vector2( 0, 0 )
|
||||
11/shapes = [ ]
|
||||
12/name = "Tile 13"
|
||||
12/texture = ExtResource( 5 )
|
||||
12/tex_offset = Vector2( -24, -17 )
|
||||
12/region = Rect2( 0, 0, 0, 0 )
|
||||
12/occluder_offset = Vector2( -0, -0 )
|
||||
12/navigation_offset = Vector2( -0, -0 )
|
||||
12/shape_offset = Vector2( 0, 0 )
|
||||
12/shapes = [ ]
|
||||
13/name = "Tile 14"
|
||||
13/texture = ExtResource( 6 )
|
||||
13/tex_offset = Vector2( -24, -17 )
|
||||
13/region = Rect2( 0, 0, 0, 0 )
|
||||
13/occluder_offset = Vector2( -0, -0 )
|
||||
13/navigation_offset = Vector2( -0, -0 )
|
||||
13/shape_offset = Vector2( 0, 0 )
|
||||
13/shapes = [ ]
|
||||
14/name = "Tile 15"
|
||||
14/texture = ExtResource( 7 )
|
||||
14/tex_offset = Vector2( -24, -17 )
|
||||
14/region = Rect2( 0, 0, 0, 0 )
|
||||
14/occluder_offset = Vector2( -0, -0 )
|
||||
14/navigation_offset = Vector2( -0, -0 )
|
||||
14/shape_offset = Vector2( 0, 0 )
|
||||
14/shapes = [ ]
|
||||
15/name = "Tile 16"
|
||||
15/texture = ExtResource( 8 )
|
||||
15/tex_offset = Vector2( -24, -17 )
|
||||
15/region = Rect2( 0, 0, 0, 0 )
|
||||
15/occluder_offset = Vector2( -0, -0 )
|
||||
15/navigation_offset = Vector2( -0, -0 )
|
||||
15/shape_offset = Vector2( 0, 0 )
|
||||
15/shapes = [ ]
|
||||
16/name = "Tile 17"
|
||||
16/texture = ExtResource( 9 )
|
||||
16/tex_offset = Vector2( -24, -17 )
|
||||
16/region = Rect2( 0, 0, 0, 0 )
|
||||
16/occluder_offset = Vector2( -0, -0 )
|
||||
16/navigation_offset = Vector2( -0, -0 )
|
||||
16/shape_offset = Vector2( 0, 0 )
|
||||
16/shapes = [ ]
|
||||
17/name = "Tile 18"
|
||||
17/texture = ExtResource( 10 )
|
||||
17/tex_offset = Vector2( -24, -17 )
|
||||
17/region = Rect2( 0, 0, 0, 0 )
|
||||
17/occluder_offset = Vector2( -0, -0 )
|
||||
17/navigation_offset = Vector2( -0, -0 )
|
||||
17/shape_offset = Vector2( 0, 0 )
|
||||
17/shapes = [ ]
|
||||
18/name = "Tile 19"
|
||||
18/texture = ExtResource( 11 )
|
||||
18/tex_offset = Vector2( -24, -17 )
|
||||
18/region = Rect2( 0, 0, 0, 0 )
|
||||
18/occluder_offset = Vector2( -0, -0 )
|
||||
18/navigation_offset = Vector2( -0, -0 )
|
||||
18/shape_offset = Vector2( 0, 0 )
|
||||
18/shapes = [ ]
|
||||
19/name = "Tile 20"
|
||||
19/texture = ExtResource( 12 )
|
||||
19/tex_offset = Vector2( -24, -17 )
|
||||
19/region = Rect2( 0, 0, 0, 0 )
|
||||
19/occluder_offset = Vector2( -0, -0 )
|
||||
19/navigation_offset = Vector2( -0, -0 )
|
||||
19/shape_offset = Vector2( 0, 0 )
|
||||
19/shapes = [ ]
|
||||
20/name = "Tile 21"
|
||||
20/texture = ExtResource( 14 )
|
||||
20/tex_offset = Vector2( -24, -17 )
|
||||
20/region = Rect2( 0, 0, 0, 0 )
|
||||
20/occluder_offset = Vector2( -0, -0 )
|
||||
20/navigation_offset = Vector2( -0, -0 )
|
||||
20/shape_offset = Vector2( 0, 0 )
|
||||
20/shapes = [ ]
|
||||
21/name = "Tile 22"
|
||||
21/texture = ExtResource( 15 )
|
||||
21/tex_offset = Vector2( -24, -17 )
|
||||
21/region = Rect2( 0, 0, 0, 0 )
|
||||
21/occluder_offset = Vector2( -0, -0 )
|
||||
21/navigation_offset = Vector2( -0, -0 )
|
||||
21/shape_offset = Vector2( 0, 0 )
|
||||
21/shapes = [ ]
|
||||
22/name = "Tile 23"
|
||||
22/texture = ExtResource( 16 )
|
||||
22/tex_offset = Vector2( -24, -17 )
|
||||
22/region = Rect2( 0, 0, 0, 0 )
|
||||
22/occluder_offset = Vector2( -0, -0 )
|
||||
22/navigation_offset = Vector2( -0, -0 )
|
||||
22/shape_offset = Vector2( 0, 0 )
|
||||
22/shapes = [ ]
|
||||
23/name = "Tile 24"
|
||||
23/texture = ExtResource( 17 )
|
||||
23/tex_offset = Vector2( -24, -17 )
|
||||
23/region = Rect2( 0, 0, 0, 0 )
|
||||
23/occluder_offset = Vector2( -0, -0 )
|
||||
23/navigation_offset = Vector2( -0, -0 )
|
||||
23/shape_offset = Vector2( 0, 0 )
|
||||
23/shapes = [ ]
|
||||
24/name = "Tile 25"
|
||||
24/texture = ExtResource( 18 )
|
||||
24/tex_offset = Vector2( -24, -17 )
|
||||
24/region = Rect2( 0, 0, 0, 0 )
|
||||
24/occluder_offset = Vector2( -0, -0 )
|
||||
24/navigation_offset = Vector2( -0, -0 )
|
||||
24/shape_offset = Vector2( 0, 0 )
|
||||
24/shapes = [ ]
|
||||
25/name = "Tile 26"
|
||||
25/texture = ExtResource( 19 )
|
||||
25/tex_offset = Vector2( -24, -17 )
|
||||
25/region = Rect2( 0, 0, 0, 0 )
|
||||
25/occluder_offset = Vector2( -0, -0 )
|
||||
25/navigation_offset = Vector2( -0, -0 )
|
||||
25/shape_offset = Vector2( 0, 0 )
|
||||
25/shapes = [ ]
|
||||
|
|
@ -1,214 +0,0 @@
|
|||
[gd_scene load_steps=27 format=1]
|
||||
|
||||
[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]
|
||||
|
||||
[node name="Node2D" type="Node2D"]
|
||||
|
||||
[node name="Tile 1" type="Sprite" parent="."]
|
||||
|
||||
transform/pos = Vector2( 96.6174, 42.2665 )
|
||||
texture = ExtResource( 1 )
|
||||
centered = false
|
||||
offset = Vector2( -24, -17 )
|
||||
|
||||
[node name="Tile 2" type="Sprite" parent="."]
|
||||
|
||||
transform/pos = Vector2( 96.6174, 42.2665 )
|
||||
texture = ExtResource( 2 )
|
||||
centered = false
|
||||
offset = Vector2( -24, -17 )
|
||||
|
||||
[node name="Tile 3" type="Sprite" parent="."]
|
||||
|
||||
transform/pos = Vector2( 96.6174, 42.2665 )
|
||||
texture = ExtResource( 3 )
|
||||
centered = false
|
||||
offset = Vector2( -24, -17 )
|
||||
|
||||
[node name="Tile 4" type="Sprite" parent="."]
|
||||
|
||||
transform/pos = Vector2( 96.6174, 42.2665 )
|
||||
texture = ExtResource( 4 )
|
||||
centered = false
|
||||
offset = Vector2( -24, -17 )
|
||||
|
||||
[node name="Tile 5" type="Sprite" parent="."]
|
||||
|
||||
transform/pos = Vector2( 96.6174, 42.2665 )
|
||||
texture = ExtResource( 5 )
|
||||
centered = false
|
||||
offset = Vector2( -24, -17 )
|
||||
|
||||
[node name="Tile 6" type="Sprite" parent="."]
|
||||
|
||||
transform/pos = Vector2( 96.6174, 42.2665 )
|
||||
texture = ExtResource( 6 )
|
||||
centered = false
|
||||
offset = Vector2( -24, -17 )
|
||||
|
||||
[node name="Tile 7" type="Sprite" parent="."]
|
||||
|
||||
transform/pos = Vector2( 96.6174, 42.2665 )
|
||||
texture = ExtResource( 7 )
|
||||
centered = false
|
||||
offset = Vector2( -24, -17 )
|
||||
|
||||
[node name="Tile 8" type="Sprite" parent="."]
|
||||
|
||||
transform/pos = Vector2( 96.6174, 42.2665 )
|
||||
texture = ExtResource( 8 )
|
||||
centered = false
|
||||
offset = Vector2( -24, -17 )
|
||||
|
||||
[node name="Tile 9" type="Sprite" parent="."]
|
||||
|
||||
transform/pos = Vector2( 96.6174, 42.2665 )
|
||||
texture = ExtResource( 9 )
|
||||
centered = false
|
||||
offset = Vector2( -24, -17 )
|
||||
|
||||
[node name="Tile 10" type="Sprite" parent="."]
|
||||
|
||||
transform/pos = Vector2( 96.6174, 42.2665 )
|
||||
texture = ExtResource( 10 )
|
||||
centered = false
|
||||
offset = Vector2( -24, -17 )
|
||||
|
||||
[node name="Tile 11" type="Sprite" parent="."]
|
||||
|
||||
transform/pos = Vector2( 96.6174, 42.2665 )
|
||||
texture = ExtResource( 11 )
|
||||
centered = false
|
||||
offset = Vector2( -24, -17 )
|
||||
|
||||
[node name="Tile 12" type="Sprite" parent="."]
|
||||
|
||||
transform/pos = Vector2( 96.6174, 42.2665 )
|
||||
texture = ExtResource( 12 )
|
||||
centered = false
|
||||
offset = Vector2( -24, -17 )
|
||||
|
||||
[node name="Tile 13" type="Sprite" parent="."]
|
||||
|
||||
transform/pos = Vector2( 96.6174, 42.2665 )
|
||||
texture = ExtResource( 13 )
|
||||
centered = false
|
||||
offset = Vector2( -24, -17 )
|
||||
|
||||
[node name="Tile 14" type="Sprite" parent="."]
|
||||
|
||||
transform/pos = Vector2( 96.6174, 42.2665 )
|
||||
texture = ExtResource( 14 )
|
||||
centered = false
|
||||
offset = Vector2( -24, -17 )
|
||||
|
||||
[node name="Tile 15" type="Sprite" parent="."]
|
||||
|
||||
transform/pos = Vector2( 96.6174, 42.2665 )
|
||||
texture = ExtResource( 15 )
|
||||
centered = false
|
||||
offset = Vector2( -24, -17 )
|
||||
|
||||
[node name="Tile 16" type="Sprite" parent="."]
|
||||
|
||||
transform/pos = Vector2( 96.6174, 42.2665 )
|
||||
texture = ExtResource( 16 )
|
||||
centered = false
|
||||
offset = Vector2( -24, -17 )
|
||||
|
||||
[node name="Tile 17" type="Sprite" parent="."]
|
||||
|
||||
transform/pos = Vector2( 96.6174, 42.2665 )
|
||||
texture = ExtResource( 17 )
|
||||
centered = false
|
||||
offset = Vector2( -24, -17 )
|
||||
|
||||
[node name="Tile 18" type="Sprite" parent="."]
|
||||
|
||||
transform/pos = Vector2( 96.6174, 42.2665 )
|
||||
texture = ExtResource( 18 )
|
||||
centered = false
|
||||
offset = Vector2( -24, -17 )
|
||||
|
||||
[node name="Tile 19" type="Sprite" parent="."]
|
||||
|
||||
transform/pos = Vector2( 96.6174, 42.2665 )
|
||||
texture = ExtResource( 19 )
|
||||
centered = false
|
||||
offset = Vector2( -24, -17 )
|
||||
|
||||
[node name="Tile 20" type="Sprite" parent="."]
|
||||
|
||||
transform/pos = Vector2( 96.6174, 42.2665 )
|
||||
texture = ExtResource( 20 )
|
||||
centered = false
|
||||
offset = Vector2( -24, -17 )
|
||||
|
||||
[node name="Tile 21" type="Sprite" parent="."]
|
||||
|
||||
transform/pos = Vector2( 96.6174, 42.2665 )
|
||||
texture = ExtResource( 21 )
|
||||
centered = false
|
||||
offset = Vector2( -24, -17 )
|
||||
|
||||
[node name="Tile 22" type="Sprite" parent="."]
|
||||
|
||||
transform/pos = Vector2( 96.6174, 42.2665 )
|
||||
texture = ExtResource( 22 )
|
||||
centered = false
|
||||
offset = Vector2( -24, -17 )
|
||||
|
||||
[node name="Tile 23" type="Sprite" parent="."]
|
||||
|
||||
transform/pos = Vector2( 96.6174, 42.2665 )
|
||||
texture = ExtResource( 23 )
|
||||
centered = false
|
||||
offset = Vector2( -24, -17 )
|
||||
|
||||
[node name="Tile 24" type="Sprite" parent="."]
|
||||
|
||||
transform/pos = Vector2( 96.6174, 42.2665 )
|
||||
texture = ExtResource( 24 )
|
||||
centered = false
|
||||
offset = Vector2( -24, -17 )
|
||||
|
||||
[node name="Tile 25" type="Sprite" parent="."]
|
||||
|
||||
transform/pos = Vector2( 96.6174, 42.2665 )
|
||||
texture = ExtResource( 25 )
|
||||
centered = false
|
||||
offset = Vector2( -24, -17 )
|
||||
|
||||
[node name="Tile 26" type="Sprite" parent="."]
|
||||
|
||||
transform/pos = Vector2( 96.6174, 42.2665 )
|
||||
texture = ExtResource( 26 )
|
||||
centered = false
|
||||
offset = Vector2( -24, -17 )
|
||||
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
|
||||
extends KinematicBody2D
|
||||
|
||||
# This is a simple collision demo showing how
|
||||
# the kinematic controller works.
|
||||
# move() will allow to move the node, and will
|
||||
# always move it to a non-colliding spot,
|
||||
# as long as it starts from a non-colliding spot too.
|
||||
|
||||
# Member variables
|
||||
const MOTION_SPEED = 160 # Pixels/second
|
||||
|
||||
|
||||
func _fixed_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*delta
|
||||
motion = move(motion)
|
||||
|
||||
# Make character slide nicely through the world
|
||||
var slide_attempts = 4
|
||||
while(is_colliding() and slide_attempts > 0):
|
||||
motion = get_collision_normal().slide(motion)
|
||||
motion = move(motion)
|
||||
slide_attempts -= 1
|
||||
|
||||
|
||||
func _ready():
|
||||
set_fixed_process(true)
|
Before Width: | Height: | Size: 7.1 KiB |
|
@ -1,52 +0,0 @@
|
|||
[gd_scene load_steps=4 format=1]
|
||||
|
||||
[ext_resource path="res://troll.gd" type="Script" id=1]
|
||||
[ext_resource path="res://troll.png" type="Texture" id=2]
|
||||
|
||||
[sub_resource type="CircleShape2D" id=1]
|
||||
|
||||
custom_solver_bias = 0.0
|
||||
radius = 16.0
|
||||
|
||||
[node name="troll" type="KinematicBody2D"]
|
||||
|
||||
input/pickable = false
|
||||
shapes/0/shape = SubResource( 1 )
|
||||
shapes/0/transform = Matrix32( 1, 0, 0, 1, 3.24216, 19.453 )
|
||||
shapes/0/trigger = false
|
||||
collision/layers = 1
|
||||
collision/mask = 1
|
||||
collision/margin = 0.001
|
||||
script/script = ExtResource( 1 )
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="."]
|
||||
|
||||
texture = ExtResource( 2 )
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
|
||||
transform/pos = Vector2( 3.24216, 19.453 )
|
||||
shape = SubResource( 1 )
|
||||
trigger = false
|
||||
_update_shape_index = -1
|
||||
|
||||
[node name="Camera2D" type="Camera2D" parent="."]
|
||||
|
||||
anchor_mode = 1
|
||||
rotating = false
|
||||
current = true
|
||||
zoom = Vector2( 1, 1 )
|
||||
limit/left = -10000000
|
||||
limit/top = -10000000
|
||||
limit/right = 10000000
|
||||
limit/bottom = 10000000
|
||||
drag_margin/h_enabled = true
|
||||
drag_margin/v_enabled = true
|
||||
smoothing/enable = false
|
||||
smoothing/speed = 5.0
|
||||
drag_margin/left = 0.2
|
||||
drag_margin/top = 0.2
|
||||
drag_margin/right = 0.2
|
||||
drag_margin/bottom = 0.2
|
||||
|
||||
|
|
@ -1,49 +0,0 @@
|
|||
[gd_scene load_steps=3 format=1]
|
||||
|
||||
[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="floor" type="TileMap" parent="."]
|
||||
|
||||
mode = 1
|
||||
tile_set = ExtResource( 1 )
|
||||
cell/size = Vector2( 128, 64 )
|
||||
cell/quadrant_size = 16
|
||||
cell/custom_transform = Matrix32( 1, 0, 0, 1, 0, 0 )
|
||||
cell/half_offset = 2
|
||||
cell/tile_origin = 1
|
||||
cell/y_sort = false
|
||||
collision/use_kinematic = false
|
||||
collision/friction = 1.0
|
||||
collision/bounce = 0.0
|
||||
collision/layers = 1
|
||||
collision/mask = 1
|
||||
occluder/light_mask = 1
|
||||
tile_data = IntArray( -851956, 0, -851955, 0, -851954, 0, -786420, 1, -786419, 0, -786418, 0, -720884, 0, -720883, 0, -720882, 0, -655348, 1, -655347, 0, -655346, 0, -589812, 1, -589811, 0, -589810, 0, -524276, 0, -524275, 1, -524274, 0, -458740, 0, -458739, 0, -458738, 0, -393210, 0, -393209, 0, -393208, 0, -393207, 0, -393206, 0, -393205, 0, -393204, 0, -393203, 0, -393202, 0, -327674, 0, -327673, 0, -327672, 1, -327671, 1, -327670, 1, -327669, 1, -327668, 1, -327667, 0, -327666, 0, -262138, 0, -262137, 0, -262136, 0, -262135, 0, -262134, 0, -262133, 0, -262132, 0, -262131, 0, -262130, 0, -196602, 0, -196601, 0, -196600, 0, -196599, 0, -196598, 0, -196597, 0, -196596, 0, -196595, 0, -196594, 0, -131066, 0, -131065, 0, -131064, 0, -131063, 0, -65530, 0, -65529, 0, -65528, 0, -65527, 0, 6, 0, 7, 1, 8, 0, 9, 0, 65542, 0, 65543, 0, 65544, 0, 65545, 0, 131078, 0, 131079, 0, 131080, 0, 131081, 0, 196614, 0, 196615, 0, 196616, 0 )
|
||||
|
||||
[node name="walls" type="TileMap" parent="."]
|
||||
|
||||
mode = 1
|
||||
tile_set = ExtResource( 1 )
|
||||
cell/size = Vector2( 128, 64 )
|
||||
cell/quadrant_size = 16
|
||||
cell/custom_transform = Matrix32( 1, 0, 0, 1, 0, 0 )
|
||||
cell/half_offset = 2
|
||||
cell/tile_origin = 1
|
||||
cell/y_sort = true
|
||||
collision/use_kinematic = false
|
||||
collision/friction = 1.0
|
||||
collision/bounce = 0.0
|
||||
collision/layers = 1
|
||||
collision/mask = 1
|
||||
occluder/light_mask = 1
|
||||
tile_data = IntArray( -917493, 2, -917492, 2, -917491, 2, -917490, 2, -917489, 2, -851957, 2, -851956, 3, -851954, 3, -851953, 2, -786421, 2, -786420, 3, -786418, 3, -786417, 2, -720885, 2, -720881, 2, -655349, 2, -655348, 2, -655346, 3, -655345, 2, -589813, 2, -589809, 2, -524277, 2, -524273, 2, -458747, 2, -458746, 2, -458745, 2, -458744, 536870916, -458743, 536870916, -458742, 2, -458741, 2, -458740, 2, -458738, 2, -458737, 2, -393211, 2, -393209, 3, -393205, 3, -393201, 2, -327675, 4, -327665, 2, -262139, 4, -262134, 3, -262133, 3, -262129, 2, -196603, 2, -196601, 3, -196593, 2, -131067, 2, -131066, 3, -131062, 2, -131061, 2, -131060, 2, -131059, 2, -131058, 2, -131057, 2, -65531, 2, -65530, 2, -65527, 2, -65526, 2, 5, 2, 10, 2, 65541, 2, 65543, 3, 65546, 2, 131077, 2, 131082, 2, 196613, 2, 196618, 2, 262149, 2, 262150, 2, 262151, 2, 262152, 2, 262153, 2, 262154, 2 )
|
||||
|
||||
[node name="troll" parent="walls" instance=ExtResource( 2 )]
|
||||
|
||||
transform/pos = Vector2( 299.38, 326.037 )
|
||||
collision/margin = 0.001
|
||||
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
[application]
|
||||
|
||||
name="Isometric Game"
|
||||
main_scene="res://dungeon.tscn"
|
||||
icon="res://icon.png"
|
||||
|
||||
[image_loader]
|
||||
|
||||
filter=false
|
||||
gen_mipmaps=false
|
||||
|
||||
[input]
|
||||
|
||||
move_up=[key(Up)]
|
||||
move_left=[key(Left)]
|
||||
move_right=[key(Right)]
|
||||
move_bottom=[key(Down)]
|
||||
|
||||
[rasterizer]
|
||||
|
||||
use_pixel_snap=true
|
Before Width: | Height: | Size: 9.2 KiB |
Before Width: | Height: | Size: 217 KiB |
|
@ -1,67 +0,0 @@
|
|||
[gd_resource type="TileSet" load_steps=6 format=1]
|
||||
|
||||
[ext_resource path="res://isotiles.png" type="Texture" id=1]
|
||||
|
||||
[sub_resource type="ConvexPolygonShape2D" id=1]
|
||||
|
||||
custom_solver_bias = 0.0
|
||||
points = Vector2Array( -68, 2, -4, -30, 60, 2, -4, 34 )
|
||||
|
||||
[sub_resource type="ConvexPolygonShape2D" id=2]
|
||||
|
||||
custom_solver_bias = 0.0
|
||||
points = Vector2Array( -20, -6, -4, -22, 12, -22, 4, 10, -4, 10 )
|
||||
|
||||
[sub_resource type="ConvexPolygonShape2D" id=3]
|
||||
|
||||
custom_solver_bias = 0.0
|
||||
points = Vector2Array( 28, -6, 4, 10, 12, -22 )
|
||||
|
||||
[sub_resource type="ConvexPolygonShape2D" id=4]
|
||||
|
||||
custom_solver_bias = 0.0
|
||||
points = Vector2Array( 66.095, -0.62516, -5.90501, 31.3748, -21.905, 23.3748, 50.095, -8.62516 )
|
||||
|
||||
[resource]
|
||||
|
||||
0/name = "base"
|
||||
0/texture = ExtResource( 1 )
|
||||
0/tex_offset = Vector2( -4, 6 )
|
||||
0/region = Rect2( 28, 92, 132, 84 )
|
||||
0/occluder_offset = Vector2( 66, 42 )
|
||||
0/navigation_offset = Vector2( 66, 42 )
|
||||
0/shape_offset = Vector2( 0, 0 )
|
||||
0/shapes = [ ]
|
||||
1/name = "base2"
|
||||
1/texture = ExtResource( 1 )
|
||||
1/tex_offset = Vector2( -4, 6 )
|
||||
1/region = Rect2( 220, 92, 132, 84 )
|
||||
1/occluder_offset = Vector2( 66, 42 )
|
||||
1/navigation_offset = Vector2( 66, 42 )
|
||||
1/shape_offset = Vector2( 0, 0 )
|
||||
1/shapes = [ ]
|
||||
2/name = "wall"
|
||||
2/texture = ExtResource( 1 )
|
||||
2/tex_offset = Vector2( -4, -32 )
|
||||
2/region = Rect2( 28, 220, 132, 136 )
|
||||
2/occluder_offset = Vector2( 66, 68 )
|
||||
2/navigation_offset = Vector2( 66, 68 )
|
||||
2/shape_offset = Vector2( 66, 68 )
|
||||
2/shapes = [ SubResource( 1 ) ]
|
||||
3/name = "column"
|
||||
3/texture = ExtResource( 1 )
|
||||
3/tex_offset = Vector2( -2, -32 )
|
||||
3/region = Rect2( 220, 220, 132, 136 )
|
||||
3/occluder_offset = Vector2( 66, 68 )
|
||||
3/navigation_offset = Vector2( 66, 68 )
|
||||
3/shape_offset = Vector2( 66, 68 )
|
||||
3/shapes = [ SubResource( 2 ), SubResource( 3 ) ]
|
||||
4/name = "door1"
|
||||
4/texture = ExtResource( 1 )
|
||||
4/tex_offset = Vector2( 16, -22 )
|
||||
4/region = Rect2( 24, 408, 132, 136 )
|
||||
4/occluder_offset = Vector2( 66, 68 )
|
||||
4/navigation_offset = Vector2( 66, 68 )
|
||||
4/shape_offset = Vector2( 66, 68 )
|
||||
4/shapes = [ SubResource( 4 ) ]
|
||||
|
|
@ -1,130 +0,0 @@
|
|||
[gd_scene load_steps=6 format=1]
|
||||
|
||||
[ext_resource path="res://isotiles.png" type="Texture" id=1]
|
||||
|
||||
[sub_resource type="ConvexPolygonShape2D" id=1]
|
||||
|
||||
custom_solver_bias = 0.0
|
||||
points = Vector2Array( -68, 2, -4, -30, 60, 2, -4, 34 )
|
||||
|
||||
[sub_resource type="ConvexPolygonShape2D" id=2]
|
||||
|
||||
custom_solver_bias = 0.0
|
||||
points = Vector2Array( -20, -6, -4, -22, 12, -22, 4, 10, -4, 10 )
|
||||
|
||||
[sub_resource type="ConvexPolygonShape2D" id=3]
|
||||
|
||||
custom_solver_bias = 0.0
|
||||
points = Vector2Array( 28, -6, 4, 10, 12, -22 )
|
||||
|
||||
[sub_resource type="ConvexPolygonShape2D" id=4]
|
||||
|
||||
custom_solver_bias = 0.0
|
||||
points = Vector2Array( 66.095, -0.62516, -5.90501, 31.3748, -21.905, 23.3748, 50.095, -8.62516 )
|
||||
|
||||
[node name="Node2D" type="Node2D"]
|
||||
|
||||
[node name="base" type="Sprite" parent="."]
|
||||
|
||||
transform/pos = Vector2( 87.5658, 0.113792 )
|
||||
texture = ExtResource( 1 )
|
||||
offset = Vector2( -4, 6 )
|
||||
region = true
|
||||
region_rect = Rect2( 28, 92, 132, 84 )
|
||||
|
||||
[node name="base2" type="Sprite" parent="."]
|
||||
|
||||
transform/pos = Vector2( 196, 44 )
|
||||
texture = ExtResource( 1 )
|
||||
offset = Vector2( -4, 6 )
|
||||
region = true
|
||||
region_rect = Rect2( 220, 92, 132, 84 )
|
||||
|
||||
[node name="wall" type="Sprite" parent="."]
|
||||
|
||||
transform/pos = Vector2( 356, 70 )
|
||||
texture = ExtResource( 1 )
|
||||
offset = Vector2( -4, -32 )
|
||||
region = true
|
||||
region_rect = Rect2( 28, 220, 132, 136 )
|
||||
|
||||
[node name="StaticBody2D" type="StaticBody2D" parent="wall"]
|
||||
|
||||
input/pickable = false
|
||||
shapes/0/shape = SubResource( 1 )
|
||||
shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 )
|
||||
shapes/0/trigger = false
|
||||
collision/layers = 1
|
||||
collision/mask = 1
|
||||
constant_linear_velocity = Vector2( 0, 0 )
|
||||
constant_angular_velocity = 0.0
|
||||
friction = 1.0
|
||||
bounce = 0.0
|
||||
|
||||
[node name="collision" type="CollisionPolygon2D" parent="wall/StaticBody2D"]
|
||||
|
||||
build_mode = 0
|
||||
polygon = Vector2Array( -68, 2, -4, 34, 60, 2, -4, -30 )
|
||||
shape_range = Vector2( -1, -1 )
|
||||
trigger = false
|
||||
|
||||
[node name="column" type="Sprite" parent="."]
|
||||
|
||||
transform/pos = Vector2( 292, 198 )
|
||||
texture = ExtResource( 1 )
|
||||
offset = Vector2( -2, -32 )
|
||||
region = true
|
||||
region_rect = Rect2( 220, 220, 132, 136 )
|
||||
|
||||
[node name="StaticBody" type="StaticBody2D" parent="column"]
|
||||
|
||||
input/pickable = false
|
||||
shapes/0/shape = SubResource( 2 )
|
||||
shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 )
|
||||
shapes/0/trigger = false
|
||||
shapes/1/shape = SubResource( 3 )
|
||||
shapes/1/transform = Matrix32( 1, 0, 0, 1, 0, 0 )
|
||||
shapes/1/trigger = false
|
||||
collision/layers = 1
|
||||
collision/mask = 1
|
||||
constant_linear_velocity = Vector2( 0, 0 )
|
||||
constant_angular_velocity = 0.0
|
||||
friction = 1.0
|
||||
bounce = 0.0
|
||||
|
||||
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="column/StaticBody"]
|
||||
|
||||
build_mode = 0
|
||||
polygon = Vector2Array( -20, -6, -4, 10, 4, 10, 28, -6, 12, -22, -4, -22 )
|
||||
shape_range = Vector2( -1, -1 )
|
||||
trigger = false
|
||||
|
||||
[node name="door1" type="Sprite" parent="."]
|
||||
|
||||
transform/pos = Vector2( 85.905, 0.62516 )
|
||||
texture = ExtResource( 1 )
|
||||
offset = Vector2( 16, -22 )
|
||||
region = true
|
||||
region_rect = Rect2( 24, 408, 132, 136 )
|
||||
|
||||
[node name="StaticBody2D" type="StaticBody2D" parent="door1"]
|
||||
|
||||
input/pickable = false
|
||||
shapes/0/shape = SubResource( 4 )
|
||||
shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 )
|
||||
shapes/0/trigger = false
|
||||
collision/layers = 1
|
||||
collision/mask = 1
|
||||
constant_linear_velocity = Vector2( 0, 0 )
|
||||
constant_angular_velocity = 0.0
|
||||
friction = 1.0
|
||||
bounce = 0.0
|
||||
|
||||
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="door1/StaticBody2D"]
|
||||
|
||||
build_mode = 0
|
||||
polygon = Vector2Array( -5.90501, 31.3748, 66.095, -0.62516, 50.095, -8.62516, -21.905, 23.3748 )
|
||||
shape_range = Vector2( -1, -1 )
|
||||
trigger = false
|
||||
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
|
||||
extends KinematicBody2D
|
||||
|
||||
# This is a simple collision demo showing how
|
||||
# the kinematic controller works.
|
||||
# move() will allow to move the node, and will
|
||||
# always move it to a non-colliding spot,
|
||||
# as long as it starts from a non-colliding spot too.
|
||||
|
||||
# Member variables
|
||||
const MOTION_SPEED = 160 # Pixels/seconds
|
||||
|
||||
|
||||
func _fixed_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*delta
|
||||
motion = move(motion)
|
||||
|
||||
# Make character slide nicely through the world
|
||||
var slide_attempts = 4
|
||||
while(is_colliding() and slide_attempts > 0):
|
||||
motion = get_collision_normal().slide(motion)
|
||||
motion = move(motion)
|
||||
slide_attempts -= 1
|
||||
|
||||
|
||||
func _ready():
|
||||
set_fixed_process(true)
|
Before Width: | Height: | Size: 7.1 KiB |
|
@ -1,53 +0,0 @@
|
|||
[gd_scene load_steps=4 format=1]
|
||||
|
||||
[ext_resource path="res://troll.gd" type="Script" id=1]
|
||||
[ext_resource path="res://troll.png" type="Texture" id=2]
|
||||
|
||||
[sub_resource type="CircleShape2D" id=1]
|
||||
|
||||
custom_solver_bias = 0.0
|
||||
radius = 16.0
|
||||
|
||||
[node name="troll" type="KinematicBody2D"]
|
||||
|
||||
input/pickable = false
|
||||
shapes/0/shape = SubResource( 1 )
|
||||
shapes/0/transform = Matrix32( 1, 0, 0, 1, -0.342697, -0.980721 )
|
||||
shapes/0/trigger = false
|
||||
collision/layers = 1
|
||||
collision/mask = 1
|
||||
collision/margin = 0.001
|
||||
script/script = ExtResource( 1 )
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="."]
|
||||
|
||||
transform/pos = Vector2( -3.94334, -36.924 )
|
||||
texture = ExtResource( 2 )
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
|
||||
transform/pos = Vector2( -0.342697, -0.980721 )
|
||||
shape = SubResource( 1 )
|
||||
trigger = false
|
||||
_update_shape_index = -1
|
||||
|
||||
[node name="Camera2D" type="Camera2D" parent="."]
|
||||
|
||||
anchor_mode = 1
|
||||
rotating = false
|
||||
current = true
|
||||
zoom = Vector2( 1, 1 )
|
||||
limit/left = -10000000
|
||||
limit/top = -10000000
|
||||
limit/right = 10000000
|
||||
limit/bottom = 10000000
|
||||
drag_margin/h_enabled = true
|
||||
drag_margin/v_enabled = true
|
||||
smoothing/enable = false
|
||||
smoothing/speed = 5.0
|
||||
drag_margin/left = 0.2
|
||||
drag_margin/top = 0.2
|
||||
drag_margin/right = 0.2
|
||||
drag_margin/bottom = 0.2
|
||||
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
[gd_resource type="CanvasItemMaterial" load_steps=2 format=1]
|
||||
|
||||
[sub_resource type="CanvasItemShader" id=1]
|
||||
|
||||
_code = { "fragment":"//there is no albedo (all shading is normal)\nuniform color col;\nCOLOR=col;\n//sample normal texture\nvec4 ntex = tex(TEXTURE,UV);\n//take the alpha from the normal texture\nCOLOR.a=ntex.a;\n//adjust normalmap from [0..1] to [-1..1]\nntex.rgb = ntex.rgb * vec3(-2,-2,1) - vec3(-1,-1,0);\n//half size of the tile \nvec2 tile_vec=vec2(47,22);\n//rotation to convert the normal to pseudo 3d coordinates\n//this could be optimized\nfloat r = asin(tile_vec.y / tile_vec.x);\nmat3 rot_mat = mat3( vec3(1,0,0), vec3(0,cos(r),-sin(r)), vec3(0,sin(r),cos(r)));\n\n//pass the normal\nNORMAL = rot_mat * ntex.rgb;\n\n\n\n\n", "fragment_ofs":0, "light":"//apply the normal as simple diffuse (same as default code)\nvec3 light_normal = normalize(vec3(LIGHT_VEC,-LIGHT_HEIGHT));\nLIGHT=LIGHT_COLOR*COLOR*max(dot(-light_normal,NORMAL),0.0);\n//substract light position to be always aligned to the bottom of the sprite\n//this makes lighting on it look like a billboard\nLIGHT_VEC.y-=VAR1.y;\n", "light_ofs":0, "vertex":"// pass the local sprite coordinates through a varying\n// the red cross in the sprite is the 0,0\nVAR1.xy=SRC_VERTEX;", "vertex_ofs":0 }
|
||||
|
||||
[resource]
|
||||
|
||||
shader/shader = SubResource( 1 )
|
||||
shader/shading_mode = 0
|
||||
shader_param/col = Color( 1, 0.836638, 0.693806, 1 )
|
||||
|
|
@ -1,52 +0,0 @@
|
|||
[gd_scene load_steps=5 format=1]
|
||||
|
||||
[ext_resource path="res://wall_shader.tres" type="CanvasItemMaterial" id=1]
|
||||
[ext_resource path="res://faceColor.png" type="Texture" id=2]
|
||||
|
||||
[sub_resource type="CircleShape2D" id=1]
|
||||
|
||||
custom_solver_bias = 0.0
|
||||
radius = 20.0
|
||||
|
||||
[sub_resource type="OccluderPolygon2D" id=2]
|
||||
|
||||
closed = false
|
||||
cull_mode = 0
|
||||
polygon = Vector2Array( -16.1183, 62.9508, 4.32091, 74.9223, 23.3002, 65.2867 )
|
||||
|
||||
[node name="column" type="StaticBody2D"]
|
||||
|
||||
input/pickable = false
|
||||
shapes/0/shape = SubResource( 1 )
|
||||
shapes/0/transform = Matrix32( 1, 0, 0, 1, 1.36365, 7.83751 )
|
||||
shapes/0/trigger = false
|
||||
collision/layers = 1
|
||||
collision/mask = 1
|
||||
constant_linear_velocity = Vector2( 0, 0 )
|
||||
constant_angular_velocity = 0.0
|
||||
friction = 1.0
|
||||
bounce = 0.0
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="."]
|
||||
|
||||
material/material = ExtResource( 1 )
|
||||
transform/pos = Vector2( 0.487671, 0.487679 )
|
||||
texture = ExtResource( 2 )
|
||||
offset = Vector2( -4.37984, -50.8523 )
|
||||
region = true
|
||||
region_rect = Rect2( 569, 179, 48, 154 )
|
||||
|
||||
[node name="occluder" type="LightOccluder2D" parent="."]
|
||||
|
||||
transform/pos = Vector2( -3.90138, -50.97 )
|
||||
occluder = SubResource( 2 )
|
||||
light_mask = 1
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
|
||||
transform/pos = Vector2( 1.36365, 7.83751 )
|
||||
shape = SubResource( 1 )
|
||||
trigger = false
|
||||
_update_shape_index = -1
|
||||
|
||||
|
|
@ -1,85 +0,0 @@
|
|||
|
||||
extends KinematicBody2D
|
||||
|
||||
# Member variables
|
||||
const MAX_SPEED = 300.0
|
||||
const IDLE_SPEED = 10.0
|
||||
const ACCEL = 5.0
|
||||
const VSCALE = 0.5
|
||||
const SHOOT_INTERVAL = 0.3
|
||||
|
||||
var speed = Vector2()
|
||||
var current_anim = ""
|
||||
var current_mirror = false
|
||||
|
||||
var shoot_countdown = 0
|
||||
|
||||
|
||||
func _input(event):
|
||||
if (event.type == InputEvent.MOUSE_BUTTON and event.button_index == 1 and event.pressed and shoot_countdown <= 0):
|
||||
var pos = get_canvas_transform().affine_inverse()*event.pos
|
||||
var dir = (pos - get_global_pos()).normalized()
|
||||
var bullet = preload("res://shoot.tscn").instance()
|
||||
bullet.advance_dir = dir
|
||||
bullet.set_pos(get_global_pos() + dir*60)
|
||||
get_parent().add_child(bullet)
|
||||
shoot_countdown = SHOOT_INTERVAL
|
||||
|
||||
|
||||
func _fixed_process(delta):
|
||||
shoot_countdown -= delta
|
||||
var dir = Vector2()
|
||||
if (Input.is_action_pressed("up")):
|
||||
dir += Vector2(0, -1)
|
||||
if (Input.is_action_pressed("down")):
|
||||
dir += Vector2(0, 1)
|
||||
if (Input.is_action_pressed("left")):
|
||||
dir += Vector2(-1, 0)
|
||||
if (Input.is_action_pressed("right")):
|
||||
dir += Vector2(1, 0)
|
||||
|
||||
if (dir != Vector2()):
|
||||
dir = dir.normalized()
|
||||
speed = speed.linear_interpolate(dir*MAX_SPEED, delta*ACCEL)
|
||||
var motion = speed*delta
|
||||
motion.y *= VSCALE
|
||||
motion = move(motion)
|
||||
|
||||
if (is_colliding()):
|
||||
var n = get_collision_normal()
|
||||
motion = n.slide(motion)
|
||||
move(motion)
|
||||
|
||||
var next_anim = ""
|
||||
var next_mirror = false
|
||||
|
||||
if (dir == Vector2() and speed.length() < IDLE_SPEED):
|
||||
next_anim = "idle"
|
||||
next_mirror = false
|
||||
elif (speed.length() > IDLE_SPEED*0.1):
|
||||
var angle = atan2(abs(speed.x), speed.y)
|
||||
|
||||
next_mirror = speed.x > 0
|
||||
if (angle < PI/8):
|
||||
next_anim = "bottom"
|
||||
next_mirror = false
|
||||
elif (angle < PI/4 + PI/8):
|
||||
next_anim = "bottom_left"
|
||||
elif (angle < PI*2/4 + PI/8):
|
||||
next_anim = "left"
|
||||
elif (angle < PI*3/4 + PI/8):
|
||||
next_anim = "top_left"
|
||||
else:
|
||||
next_anim = "top"
|
||||
next_mirror = false
|
||||
|
||||
if (next_anim != current_anim or next_mirror != current_mirror):
|
||||
get_node("frames").set_flip_h(next_mirror)
|
||||
get_node("anim").play(next_anim)
|
||||
current_anim = next_anim
|
||||
current_mirror = next_mirror
|
||||
|
||||
|
||||
func _ready():
|
||||
set_fixed_process(true)
|
||||
set_process_input(true)
|
|
@ -1,327 +0,0 @@
|
|||
[gd_scene load_steps=173 format=1]
|
||||
|
||||
[ext_resource path="res://cubio.gd" type="Script" id=1]
|
||||
[ext_resource path="res://character_shader.tres" type="CanvasItemMaterial" id=2]
|
||||
[ext_resource path="res://cubio/idle0001.png" type="Texture" id=3]
|
||||
[ext_resource path="res://cubio/idle0002.png" type="Texture" id=4]
|
||||
[ext_resource path="res://cubio/idle0003.png" type="Texture" id=5]
|
||||
[ext_resource path="res://cubio/idle0004.png" type="Texture" id=6]
|
||||
[ext_resource path="res://cubio/idle0005.png" type="Texture" id=7]
|
||||
[ext_resource path="res://cubio/idle0006.png" type="Texture" id=8]
|
||||
[ext_resource path="res://cubio/idle0007.png" type="Texture" id=9]
|
||||
[ext_resource path="res://cubio/idle0008.png" type="Texture" id=10]
|
||||
[ext_resource path="res://cubio/idle0009.png" type="Texture" id=11]
|
||||
[ext_resource path="res://cubio/idle0010.png" type="Texture" id=12]
|
||||
[ext_resource path="res://cubio/idle0011.png" type="Texture" id=13]
|
||||
[ext_resource path="res://cubio/idle0012.png" type="Texture" id=14]
|
||||
[ext_resource path="res://cubio/idle0013.png" type="Texture" id=15]
|
||||
[ext_resource path="res://cubio/idle0014.png" type="Texture" id=16]
|
||||
[ext_resource path="res://cubio/idle0015.png" type="Texture" id=17]
|
||||
[ext_resource path="res://cubio/idle0016.png" type="Texture" id=18]
|
||||
[ext_resource path="res://cubio/idle0017.png" type="Texture" id=19]
|
||||
[ext_resource path="res://cubio/idle0018.png" type="Texture" id=20]
|
||||
[ext_resource path="res://cubio/idle0019.png" type="Texture" id=21]
|
||||
[ext_resource path="res://cubio/idle0020.png" type="Texture" id=22]
|
||||
[ext_resource path="res://cubio/idle0021.png" type="Texture" id=23]
|
||||
[ext_resource path="res://cubio/idle0022.png" type="Texture" id=24]
|
||||
[ext_resource path="res://cubio/idle0023.png" type="Texture" id=25]
|
||||
[ext_resource path="res://cubio/idle0024.png" type="Texture" id=26]
|
||||
[ext_resource path="res://cubio/idle0025.png" type="Texture" id=27]
|
||||
[ext_resource path="res://cubio/idle0026.png" type="Texture" id=28]
|
||||
[ext_resource path="res://cubio/idle0027.png" type="Texture" id=29]
|
||||
[ext_resource path="res://cubio/idle0028.png" type="Texture" id=30]
|
||||
[ext_resource path="res://cubio/idle0029.png" type="Texture" id=31]
|
||||
[ext_resource path="res://cubio/idle0030.png" type="Texture" id=32]
|
||||
[ext_resource path="res://cubio/idle0031.png" type="Texture" id=33]
|
||||
[ext_resource path="res://cubio/idle0032.png" type="Texture" id=34]
|
||||
[ext_resource path="res://cubio/idle0033.png" type="Texture" id=35]
|
||||
[ext_resource path="res://cubio/idle0034.png" type="Texture" id=36]
|
||||
[ext_resource path="res://cubio/idle0035.png" type="Texture" id=37]
|
||||
[ext_resource path="res://cubio/idle0036.png" type="Texture" id=38]
|
||||
[ext_resource path="res://cubio/idle0037.png" type="Texture" id=39]
|
||||
[ext_resource path="res://cubio/idle0038.png" type="Texture" id=40]
|
||||
[ext_resource path="res://cubio/idle0039.png" type="Texture" id=41]
|
||||
[ext_resource path="res://cubio/idle0040.png" type="Texture" id=42]
|
||||
[ext_resource path="res://cubio/idle0041.png" type="Texture" id=43]
|
||||
[ext_resource path="res://cubio/idle0042.png" type="Texture" id=44]
|
||||
[ext_resource path="res://cubio/idle0043.png" type="Texture" id=45]
|
||||
[ext_resource path="res://cubio/idle0044.png" type="Texture" id=46]
|
||||
[ext_resource path="res://cubio/idle0045.png" type="Texture" id=47]
|
||||
[ext_resource path="res://cubio/idle0046.png" type="Texture" id=48]
|
||||
[ext_resource path="res://cubio/idle0047.png" type="Texture" id=49]
|
||||
[ext_resource path="res://cubio/idle0048.png" type="Texture" id=50]
|
||||
[ext_resource path="res://cubio/idle0049.png" type="Texture" id=51]
|
||||
[ext_resource path="res://cubio/idle0050.png" type="Texture" id=52]
|
||||
[ext_resource path="res://cubio/idle0051.png" type="Texture" id=53]
|
||||
[ext_resource path="res://cubio/idle0052.png" type="Texture" id=54]
|
||||
[ext_resource path="res://cubio/idle0053.png" type="Texture" id=55]
|
||||
[ext_resource path="res://cubio/idle0054.png" type="Texture" id=56]
|
||||
[ext_resource path="res://cubio/idle0055.png" type="Texture" id=57]
|
||||
[ext_resource path="res://cubio/idle0056.png" type="Texture" id=58]
|
||||
[ext_resource path="res://cubio/idle0057.png" type="Texture" id=59]
|
||||
[ext_resource path="res://cubio/idle0058.png" type="Texture" id=60]
|
||||
[ext_resource path="res://cubio/idle0059.png" type="Texture" id=61]
|
||||
[ext_resource path="res://cubio/idle0060.png" type="Texture" id=62]
|
||||
[ext_resource path="res://cubio/norm-b-0001.png" type="Texture" id=63]
|
||||
[ext_resource path="res://cubio/norm-b-0002.png" type="Texture" id=64]
|
||||
[ext_resource path="res://cubio/norm-b-0003.png" type="Texture" id=65]
|
||||
[ext_resource path="res://cubio/norm-b-0004.png" type="Texture" id=66]
|
||||
[ext_resource path="res://cubio/norm-b-0005.png" type="Texture" id=67]
|
||||
[ext_resource path="res://cubio/norm-b-0006.png" type="Texture" id=68]
|
||||
[ext_resource path="res://cubio/norm-b-0007.png" type="Texture" id=69]
|
||||
[ext_resource path="res://cubio/norm-b-0008.png" type="Texture" id=70]
|
||||
[ext_resource path="res://cubio/norm-b-0009.png" type="Texture" id=71]
|
||||
[ext_resource path="res://cubio/norm-b-0010.png" type="Texture" id=72]
|
||||
[ext_resource path="res://cubio/norm-b-0011.png" type="Texture" id=73]
|
||||
[ext_resource path="res://cubio/norm-b-0012.png" type="Texture" id=74]
|
||||
[ext_resource path="res://cubio/norm-b-0013.png" type="Texture" id=75]
|
||||
[ext_resource path="res://cubio/norm-b-0014.png" type="Texture" id=76]
|
||||
[ext_resource path="res://cubio/norm-b-0015.png" type="Texture" id=77]
|
||||
[ext_resource path="res://cubio/norm-b-0016.png" type="Texture" id=78]
|
||||
[ext_resource path="res://cubio/norm-b-0017.png" type="Texture" id=79]
|
||||
[ext_resource path="res://cubio/norm-b-0018.png" type="Texture" id=80]
|
||||
[ext_resource path="res://cubio/norm-b-0019.png" type="Texture" id=81]
|
||||
[ext_resource path="res://cubio/norm-b-0020.png" type="Texture" id=82]
|
||||
[ext_resource path="res://cubio/norm-bl-0001.png" type="Texture" id=83]
|
||||
[ext_resource path="res://cubio/norm-bl-0002.png" type="Texture" id=84]
|
||||
[ext_resource path="res://cubio/norm-bl-0003.png" type="Texture" id=85]
|
||||
[ext_resource path="res://cubio/norm-bl-0004.png" type="Texture" id=86]
|
||||
[ext_resource path="res://cubio/norm-bl-0005.png" type="Texture" id=87]
|
||||
[ext_resource path="res://cubio/norm-bl-0006.png" type="Texture" id=88]
|
||||
[ext_resource path="res://cubio/norm-bl-0007.png" type="Texture" id=89]
|
||||
[ext_resource path="res://cubio/norm-bl-0008.png" type="Texture" id=90]
|
||||
[ext_resource path="res://cubio/norm-bl-0009.png" type="Texture" id=91]
|
||||
[ext_resource path="res://cubio/norm-bl-0010.png" type="Texture" id=92]
|
||||
[ext_resource path="res://cubio/norm-bl-0011.png" type="Texture" id=93]
|
||||
[ext_resource path="res://cubio/norm-bl-0012.png" type="Texture" id=94]
|
||||
[ext_resource path="res://cubio/norm-bl-0013.png" type="Texture" id=95]
|
||||
[ext_resource path="res://cubio/norm-bl-0014.png" type="Texture" id=96]
|
||||
[ext_resource path="res://cubio/norm-bl-0015.png" type="Texture" id=97]
|
||||
[ext_resource path="res://cubio/norm-bl-0016.png" type="Texture" id=98]
|
||||
[ext_resource path="res://cubio/norm-bl-0017.png" type="Texture" id=99]
|
||||
[ext_resource path="res://cubio/norm-bl-0018.png" type="Texture" id=100]
|
||||
[ext_resource path="res://cubio/norm-bl-0019.png" type="Texture" id=101]
|
||||
[ext_resource path="res://cubio/norm-bl-0020.png" type="Texture" id=102]
|
||||
[ext_resource path="res://cubio/norm-l-0001.png" type="Texture" id=103]
|
||||
[ext_resource path="res://cubio/norm-l-0002.png" type="Texture" id=104]
|
||||
[ext_resource path="res://cubio/norm-l-0003.png" type="Texture" id=105]
|
||||
[ext_resource path="res://cubio/norm-l-0004.png" type="Texture" id=106]
|
||||
[ext_resource path="res://cubio/norm-l-0005.png" type="Texture" id=107]
|
||||
[ext_resource path="res://cubio/norm-l-0006.png" type="Texture" id=108]
|
||||
[ext_resource path="res://cubio/norm-l-0007.png" type="Texture" id=109]
|
||||
[ext_resource path="res://cubio/norm-l-0008.png" type="Texture" id=110]
|
||||
[ext_resource path="res://cubio/norm-l-0009.png" type="Texture" id=111]
|
||||
[ext_resource path="res://cubio/norm-l-0010.png" type="Texture" id=112]
|
||||
[ext_resource path="res://cubio/norm-l-0011.png" type="Texture" id=113]
|
||||
[ext_resource path="res://cubio/norm-l-0012.png" type="Texture" id=114]
|
||||
[ext_resource path="res://cubio/norm-l-0013.png" type="Texture" id=115]
|
||||
[ext_resource path="res://cubio/norm-l-0014.png" type="Texture" id=116]
|
||||
[ext_resource path="res://cubio/norm-l-0015.png" type="Texture" id=117]
|
||||
[ext_resource path="res://cubio/norm-l-0016.png" type="Texture" id=118]
|
||||
[ext_resource path="res://cubio/norm-l-0017.png" type="Texture" id=119]
|
||||
[ext_resource path="res://cubio/norm-l-0018.png" type="Texture" id=120]
|
||||
[ext_resource path="res://cubio/norm-l-0019.png" type="Texture" id=121]
|
||||
[ext_resource path="res://cubio/norm-l-0020.png" type="Texture" id=122]
|
||||
[ext_resource path="res://cubio/norm-u-0001.png" type="Texture" id=123]
|
||||
[ext_resource path="res://cubio/norm-u-0002.png" type="Texture" id=124]
|
||||
[ext_resource path="res://cubio/norm-u-0003.png" type="Texture" id=125]
|
||||
[ext_resource path="res://cubio/norm-u-0004.png" type="Texture" id=126]
|
||||
[ext_resource path="res://cubio/norm-u-0005.png" type="Texture" id=127]
|
||||
[ext_resource path="res://cubio/norm-u-0006.png" type="Texture" id=128]
|
||||
[ext_resource path="res://cubio/norm-u-0007.png" type="Texture" id=129]
|
||||
[ext_resource path="res://cubio/norm-u-0008.png" type="Texture" id=130]
|
||||
[ext_resource path="res://cubio/norm-u-0009.png" type="Texture" id=131]
|
||||
[ext_resource path="res://cubio/norm-u-0010.png" type="Texture" id=132]
|
||||
[ext_resource path="res://cubio/norm-u-0011.png" type="Texture" id=133]
|
||||
[ext_resource path="res://cubio/norm-u-0012.png" type="Texture" id=134]
|
||||
[ext_resource path="res://cubio/norm-u-0013.png" type="Texture" id=135]
|
||||
[ext_resource path="res://cubio/norm-u-0014.png" type="Texture" id=136]
|
||||
[ext_resource path="res://cubio/norm-u-0015.png" type="Texture" id=137]
|
||||
[ext_resource path="res://cubio/norm-u-0016.png" type="Texture" id=138]
|
||||
[ext_resource path="res://cubio/norm-u-0017.png" type="Texture" id=139]
|
||||
[ext_resource path="res://cubio/norm-u-0018.png" type="Texture" id=140]
|
||||
[ext_resource path="res://cubio/norm-u-0019.png" type="Texture" id=141]
|
||||
[ext_resource path="res://cubio/norm-u-0020.png" type="Texture" id=142]
|
||||
[ext_resource path="res://cubio/norm-ul-0001.png" type="Texture" id=143]
|
||||
[ext_resource path="res://cubio/norm-ul-0002.png" type="Texture" id=144]
|
||||
[ext_resource path="res://cubio/norm-ul-0003.png" type="Texture" id=145]
|
||||
[ext_resource path="res://cubio/norm-ul-0004.png" type="Texture" id=146]
|
||||
[ext_resource path="res://cubio/norm-ul-0005.png" type="Texture" id=147]
|
||||
[ext_resource path="res://cubio/norm-ul-0006.png" type="Texture" id=148]
|
||||
[ext_resource path="res://cubio/norm-ul-0007.png" type="Texture" id=149]
|
||||
[ext_resource path="res://cubio/norm-ul-0008.png" type="Texture" id=150]
|
||||
[ext_resource path="res://cubio/norm-ul-0009.png" type="Texture" id=151]
|
||||
[ext_resource path="res://cubio/norm-ul-0010.png" type="Texture" id=152]
|
||||
[ext_resource path="res://cubio/norm-ul-0011.png" type="Texture" id=153]
|
||||
[ext_resource path="res://cubio/norm-ul-0012.png" type="Texture" id=154]
|
||||
[ext_resource path="res://cubio/norm-ul-0013.png" type="Texture" id=155]
|
||||
[ext_resource path="res://cubio/norm-ul-0014.png" type="Texture" id=156]
|
||||
[ext_resource path="res://cubio/norm-ul-0015.png" type="Texture" id=157]
|
||||
[ext_resource path="res://cubio/norm-ul-0016.png" type="Texture" id=158]
|
||||
[ext_resource path="res://cubio/norm-ul-0017.png" type="Texture" id=159]
|
||||
[ext_resource path="res://cubio/norm-ul-0018.png" type="Texture" id=160]
|
||||
[ext_resource path="res://cubio/norm-ul-0019.png" type="Texture" id=161]
|
||||
[ext_resource path="res://cubio/norm-ul-0020.png" type="Texture" id=162]
|
||||
[ext_resource path="res://light2.png" type="Texture" id=163]
|
||||
[ext_resource path="res://shadow_blob.png" type="Texture" id=164]
|
||||
|
||||
[sub_resource type="CircleShape2D" id=1]
|
||||
|
||||
custom_solver_bias = 0.0
|
||||
radius = 20.0
|
||||
|
||||
[sub_resource type="SpriteFrames" id=2]
|
||||
|
||||
frames = [ ExtResource( 3 ), ExtResource( 4 ), ExtResource( 5 ), ExtResource( 6 ), ExtResource( 7 ), ExtResource( 8 ), ExtResource( 9 ), ExtResource( 10 ), ExtResource( 11 ), ExtResource( 12 ), ExtResource( 13 ), ExtResource( 14 ), ExtResource( 15 ), ExtResource( 16 ), ExtResource( 17 ), ExtResource( 18 ), ExtResource( 19 ), ExtResource( 20 ), ExtResource( 21 ), ExtResource( 22 ), ExtResource( 23 ), ExtResource( 24 ), ExtResource( 25 ), ExtResource( 26 ), ExtResource( 27 ), ExtResource( 28 ), ExtResource( 29 ), ExtResource( 30 ), ExtResource( 31 ), ExtResource( 32 ), ExtResource( 33 ), ExtResource( 34 ), ExtResource( 35 ), ExtResource( 36 ), ExtResource( 37 ), ExtResource( 38 ), ExtResource( 39 ), ExtResource( 40 ), ExtResource( 41 ), ExtResource( 42 ), ExtResource( 43 ), ExtResource( 44 ), ExtResource( 45 ), ExtResource( 46 ), ExtResource( 47 ), ExtResource( 48 ), ExtResource( 49 ), ExtResource( 50 ), ExtResource( 51 ), ExtResource( 52 ), ExtResource( 53 ), ExtResource( 54 ), ExtResource( 55 ), ExtResource( 56 ), ExtResource( 57 ), ExtResource( 58 ), ExtResource( 59 ), ExtResource( 60 ), ExtResource( 61 ), ExtResource( 62 ), ExtResource( 63 ), ExtResource( 64 ), ExtResource( 65 ), ExtResource( 66 ), ExtResource( 67 ), ExtResource( 68 ), ExtResource( 69 ), ExtResource( 70 ), ExtResource( 71 ), ExtResource( 72 ), ExtResource( 73 ), ExtResource( 74 ), ExtResource( 75 ), ExtResource( 76 ), ExtResource( 77 ), ExtResource( 78 ), ExtResource( 79 ), ExtResource( 80 ), ExtResource( 81 ), ExtResource( 82 ), ExtResource( 83 ), ExtResource( 84 ), ExtResource( 85 ), ExtResource( 86 ), ExtResource( 87 ), ExtResource( 88 ), ExtResource( 89 ), ExtResource( 90 ), ExtResource( 91 ), ExtResource( 92 ), ExtResource( 93 ), ExtResource( 94 ), ExtResource( 95 ), ExtResource( 96 ), ExtResource( 97 ), ExtResource( 98 ), ExtResource( 99 ), ExtResource( 100 ), ExtResource( 101 ), ExtResource( 102 ), ExtResource( 103 ), ExtResource( 104 ), ExtResource( 105 ), ExtResource( 106 ), ExtResource( 107 ), ExtResource( 108 ), ExtResource( 109 ), ExtResource( 110 ), ExtResource( 111 ), ExtResource( 112 ), ExtResource( 113 ), ExtResource( 114 ), ExtResource( 115 ), ExtResource( 116 ), ExtResource( 117 ), ExtResource( 118 ), ExtResource( 119 ), ExtResource( 120 ), ExtResource( 121 ), ExtResource( 122 ), ExtResource( 123 ), ExtResource( 124 ), ExtResource( 125 ), ExtResource( 126 ), ExtResource( 127 ), ExtResource( 128 ), ExtResource( 129 ), ExtResource( 130 ), ExtResource( 131 ), ExtResource( 132 ), ExtResource( 133 ), ExtResource( 134 ), ExtResource( 135 ), ExtResource( 136 ), ExtResource( 137 ), ExtResource( 138 ), ExtResource( 139 ), ExtResource( 140 ), ExtResource( 141 ), ExtResource( 142 ), ExtResource( 143 ), ExtResource( 144 ), ExtResource( 145 ), ExtResource( 146 ), ExtResource( 147 ), ExtResource( 148 ), ExtResource( 149 ), ExtResource( 150 ), ExtResource( 151 ), ExtResource( 152 ), ExtResource( 153 ), ExtResource( 154 ), ExtResource( 155 ), ExtResource( 156 ), ExtResource( 157 ), ExtResource( 158 ), ExtResource( 159 ), ExtResource( 160 ), ExtResource( 161 ), ExtResource( 162 ) ]
|
||||
|
||||
[sub_resource type="Animation" id=3]
|
||||
|
||||
resource/name = "bottom"
|
||||
length = 0.95
|
||||
loop = true
|
||||
step = 0.1
|
||||
tracks/0/type = "value"
|
||||
tracks/0/path = NodePath("frames:frame")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/keys = { "cont":false, "times":FloatArray( 0, 0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.35, 0.4, 0.45, 0.5, 0.55, 0.6, 0.65, 0.7, 0.75, 0.8, 0.85, 0.9, 0.95 ), "transitions":FloatArray( 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ), "values":[ 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79 ] }
|
||||
|
||||
[sub_resource type="Animation" id=4]
|
||||
|
||||
length = 0.95
|
||||
loop = true
|
||||
step = 0.1
|
||||
tracks/0/type = "value"
|
||||
tracks/0/path = NodePath("frames:frame")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/keys = { "cont":false, "times":FloatArray( 0, 0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.35, 0.4, 0.45, 0.5, 0.55, 0.6, 0.65, 0.7, 0.75, 0.8, 0.85, 0.9, 0.95 ), "transitions":FloatArray( 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ), "values":[ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99 ] }
|
||||
|
||||
[sub_resource type="Animation" id=5]
|
||||
|
||||
length = 3.0
|
||||
loop = true
|
||||
step = 0.1
|
||||
tracks/0/type = "value"
|
||||
tracks/0/path = NodePath("frames:frame")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/keys = { "cont":false, "times":FloatArray( 0, 0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.35, 0.4, 0.45, 0.5, 0.55, 0.6, 0.65, 0.7, 0.75, 0.8, 0.85, 0.9, 0.95, 1, 1.05, 1.1, 1.15, 1.2, 1.25, 1.3, 1.35, 1.4, 1.45, 1.5, 1.55, 1.6, 1.65, 1.7, 1.75, 1.8, 1.85, 1.9, 1.95, 2, 2.05, 2.1, 2.15, 2.2, 2.25, 2.3, 2.35, 2.4, 2.45, 2.5, 2.55, 2.6, 2.65, 2.7, 2.75, 2.8, 2.85, 2.9, 2.95, 3 ), "transitions":FloatArray( 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ), "values":[ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 55, 56, 57, 58, 59 ] }
|
||||
|
||||
[sub_resource type="Animation" id=6]
|
||||
|
||||
length = 0.95
|
||||
loop = true
|
||||
step = 0.1
|
||||
tracks/0/type = "value"
|
||||
tracks/0/path = NodePath("frames:frame")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/keys = { "cont":false, "times":FloatArray( 0, 0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.35, 0.4, 0.45, 0.5, 0.55, 0.6, 0.65, 0.7, 0.75, 0.8, 0.85, 0.9, 0.95 ), "transitions":FloatArray( 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ), "values":[ 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119 ] }
|
||||
|
||||
[sub_resource type="Animation" id=7]
|
||||
|
||||
length = 0.95
|
||||
loop = true
|
||||
step = 0.1
|
||||
tracks/0/type = "value"
|
||||
tracks/0/path = NodePath("frames:frame")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/keys = { "cont":false, "times":FloatArray( 0, 0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.35, 0.4, 0.45, 0.5, 0.55, 0.6, 0.65, 0.7, 0.75, 0.8, 0.85, 0.9, 0.95 ), "transitions":FloatArray( 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ), "values":[ 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139 ] }
|
||||
|
||||
[sub_resource type="Animation" id=8]
|
||||
|
||||
length = 0.95
|
||||
loop = true
|
||||
step = 0.1
|
||||
tracks/0/type = "value"
|
||||
tracks/0/path = NodePath("frames:frame")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/keys = { "cont":false, "times":FloatArray( 0, 0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.35, 0.4, 0.45, 0.5, 0.55, 0.6, 0.65, 0.7, 0.75, 0.8, 0.85, 0.9, 0.95 ), "transitions":FloatArray( 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ), "values":[ 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159 ] }
|
||||
|
||||
[node name="cubio" type="KinematicBody2D"]
|
||||
|
||||
visibility/light_mask = 2
|
||||
input/pickable = false
|
||||
shapes/0/shape = SubResource( 1 )
|
||||
shapes/0/transform = Matrix32( 1, 0, 0, 1, -0.397217, -9.30363 )
|
||||
shapes/0/trigger = false
|
||||
collision/layers = 1
|
||||
collision/mask = 1
|
||||
collision/margin = 0.08
|
||||
script/script = ExtResource( 1 )
|
||||
|
||||
[node name="frames" type="AnimatedSprite" parent="."]
|
||||
|
||||
material/material = ExtResource( 2 )
|
||||
frames = SubResource( 2 )
|
||||
frame = 140
|
||||
offset = Vector2( 0.397217, -52.4323 )
|
||||
|
||||
[node name="shape" type="CollisionShape2D" parent="."]
|
||||
|
||||
transform/pos = Vector2( -0.397217, -9.30363 )
|
||||
shape = SubResource( 1 )
|
||||
trigger = false
|
||||
_update_shape_index = -1
|
||||
|
||||
[node name="camera" type="Camera2D" parent="."]
|
||||
|
||||
anchor_mode = 1
|
||||
rotating = false
|
||||
current = true
|
||||
zoom = Vector2( 1, 1 )
|
||||
limit/left = -10000000
|
||||
limit/top = -10000000
|
||||
limit/right = 10000000
|
||||
limit/bottom = 10000000
|
||||
drag_margin/h_enabled = true
|
||||
drag_margin/v_enabled = true
|
||||
smoothing/enable = false
|
||||
smoothing/speed = 5.0
|
||||
drag_margin/left = 0.2
|
||||
drag_margin/top = 0.2
|
||||
drag_margin/right = 0.2
|
||||
drag_margin/bottom = 0.2
|
||||
|
||||
[node name="anim" type="AnimationPlayer" parent="."]
|
||||
|
||||
playback/process_mode = 1
|
||||
playback/default_blend_time = 0.0
|
||||
root/root = NodePath("..")
|
||||
anims/bottom = SubResource( 3 )
|
||||
anims/bottom_left = SubResource( 4 )
|
||||
anims/idle = SubResource( 5 )
|
||||
anims/left = SubResource( 6 )
|
||||
anims/top = SubResource( 7 )
|
||||
anims/top_left = SubResource( 8 )
|
||||
playback/active = true
|
||||
playback/speed = 1.0
|
||||
blend_times = [ ]
|
||||
autoplay = "idle"
|
||||
|
||||
[node name="Light2D" type="Light2D" parent="."]
|
||||
|
||||
transform/pos = Vector2( -0.140442, 2.64355 )
|
||||
enabled = true
|
||||
texture = ExtResource( 163 )
|
||||
offset = Vector2( 0, 0 )
|
||||
scale = 8.0
|
||||
color = Color( 1, 1, 1, 1 )
|
||||
energy = 1.0
|
||||
mode = 0
|
||||
range/height = 100.0
|
||||
range/z_min = -1024
|
||||
range/z_max = 1024
|
||||
range/layer_min = 0
|
||||
range/layer_max = 0
|
||||
range/item_mask = 3
|
||||
shadow/enabled = true
|
||||
shadow/color = Color( 0, 0, 0, 0 )
|
||||
shadow/buffer_size = 2048
|
||||
shadow/esm_multiplier = 80.0
|
||||
shadow/item_mask = 1
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="."]
|
||||
|
||||
visibility/opacity = 0.3
|
||||
texture = ExtResource( 164 )
|
||||
offset = Vector2( 0, -5.72164 )
|
||||
|
||||
|
Before Width: | Height: | Size: 7 KiB |
Before Width: | Height: | Size: 7 KiB |
Before Width: | Height: | Size: 7 KiB |
Before Width: | Height: | Size: 7 KiB |
Before Width: | Height: | Size: 7 KiB |
Before Width: | Height: | Size: 7.1 KiB |
Before Width: | Height: | Size: 7.1 KiB |
Before Width: | Height: | Size: 7.2 KiB |
Before Width: | Height: | Size: 7.1 KiB |
Before Width: | Height: | Size: 7.1 KiB |
Before Width: | Height: | Size: 7.2 KiB |
Before Width: | Height: | Size: 7.2 KiB |
Before Width: | Height: | Size: 7.2 KiB |
Before Width: | Height: | Size: 7.2 KiB |
Before Width: | Height: | Size: 7.2 KiB |
Before Width: | Height: | Size: 7.1 KiB |
Before Width: | Height: | Size: 7.2 KiB |
Before Width: | Height: | Size: 7.2 KiB |