Added cotton on AI
This commit is contained in:
parent
739eb34d6d
commit
fe6bb20428
3 changed files with 29 additions and 3 deletions
|
@ -1,7 +1,8 @@
|
|||
[gd_scene load_steps=5 format=3 uid="uid://y3fffh5cdbks"]
|
||||
[gd_scene load_steps=6 format=3 uid="uid://y3fffh5cdbks"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/AI.gd" id="1_1d27o"]
|
||||
[ext_resource type="PackedScene" uid="uid://b3l10agcjfgdx" path="res://characters/teddy/model_glb/teddy.glb" id="2_0yvds"]
|
||||
[ext_resource type="ArrayMesh" uid="uid://b26a54y2fd5n8" path="res://characters/teddy/cotton/cotton.obj" id="3_qolnj"]
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_7vhwh"]
|
||||
size = Vector3(1, 1.99126, 1)
|
||||
|
@ -29,3 +30,23 @@ mesh = SubResource("CapsuleMesh_ucocb")
|
|||
skeleton = NodePath("")
|
||||
|
||||
[node name="sound" type="AudioStreamPlayer3D" parent="."]
|
||||
|
||||
[node name="CPUParticles3D" type="CPUParticles3D" parent="."]
|
||||
emitting = false
|
||||
amount = 3
|
||||
mesh = ExtResource("3_qolnj")
|
||||
emission_shape = 1
|
||||
emission_sphere_radius = 1.0
|
||||
particle_flag_rotate_y = true
|
||||
spread = 4.55
|
||||
gravity = Vector3(2.08165e-12, -6, 2.08165e-12)
|
||||
initial_velocity_max = 4.76
|
||||
angular_velocity_max = 54.86
|
||||
linear_accel_max = 2.02
|
||||
radial_accel_max = 4.04
|
||||
tangential_accel_max = 3.06
|
||||
damping_max = 3.27
|
||||
angle_min = 7.3
|
||||
angle_max = 29.1
|
||||
scale_amount_min = 0.05
|
||||
scale_amount_max = 0.1
|
||||
|
|
|
@ -37,6 +37,7 @@ func _physics_process(delta):
|
|||
Global.AIHit = false
|
||||
var damage = RandomNumberGenerator.new().randi_range(7, 16)
|
||||
health -= damage
|
||||
spawn_cotton()
|
||||
if health <= 0:
|
||||
dead_AI()
|
||||
if $CollisionShape3D/Neck/Teddy/AnimationPlayer.is_playing():
|
||||
|
@ -75,3 +76,7 @@ func dead_AI():
|
|||
$CollisionShape3D.disabled = false
|
||||
dead = false
|
||||
|
||||
func spawn_cotton():
|
||||
$CPUParticles3D.emitting = true
|
||||
await get_tree().create_timer(0.5).timeout
|
||||
$CPUParticles3D.emitting = false
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
extends Control
|
||||
|
||||
var playTesters = ["Aquamelemele", "Bladen", "BlueDragon", "Borscht", "Deathorous", "Happyday47", "Maximiliano", "Valcuda", "Verhexen"]
|
||||
var playTesters = ["Aquamelemele", "Bladen", "BlueDragon", "Borscht", "Craziness", "Deathorous", "Happyday47", "JustTheKing", "Luni", "Maximiliano", "Reallugia97", "ScytherTK", "Supercapnb", "Valcuda", "Verhexen", "Warnerbros", "WolfTK", "ZackvaderXD"]
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
|
|
Loading…
Reference in a new issue