Merge pull request #4 from CSE-4392-Game-Design/Space-level

Space level update
This commit is contained in:
Jane Cho
2021-12-09 18:38:29 -06:00
committed by GitHub
11 changed files with 163 additions and 11 deletions

View File

@@ -9,7 +9,7 @@ var speed : = 0.5
var position_tracker = 0.0
var player = null
var obstacle = null
var DisplayValue = 10
var DisplayValue = 5
var health: int = 2
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
@@ -59,7 +59,7 @@ func _on_Star_detect_body_exited(_body):
#print("obstacle exited")
#if _body.name == 'Obstacle':
#obstacle = null
null
pass
func _on_Timer_timeout():
#print("time out")

View File

@@ -15,7 +15,9 @@ extents = Vector2( 5.48996, 5.06427 )
[sub_resource type="RectangleShape2D" id=4]
extents = Vector2( 5.50204, 4.89798 )
[node name="Dark Matter" type="KinematicBody2D"]
[node name="Dark Matter" type="KinematicBody2D" groups=[
"enemy",
]]
collision_layer = 2
collision_mask = 6
script = ExtResource( 2 )
@@ -42,11 +44,13 @@ shape = SubResource( 3 )
[node name="Timer" type="Timer" parent="."]
[node name="Hitbox" type="Area2D" parent="."]
[node name="Dark_hitbox" type="Area2D" parent="." groups=[
"enemy_hitbox_1",
]]
collision_layer = 4
collision_mask = 2
[node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox"]
[node name="CollisionShape2D" type="CollisionShape2D" parent="Dark_hitbox"]
shape = SubResource( 4 )
[connection signal="body_entered" from="Player_detect" to="." method="_on_Player_detect_body_entered"]
@@ -54,4 +58,4 @@ shape = SubResource( 4 )
[connection signal="body_entered" from="Star_detect" to="." method="_on_Star_detect_body_entered"]
[connection signal="body_exited" from="Star_detect" to="." method="_on_Star_detect_body_exited"]
[connection signal="timeout" from="Timer" to="." method="_on_Timer_timeout"]
[connection signal="area_entered" from="Hitbox" to="." method="_on_Hitbox_area_entered"]
[connection signal="area_entered" from="Dark_hitbox" to="." method="_on_Hitbox_area_entered"]

View File

@@ -6,6 +6,7 @@
[ext_resource path="res://Enemies/Hellhound.gd" type="Script" id=4]
[ext_resource path="res://Sprites/Enemies/Hell_Hound_Jump.png" type="Texture" id=5]
[ext_resource path="res://Sprites/Enemies/Hell_Hound_Run.png" type="Texture" id=6]
[ext_resource path="res://Sprites/Enemies/Chasing_Glowing_Ghost.png" type="Texture" id=7]
[sub_resource type="AtlasTexture" id=3]
@@ -79,11 +80,12 @@ region = Rect2( 320, 0, 64, 32 )
[sub_resource type="SpriteFrames" id=20]
animations = [ {
"frames": [ SubResource( 3 ), SubResource( 4 ), SubResource( 5 ), SubResource( 6 ), SubResource( 7 ), SubResource( 8 ) ],
"loop": true,
"name": "Jump",
"speed": 8.0
}, {
"frames": [ SubResource( 15 ), SubResource( 16 ), SubResource( 17 ), SubResource( 18 ), SubResource( 19 ) ],
"frames": [ SubResource( 13 ), SubResource( 14 ), SubResource( 15 ), SubResource( 16 ), SubResource( 17 ) ],
"loop": true,
"name": "Running",
"speed": 5.0
@@ -94,6 +96,7 @@ animations = [ {
"speed": 3.0
} ]
[sub_resource type="CapsuleShape2D" id=21]
radius = 1.5
height = 3.0
@@ -112,13 +115,14 @@ radius = 25.02
light_mask = 0
collision_layer = 4
collision_mask = 5
script = ExtResource( 4 )
[node name="AnimatedSprite1" type="AnimatedSprite" parent="."]
light_mask = 0
position = Vector2( 1, -3 )
scale = Vector2( 0.5625, 0.5625 )
frames = SubResource( 20 )
frames = SubResource( 18 )
animation = "Idle"
frame = 3
playing = true
@@ -127,6 +131,7 @@ playing = true
visible = false
light_mask = 4
position = Vector2( 0, -3 )
texture = ExtResource( 7 )
offset = Vector2( 0, 0.5 )
@@ -150,11 +155,15 @@ shape = SubResource( 1 )
light_mask = 0
collision_layer = 0
collision_mask = 2
input_pickable = false
monitorable = false
collision_layer = 0
collision_mask = 2
[node name="CollisionShape2D" type="CollisionShape2D" parent="Player Detector"]
visible = false
light_mask = 0
shape = SubResource( 2 )
@@ -162,8 +171,12 @@ shape = SubResource( 2 )
light_mask = 0
collision_layer = 0
collision_mask = 2
input_pickable = false
monitorable = false
collision_layer = 0
collision_mask = 2
[node name="CollisionShape2D" type="CollisionShape2D" parent="Player Detector - Attack"]
shape = SubResource( 22 )
@@ -178,6 +191,7 @@ monitorable = false
[node name="CollisionShape2D" type="CollisionShape2D" parent="Player Detector - Attack2"]
shape = SubResource( 22 )
[node name="Light" type="Light2D" parent="."]
visible = false
texture = ExtResource( 2 )

View File

@@ -1,10 +1,27 @@
[gd_scene load_steps=3 format=2]
[gd_scene load_steps=4 format=2]
[ext_resource path="res://Sprites/Assets/blue_star.png" type="Texture" id=1]
[ext_resource path="res://Sprites/Assets/bule_star_sprite_spread.png" type="Texture" id=1]
[sub_resource type="RectangleShape2D" id=1]
extents = Vector2( 7.95021, 8.07351 )
[sub_resource type="Animation" id=2]
resource_name = "Sparkle"
length = 2.0
loop = true
tracks/0/type = "value"
tracks/0/path = NodePath("Sprite: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.5, 1, 1.5 ),
"transitions": PoolRealArray( 1, 1, 1, 1 ),
"update": 1,
"values": [ 0, 1, 2, 3 ]
}
[node name="Star" type="RigidBody2D"]
collision_layer = 4
collision_mask = 0
@@ -15,3 +32,10 @@ shape = SubResource( 1 )
[node name="Sprite" type="Sprite" parent="."]
texture = ExtResource( 1 )
hframes = 4
frame = 2
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
autoplay = "Sparkle"
method_call_mode = 1
anims/Sparkle = SubResource( 2 )

View File

@@ -36,7 +36,6 @@ limit_bottom = 225
[node name="Dark Matter" parent="YSort/Enemies" instance=ExtResource( 6 )]
position = Vector2( 97.0154, 82.0323 )
collision_mask = 0
[node name="Dark Matter2" parent="YSort/Enemies" instance=ExtResource( 6 )]
position = Vector2( 205.006, 50.8542 )
@@ -64,3 +63,12 @@ position = Vector2( 323.666, 161.038 )
[node name="HUD" parent="." instance=ExtResource( 2 )]
[node name="Pause Screen" parent="." instance=ExtResource( 3 )]
[node name="Map_boundary" type="RigidBody2D" parent="."]
collision_layer = 7
collision_mask = 7
mode = 1
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Map_boundary"]
build_mode = 1
polygon = PoolVector2Array( 0.762451, -22.0982, 427.859, -18.7308, 425.053, 245.609, -22.248, 248.976, -21.1256, -22.6594, -0.589813, -21.9661, -0.589806, 225.272, 400.359, 224.843, 399.969, -0.312477, 0.455406, -0.154987 )

Binary file not shown.

After

Width:  |  Height:  |  Size: 389 B

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/blue_star_225.png-5b00146bb430703346fdaaa520f40253.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Sprites/Assets/blue_star_225.png"
dest_files=[ "res://.import/blue_star_225.png-5b00146bb430703346fdaaa520f40253.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 339 B

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/blue_star_45.png-3d076c408f8cdbf88a33f4a91f0e7375.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Sprites/Assets/blue_star_45.png"
dest_files=[ "res://.import/blue_star_45.png-3d076c408f8cdbf88a33f4a91f0e7375.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 746 B

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/bule_star_sprite_spread.png-38c7879008f2591d865215d456421085.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Sprites/Assets/bule_star_sprite_spread.png"
dest_files=[ "res://.import/bule_star_sprite_spread.png-38c7879008f2591d865215d456421085.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=true
svg/scale=1.0