Intro finished(need polishing)
This commit is contained in:
parent
24778c18e1
commit
da494d4283
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__ = {
|
||||
|
|
34
art/door.png.import
Normal file
34
art/door.png.import
Normal file
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/door.png-7e406854813fcf118164bcf195a745da.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://art/door.png"
|
||||
dest_files=[ "res://.import/door.png-7e406854813fcf118164bcf195a745da.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/bptc_ldr=0
|
||||
compress/normal_map=0
|
||||
flags/repeat=0
|
||||
flags/filter=false
|
||||
flags/mipmaps=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=false
|
||||
svg/scale=1.0
|
File diff suppressed because one or more lines are too long
|
@ -2,19 +2,28 @@
|
|||
|
||||
[ext_resource path="res://characters/Player.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://meta/DungeonTilemap.tscn" type="PackedScene" id=2]
|
||||
[ext_resource path="res://Items/TripleWandPickup.tscn" type="PackedScene" id=3]
|
||||
[ext_resource path="res://ai/Skeleton Enemy.tscn" type="PackedScene" id=4]
|
||||
[ext_resource path="res://ai/ogre.tscn" type="PackedScene" id=3]
|
||||
[ext_resource path="res://Items/ChargeWandPickup.tscn" type="PackedScene" id=4]
|
||||
|
||||
[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="TripleWand" parent="." instance=ExtResource( 3 )]
|
||||
position = Vector2( 67, 168 )
|
||||
[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, 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, 131077, 131092, 0, 131083, 196608, 0, 65544, 196609, 0, 131083, 196627, 0, 65544, 196628, 0, 131083, 262144, 0, 65544, 262145, 0, 131083, 262163, 0, 65544, 262164, 0, 131083, 327680, 0, 65544, 327681, 0, 131083, 327699, 0, 65544, 327700, 0, 131083, 393216, 0, 65544, 393217, 0, 131083, 393235, 0, 65544, 393236, 0, 131083, 458752, 0, 65544, 458753, 0, 131083, 458771, 0, 65544, 458772, 0, 131083, 524288, 0, 65544, 524289, 0, 131083, 524307, 0, 65544, 524308, 0, 131083, 589824, 0, 65544, 589825, 0, 131083, 589843, 0, 65544, 589844, 0, 131083, 655360, 0, 65544, 655361, 0, 131083, 655379, 0, 65544, 655380, 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, 65541, 720916, 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, 196619 )
|
||||
|
||||
[node name="Skeleton Enemy" parent="." instance=ExtResource( 4 )]
|
||||
position = Vector2( 274, 164 )
|
||||
[node name="Ogre" parent="." instance=ExtResource( 3 )]
|
||||
position = Vector2( 293.533, 176.48 )
|
||||
|
||||
[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]
|
||||
|
||||
|
@ -103,11 +103,20 @@ texture={
|
|||
|
||||
[input]
|
||||
|
||||
ui_end={
|
||||
ui_accept={
|
||||
"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={
|
||||
|
@ -145,6 +154,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]
|
||||
|
||||
|
@ -154,7 +168,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