Enemies are spheres now cause fuck off.

This commit is contained in:
Victor Turgeon 2022-10-11 19:54:40 -04:00
parent f9e2351adb
commit 922c38cf7b
2 changed files with 17 additions and 50 deletions

View File

@ -1,6 +1,5 @@
extends KinematicBody extends KinematicBody
onready var animation_player = $AnimationPlayer
var hit_acceleration = 10 var hit_acceleration = 10
var hit_speed = 100 var hit_speed = 100
@ -21,5 +20,7 @@ func _physics_process(delta):
move_and_slide(movement, Vector3.UP) move_and_slide(movement, Vector3.UP)
func get_slapped(slap_level, slap_vector): func get_slapped(slap_level, slap_vector):
animation_player.play("head_wobble")
direction = slap_vector direction = slap_vector
func get_shot():
queue_free()

View File

@ -1,70 +1,36 @@
[gd_scene load_steps=9 format=2] [gd_scene load_steps=8 format=2]
[ext_resource path="res://BlenderStuff/protoenemy.obj" type="ArrayMesh" id=1] [ext_resource path="res://Scripts/HitBox.gd" type="Script" id=1]
[ext_resource path="res://Scenes/Enemy.gd" type="Script" id=2] [ext_resource path="res://Scenes/Enemy.gd" type="Script" id=2]
[ext_resource path="res://Scripts/HurtBox.gd" type="Script" id=3] [ext_resource path="res://Scripts/HurtBox.gd" type="Script" id=3]
[sub_resource type="BoxShape" id=1] [sub_resource type="SphereMesh" id=6]
[sub_resource type="CapsuleShape" id=2] [sub_resource type="SphereShape" id=7]
height = 2.5
[sub_resource type="CylinderShape" id=3] [sub_resource type="SphereShape" id=8]
[sub_resource type="Animation" id=4] [sub_resource type="SphereShape" id=9]
length = 0.001
tracks/0/type = "value"
tracks/0/path = NodePath("MeshInstance:rotation_degrees")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 0,
"values": [ Vector3( 0, 0, -15 ) ]
}
[sub_resource type="Animation" id=5]
resource_name = "head_wobble"
length = 0.5
tracks/0/type = "value"
tracks/0/path = NodePath("MeshInstance:rotation_degrees")
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, 0.3, 0.5 ),
"transitions": PoolRealArray( 1, 2.07053, 1, 0.482968 ),
"update": 0,
"values": [ Vector3( 0, 0, 0 ), Vector3( 0, 0, -15 ), Vector3( 0, 0, 15 ), Vector3( 0, 0, 0 ) ]
}
[node name="Enemy" type="KinematicBody"] [node name="Enemy" type="KinematicBody"]
script = ExtResource( 2 ) script = ExtResource( 2 )
[node name="MeshInstance" type="MeshInstance" parent="."] [node name="MeshInstance" type="MeshInstance" parent="."]
transform = Transform( 0.6, 0, 0, 0, 0.6, 0, 0, 0, 0.6, 0, 0, 0 ) mesh = SubResource( 6 )
mesh = ExtResource( 1 )
[node name="Head" type="Area" parent="."] [node name="Head" type="Area" parent="."]
script = ExtResource( 3 ) script = ExtResource( 3 )
[node name="HeadCollision" type="CollisionShape" parent="Head"] [node name="HeadCollision" type="CollisionShape" parent="Head"]
transform = Transform( 0.432688, 0, 0, 0, 2.49394, 0, 0, 0, 0.432688, 0, -0.0876949, 0 ) shape = SubResource( 7 )
shape = SubResource( 1 )
[node name="EnemyCollision" type="CollisionShape" parent="."] [node name="EnemyCollision" type="CollisionShape" parent="."]
transform = Transform( 1, 0, 0, 0, -4.37114e-08, -1, 0, 1, -4.37114e-08, 0, -0.094023, 0 ) transform = Transform( 1, 0, 0, 0, -4.37114e-08, -1, 0, 1, -4.37114e-08, 0, -0.094023, 0 )
shape = SubResource( 2 ) shape = SubResource( 8 )
[node name="EnemyFeet" type="CollisionShape" parent="."] [node name="HitBox" type="Area" parent="."]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1.59606, 0 ) script = ExtResource( 1 )
shape = SubResource( 3 ) hitbox_type = 2
[node name="AnimationPlayer" type="AnimationPlayer" parent="."] [node name="CollisionShape" type="CollisionShape" parent="HitBox"]
reset_on_save = false shape = SubResource( 9 )
anims/RESET = SubResource( 4 )
anims/head_wobble = SubResource( 5 )