From d9983f3601f6273d1cb175d5f9d039db6bf0e2c7 Mon Sep 17 00:00:00 2001 From: Diego Date: Sun, 19 Jul 2020 18:48:36 -0500 Subject: [PATCH] Health assigned to ai --- ai/Hell.gd | 3 ++- magic/Projectiles/EcoProjectile.tscn | 2 ++ magic/Projectiles/ExplosiveProjectile.tscn | 2 ++ magic/Projectiles/PhantomProjectile.tscn | 2 ++ magic/Projectiles/WaveProjectile.tscn | 2 ++ project.godot | 26 ++++++++++++++-------- script/Skeleton Enemy.gd | 2 +- 7 files changed, 28 insertions(+), 11 deletions(-) diff --git a/ai/Hell.gd b/ai/Hell.gd index 0c3da59..04fe02d 100644 --- a/ai/Hell.gd +++ b/ai/Hell.gd @@ -3,7 +3,8 @@ extends KinematicBody2D var Hell_Projectile = preload("res://ai/BadFireball.tscn") var speed = 60 var gravity =500 -var health = 5 +var health = .5 + const UP = Vector2(0, -1) onready var ShootDelay : Timer = $ShootDelay diff --git a/magic/Projectiles/EcoProjectile.tscn b/magic/Projectiles/EcoProjectile.tscn index 533bcdf..c003721 100644 --- a/magic/Projectiles/EcoProjectile.tscn +++ b/magic/Projectiles/EcoProjectile.tscn @@ -7,6 +7,8 @@ radius = 5.0 [node name="EcoProjectile" type="KinematicBody2D"] +collision_layer = 8 +collision_mask = 6 script = ExtResource( 2 ) [node name="Sprite" type="Sprite" parent="."] diff --git a/magic/Projectiles/ExplosiveProjectile.tscn b/magic/Projectiles/ExplosiveProjectile.tscn index f919223..0197ae6 100644 --- a/magic/Projectiles/ExplosiveProjectile.tscn +++ b/magic/Projectiles/ExplosiveProjectile.tscn @@ -7,6 +7,8 @@ radius = 6.0 [node name="ExplosiveProjectile" type="KinematicBody2D"] +collision_layer = 8 +collision_mask = 6 script = ExtResource( 2 ) [node name="Sprite" type="Sprite" parent="."] diff --git a/magic/Projectiles/PhantomProjectile.tscn b/magic/Projectiles/PhantomProjectile.tscn index 2f17b8c..ce92f38 100644 --- a/magic/Projectiles/PhantomProjectile.tscn +++ b/magic/Projectiles/PhantomProjectile.tscn @@ -8,6 +8,8 @@ radius = 5.0 height = 2.0 [node name="PhantomProjectile" type="KinematicBody2D"] +collision_layer = 2147483656 +collision_mask = 6 script = ExtResource( 2 ) [node name="Sprite" type="Sprite" parent="."] diff --git a/magic/Projectiles/WaveProjectile.tscn b/magic/Projectiles/WaveProjectile.tscn index dbfe583..e715434 100644 --- a/magic/Projectiles/WaveProjectile.tscn +++ b/magic/Projectiles/WaveProjectile.tscn @@ -8,6 +8,8 @@ radius = 4.0 height = 4.0 [node name="WaveProjectile" type="KinematicBody2D"] +collision_layer = 8 +collision_mask = 6 script = ExtResource( 2 ) [node name="Sprite" type="Sprite" parent="."] diff --git a/project.godot b/project.godot index 673fb89..cbeac25 100644 --- a/project.godot +++ b/project.godot @@ -45,7 +45,7 @@ _global_script_class_icons={ [application] config/name="Gamejam" -run/main_scene="res://levels/test.tscn" +run/main_scene="res://Title/Tilte.tscn" config/icon="res://icon.png" [autoload] @@ -55,10 +55,6 @@ IconLoaderGithub="*res://addons/github-integration/scripts/IconLoaderGithub.gd" RestHandler="*res://addons/github-integration/scripts/RestHandler.gd" Globals="*res://script/globals.gd" -[debug] - -settings/fps/force_fps=60 - [display] window/size/width=320 @@ -94,32 +90,47 @@ texture={ "stream": false, "svg/scale": 1.0 } +wav={ +"compress/mode": 0, +"edit/loop": true, +"edit/normalize": false, +"edit/trim": false, +"force/8_bit": false, +"force/max_rate": false, +"force/max_rate_hz": 44100, +"force/mono": false +} [input] 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":32,"unicode":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":87,"unicode":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777232,"unicode":0,"echo":false,"script":null) ] } down={ "deadzone": 0.5, "events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":83,"unicode":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777234,"unicode":0,"echo":false,"script":null) ] } left={ "deadzone": 0.5, "events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":65,"unicode":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777231,"unicode":0,"echo":false,"script":null) ] } right={ "deadzone": 0.5, "events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":68,"unicode":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777233,"unicode":0,"echo":false,"script":null) ] } shoot={ "deadzone": 0.5, -"events": [ Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"button_mask":0,"position":Vector2( 0, 0 ),"global_position":Vector2( 0, 0 ),"factor":1.0,"button_index":1,"pressed":false,"doubleclick":false,"script":null) +"events": [ Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"button_mask":0,"position":Vector2( 0, 0 ),"global_position":Vector2( 0, 0 ),"factor":1.0,"button_index":1,"pressed":false,"doubleclick":false,"script":null) ] } inventory={ @@ -130,14 +141,11 @@ inventory={ [layer_names] -2d_render/layer_1="Player" 2d_physics/layer_1="Player" -2d_render/layer_2="World" 2d_physics/layer_2="World" 2d_physics/layer_3="Enemy" 2d_physics/layer_4="Projectiles" [rendering] -quality/driver/fallback_to_gles2=true environment/default_environment="res://default_env.tres" diff --git a/script/Skeleton Enemy.gd b/script/Skeleton Enemy.gd index 9cec089..8c5c7c7 100644 --- a/script/Skeleton Enemy.gd +++ b/script/Skeleton Enemy.gd @@ -3,7 +3,7 @@ extends KinematicBody2D var Spinning_Bone = preload("res://ai/SpinningBone.tscn") var speed = 60 var gravity =500 -var health = 5 +var health = 1 const UP = Vector2(0, -1)