Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
64e134b6ad
10
Area2D.gd
Normal file
10
Area2D.gd
Normal file
|
@ -0,0 +1,10 @@
|
|||
extends Area2D
|
||||
|
||||
onready var door = get_node("AnimationPlayer")
|
||||
|
||||
func _process(delta):
|
||||
if get_overlapping_bodies().size() != 0:
|
||||
print("1")
|
||||
if Input.is_action_pressed("open"):
|
||||
print("2")
|
||||
get_tree().change_scene("res://levels/World.tscn")
|
39
Items/Door Animation.tscn
Normal file
39
Items/Door Animation.tscn
Normal file
|
@ -0,0 +1,39 @@
|
|||
[gd_scene load_steps=4 format=2]
|
||||
|
||||
[ext_resource path="res://art/door.png" type="Texture" id=1]
|
||||
|
||||
[sub_resource type="SpriteFrames" id=1]
|
||||
animations = [ {
|
||||
"frames": [ ],
|
||||
"loop": true,
|
||||
"name": "default",
|
||||
"speed": 5.0
|
||||
} ]
|
||||
|
||||
[sub_resource type="Animation" id=2]
|
||||
resource_name = "Door opening"
|
||||
length = 0.12
|
||||
tracks/0/type = "value"
|
||||
tracks/0/path = NodePath("door:frame")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/keys = {
|
||||
"times": PoolRealArray( 0, 0.1 ),
|
||||
"transitions": PoolRealArray( 1, 1 ),
|
||||
"update": 1,
|
||||
"values": [ 0, 1 ]
|
||||
}
|
||||
|
||||
[node name="Door Animation" type="AnimatedSprite"]
|
||||
frames = SubResource( 1 )
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||
"anims/Door opening" = SubResource( 2 )
|
||||
|
||||
[node name="door" type="Sprite" parent="."]
|
||||
texture = ExtResource( 1 )
|
||||
centered = false
|
||||
hframes = 2
|
||||
frame = 1
|
39
Items/Door.tscn
Normal file
39
Items/Door.tscn
Normal file
|
@ -0,0 +1,39 @@
|
|||
[gd_scene load_steps=5 format=2]
|
||||
|
||||
[ext_resource path="res://art/door.png" type="Texture" id=1]
|
||||
[ext_resource path="res://Area2D.gd" type="Script" id=2]
|
||||
|
||||
[sub_resource type="Animation" id=1]
|
||||
resource_name = "Door Opening"
|
||||
length = 0.12
|
||||
tracks/0/type = "value"
|
||||
tracks/0/path = NodePath(".:frame")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/keys = {
|
||||
"times": PoolRealArray( 0, 0.1 ),
|
||||
"transitions": PoolRealArray( 1, 1 ),
|
||||
"update": 1,
|
||||
"values": [ 0, 1 ]
|
||||
}
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=3]
|
||||
extents = Vector2( 14, 13 )
|
||||
|
||||
[node name="Door" type="Sprite"]
|
||||
texture = ExtResource( 1 )
|
||||
centered = false
|
||||
hframes = 2
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||
"anims/Door Opening" = SubResource( 1 )
|
||||
|
||||
[node name="Area2D" type="Area2D" parent="."]
|
||||
script = ExtResource( 2 )
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
|
||||
position = Vector2( 16, 19 )
|
||||
shape = SubResource( 3 )
|
||||
[connection signal="body_entered" from="Area2D" to="Area2D" method="_on_Area2D_body_entered"]
|
|
@ -54,6 +54,7 @@ func _physics_process(_delta):
|
|||
temp.launch_upright()
|
||||
ShootDelay.start()
|
||||
queue_free()
|
||||
|
||||
if dist <= 400:
|
||||
velocity.x = position.direction_to(Globals.player).normalized().x
|
||||
else:
|
||||
|
|
|
@ -24,8 +24,8 @@ tracks/0/keys = {
|
|||
radius = 3.0
|
||||
height = 2.0
|
||||
|
||||
[node name="Bone" type="KinematicBody2D"]
|
||||
collision_layer = 16
|
||||
[node name="KinematicBody2D" type="KinematicBody2D"]
|
||||
collision_layer = 8
|
||||
collision_mask = 3
|
||||
script = ExtResource( 2 )
|
||||
__meta__ = {
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -6,11 +6,20 @@
|
|||
|
||||
[node name="Node2D" type="Node2D"]
|
||||
|
||||
[node name="TileMap" parent="." instance=ExtResource( 2 )]
|
||||
tile_data = PoolIntArray( 65536, 0, 8, 65537, 0, 10, 65538, 0, 10, 65539, 0, 10, 65540, 0, 10, 65541, 0, 10, 65542, 0, 10, 65543, 0, 10, 65544, 0, 10, 65545, 0, 10, 65546, 0, 10, 65547, 0, 10, 65548, 0, 10, 65549, 0, 10, 65550, 0, 10, 65551, 0, 10, 65552, 0, 10, 65553, 0, 10, 65554, 0, 10, 65555, 0, 10, 65556, 0, 10, 65557, 0, 10, 65558, 0, 10, 65559, 0, 10, 65560, 0, 10, 65561, 0, 10, 65562, 0, 10, 65563, 0, 10, 65564, 0, 10, 65565, 0, 10, 65566, 0, 10, 65567, 0, 10, 65568, 0, 10, 65569, 0, 11, 131072, 0, 65544, 131073, 0, 131078, 131074, 0, 196617, 131075, 0, 196617, 131076, 0, 196617, 131077, 0, 196617, 131078, 0, 196617, 131079, 0, 196617, 131080, 0, 196617, 131081, 0, 196617, 131082, 0, 196617, 131083, 0, 196617, 131084, 0, 196617, 131085, 0, 196617, 131086, 0, 196617, 131087, 0, 196617, 131088, 0, 196617, 131089, 0, 196617, 131090, 0, 196617, 131091, 0, 196617, 131092, 0, 196617, 131093, 0, 196617, 131094, 0, 196617, 131095, 0, 196617, 131096, 0, 196617, 131097, 0, 196617, 131098, 0, 196617, 131099, 0, 196617, 131100, 0, 196617, 131101, 0, 196617, 131102, 0, 196617, 131103, 0, 196617, 131104, 0, 196617, 131105, 0, 196619, 196608, 0, 65544, 196609, 0, 131083, 262144, 0, 65544, 262145, 0, 131083, 327680, 0, 65544, 327681, 0, 131083, 393216, 0, 65544, 393217, 0, 131083, 458752, 0, 65544, 458753, 0, 131083, 524288, 0, 65544, 524289, 0, 131083, 589824, 0, 65544, 589825, 0, 131083, 589858, 0, 8, 589859, 0, 11, 655360, 0, 65544, 655361, 0, 131083, 655394, 0, 65544, 655395, 0, 131083, 720896, 0, 65544, 720897, 0, 65542, 720898, 0, 10, 720899, 0, 10, 720900, 0, 10, 720901, 0, 10, 720902, 0, 10, 720903, 0, 10, 720904, 0, 10, 720905, 0, 10, 720906, 0, 10, 720907, 0, 10, 720908, 0, 10, 720909, 0, 10, 720910, 0, 10, 720911, 0, 10, 720912, 0, 10, 720913, 0, 10, 720914, 0, 10, 720915, 0, 10, 720916, 0, 10, 720917, 0, 10, 720918, 0, 10, 720919, 0, 10, 720920, 0, 10, 720921, 0, 10, 720922, 0, 10, 720923, 0, 10, 720924, 0, 10, 720925, 0, 10, 720926, 0, 10, 720927, 0, 10, 720928, 0, 10, 720929, 0, 10, 720930, 0, 65541, 720931, 0, 131083, 786432, 0, 196616, 786433, 0, 196617, 786434, 0, 196617, 786435, 0, 196617, 786436, 0, 196617, 786437, 0, 196617, 786438, 0, 196617, 786439, 0, 196617, 786440, 0, 196617, 786441, 0, 196617, 786442, 0, 196617, 786443, 0, 196617, 786444, 0, 196617, 786445, 0, 196617, 786446, 0, 196617, 786447, 0, 196617, 786448, 0, 196617, 786449, 0, 196617, 786450, 0, 196617, 786451, 0, 196617, 786452, 0, 196617, 786453, 0, 196617, 786454, 0, 196617, 786455, 0, 196617, 786456, 0, 196617, 786457, 0, 196617, 786458, 0, 196617, 786459, 0, 196617, 786460, 0, 196617, 786461, 0, 196617, 786462, 0, 196617, 786463, 0, 196617, 786464, 0, 196617, 786465, 0, 196617, 786466, 0, 196617, 786467, 0, 196619 )
|
||||
|
||||
[node name="Player" parent="." instance=ExtResource( 1 )]
|
||||
position = Vector2( 60, 176 )
|
||||
|
||||
[node name="Skeleton Enemy" parent="." instance=ExtResource( 4 )]
|
||||
position = Vector2( 274, 164 )
|
||||
|
||||
[node name="Ogre2" parent="." instance=ExtResource( 3 )]
|
||||
position = Vector2( 267.723, 176.127 )
|
||||
|
||||
[node name="Ogre3" parent="." instance=ExtResource( 3 )]
|
||||
position = Vector2( 238.732, 174.713 )
|
||||
|
||||
[node name="Ogre4" parent="." instance=ExtResource( 3 )]
|
||||
position = Vector2( 209.034, 174.006 )
|
||||
|
||||
[node name="ChargeWandPickup" parent="." instance=ExtResource( 4 )]
|
||||
position = Vector2( 81.6097, 169.385 )
|
||||
|
|
|
@ -63,7 +63,7 @@ Globals="*res://script/globals.gd"
|
|||
|
||||
[debug]
|
||||
|
||||
settings/stdout/print_fps=true
|
||||
settings/fps/force_fps=60
|
||||
|
||||
[display]
|
||||
|
||||
|
@ -114,9 +114,18 @@ ui_accept={
|
|||
}
|
||||
ui_end={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777230,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777217,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777221,"unicode":0,"echo":false,"script":null)
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777221,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777222,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":32,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":0,"pressure":0.0,"pressed":false,"script":null)
|
||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":70,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
ui_up={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777232,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":12,"pressure":0.0,"pressed":false,"script":null)
|
||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":87,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
up={
|
||||
|
@ -154,6 +163,11 @@ inventory={
|
|||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":69,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
open={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":70,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
|
||||
[layer_names]
|
||||
|
||||
|
@ -163,7 +177,6 @@ inventory={
|
|||
2d_physics/layer_2="World"
|
||||
2d_physics/layer_3="Enemy"
|
||||
2d_physics/layer_4="Projectiles"
|
||||
2d_physics/layer_5="Enemy Projectile"
|
||||
|
||||
[rendering]
|
||||
|
||||
|
|
Loading…
Reference in a new issue