Add Reed AI character
This commit is contained in:
parent
c2d1a6a127
commit
c759e49e61
13 changed files with 2272 additions and 31 deletions
|
@ -237,6 +237,7 @@ y_sort_enabled = true
|
|||
collision_layer = 5
|
||||
motion_mode = 1
|
||||
script = ExtResource("1_dtymi")
|
||||
has_nsfw_animations = true
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||
texture_filter = 1
|
||||
|
|
BIN
Reed/Reed_Hurt_Sprites.png
(Stored with Git LFS)
Normal file
BIN
Reed/Reed_Hurt_Sprites.png
(Stored with Git LFS)
Normal file
Binary file not shown.
34
Reed/Reed_Hurt_Sprites.png.import
Normal file
34
Reed/Reed_Hurt_Sprites.png.import
Normal file
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://c7q83hvbvaifu"
|
||||
path="res://.godot/imported/Reed_Hurt_Sprites.png-f4f62484fa3f17041903b943f731fdcb.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Reed/Reed_Hurt_Sprites.png"
|
||||
dest_files=["res://.godot/imported/Reed_Hurt_Sprites.png-f4f62484fa3f17041903b943f731fdcb.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
BIN
Reed/Reed_Melee_Sprites_Y.png
(Stored with Git LFS)
Normal file
BIN
Reed/Reed_Melee_Sprites_Y.png
(Stored with Git LFS)
Normal file
Binary file not shown.
34
Reed/Reed_Melee_Sprites_Y.png.import
Normal file
34
Reed/Reed_Melee_Sprites_Y.png.import
Normal file
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://ctajre4ylwoqp"
|
||||
path="res://.godot/imported/Reed_Melee_Sprites_Y.png-e24a71bff10f79115f93d245873fbd9c.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Reed/Reed_Melee_Sprites_Y.png"
|
||||
dest_files=["res://.godot/imported/Reed_Melee_Sprites_Y.png-e24a71bff10f79115f93d245873fbd9c.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
BIN
Reed/Reed_Reed_Defeated_Sprite_.png
(Stored with Git LFS)
Normal file
BIN
Reed/Reed_Reed_Defeated_Sprite_.png
(Stored with Git LFS)
Normal file
Binary file not shown.
34
Reed/Reed_Reed_Defeated_Sprite_.png.import
Normal file
34
Reed/Reed_Reed_Defeated_Sprite_.png.import
Normal file
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://clbdgd8f7isb4"
|
||||
path="res://.godot/imported/Reed_Reed_Defeated_Sprite_.png-7247dea190102302cddccfe0ed6b0438.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Reed/Reed_Reed_Defeated_Sprite_.png"
|
||||
dest_files=["res://.godot/imported/Reed_Reed_Defeated_Sprite_.png-7247dea190102302cddccfe0ed6b0438.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
|
@ -1,9 +1,9 @@
|
|||
[gd_scene load_steps=64 format=3 uid="uid://bwrwh5of0jw4a"]
|
||||
[gd_scene load_steps=63 format=3 uid="uid://bwrwh5of0jw4a"]
|
||||
|
||||
[ext_resource type="Script" path="res://Scripts/hiro_ai.gd" id="1_yavbv"]
|
||||
[ext_resource type="Shader" uid="uid://bcnip762rd6yj" path="res://Shaders/character.tres" id="2_y6nd7"]
|
||||
[ext_resource type="Texture2D" uid="uid://cm7tgomrcvq30" path="res://Hiro/Hiro Walk Sprite Cycle Line Up.png" id="3_mgryv"]
|
||||
[ext_resource type="AnimationLibrary" uid="uid://dincs5x4qucal" path="res://Hiro/hiro_animation.tres" id="4_tcpux"]
|
||||
[ext_resource type="Texture2D" uid="uid://pittqsk5eskq" path="res://Reed/Reed Walk Sprite Cycle Line Up.png" id="3_2rpco"]
|
||||
[ext_resource type="AnimationLibrary" uid="uid://bhg3cnhjeq85r" path="res://Reed/reed_animation.tres" id="4_nk4o6"]
|
||||
[ext_resource type="Script" path="res://addons/godot_state_charts/state_chart.gd" id="5_pgbft"]
|
||||
[ext_resource type="Script" path="res://addons/godot_state_charts/compound_state.gd" id="6_a7x4q"]
|
||||
[ext_resource type="Script" path="res://addons/godot_state_charts/atomic_state.gd" id="7_jc1pg"]
|
||||
|
@ -37,8 +37,11 @@ blend_point_3/node = SubResource("AnimationNodeAnimation_tmboi")
|
|||
blend_point_3/pos = Vector2(0, -1)
|
||||
blend_mode = 1
|
||||
|
||||
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_8ov0j"]
|
||||
animation = &"player_defeated"
|
||||
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_kgin3"]
|
||||
animation = &"ai_defeated_start"
|
||||
|
||||
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_0ny5g"]
|
||||
animation = &"ai_defeated"
|
||||
|
||||
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_tyc74"]
|
||||
animation = &"hurt_west"
|
||||
|
@ -164,12 +167,6 @@ blend_point_2/node = SubResource("AnimationNodeBlendSpace2D_mr7t3")
|
|||
blend_point_2/pos = 1.0
|
||||
blend_mode = 1
|
||||
|
||||
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_0ny5g"]
|
||||
animation = &"ai_defeated"
|
||||
|
||||
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_kgin3"]
|
||||
animation = &"ai_defeated_start"
|
||||
|
||||
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_17wsb"]
|
||||
animation = &"walking_north"
|
||||
|
||||
|
@ -226,22 +223,20 @@ states/End/position = Vector2(1026, 108)
|
|||
states/Start/position = Vector2(197, 108)
|
||||
states/cut_walk/node = SubResource("AnimationNodeBlendSpace2D_h2456")
|
||||
states/cut_walk/position = Vector2(563, 400)
|
||||
states/defeated/node = SubResource("AnimationNodeAnimation_8ov0j")
|
||||
states/defeated/position = Vector2(734, 74)
|
||||
states/defeated/node = SubResource("AnimationNodeAnimation_kgin3")
|
||||
states/defeated/position = Vector2(734, 202)
|
||||
states/defeated_loop/node = SubResource("AnimationNodeAnimation_0ny5g")
|
||||
states/defeated_loop/position = Vector2(895, 202)
|
||||
states/hurt/node = SubResource("AnimationNodeBlendSpace2D_h2vkc")
|
||||
states/hurt/position = Vector2(329, -13)
|
||||
states/idle/node = SubResource("AnimationNodeBlendSpace2D_bd8j1")
|
||||
states/idle/position = Vector2(329, 108)
|
||||
states/melee/node = SubResource("AnimationNodeBlendSpace1D_dc3kp")
|
||||
states/melee/position = Vector2(329, 224)
|
||||
states/naked/node = SubResource("AnimationNodeAnimation_0ny5g")
|
||||
states/naked/position = Vector2(895, 202)
|
||||
states/naked_start/node = SubResource("AnimationNodeAnimation_kgin3")
|
||||
states/naked_start/position = Vector2(734, 202)
|
||||
states/walk/node = SubResource("AnimationNodeBlendSpace2D_vunsg")
|
||||
states/walk/position = Vector2(519, 108)
|
||||
transitions = ["Start", "idle", SubResource("AnimationNodeStateMachineTransition_akmuq"), "idle", "walk", SubResource("AnimationNodeStateMachineTransition_sn1tm"), "walk", "idle", SubResource("AnimationNodeStateMachineTransition_5i3fu"), "idle", "melee", SubResource("AnimationNodeStateMachineTransition_y8p74"), "melee", "idle", SubResource("AnimationNodeStateMachineTransition_l17k0"), "hurt", "idle", SubResource("AnimationNodeStateMachineTransition_ln3pc"), "naked_start", "naked", SubResource("AnimationNodeStateMachineTransition_l5ng5")]
|
||||
graph_offset = Vector2(20, 231)
|
||||
transitions = ["Start", "idle", SubResource("AnimationNodeStateMachineTransition_akmuq"), "idle", "walk", SubResource("AnimationNodeStateMachineTransition_sn1tm"), "walk", "idle", SubResource("AnimationNodeStateMachineTransition_5i3fu"), "idle", "melee", SubResource("AnimationNodeStateMachineTransition_y8p74"), "melee", "idle", SubResource("AnimationNodeStateMachineTransition_l17k0"), "hurt", "idle", SubResource("AnimationNodeStateMachineTransition_ln3pc"), "defeated", "defeated_loop", SubResource("AnimationNodeStateMachineTransition_l5ng5")]
|
||||
graph_offset = Vector2(65, 24)
|
||||
|
||||
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_vm050"]
|
||||
radius = 9.0
|
||||
|
@ -270,18 +265,30 @@ y_sort_enabled = true
|
|||
collision_layer = 5
|
||||
motion_mode = 1
|
||||
script = ExtResource("1_yavbv")
|
||||
KNOCKBACK_REPOSITION_POWER = null
|
||||
MELEE_RADIUS = null
|
||||
chase_speed = null
|
||||
approach_speed = null
|
||||
min_recoil_time = null
|
||||
max_recoil_time = null
|
||||
reduce_recoil_time_threshold = null
|
||||
speed = null
|
||||
max_health = null
|
||||
health = null
|
||||
attack_power = null
|
||||
KNOCKBACK_POWER = null
|
||||
KNOCKBACK_RANDOMNESS = null
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||
modulate = Color(0.498039, 0.498039, 0.498039, 1)
|
||||
texture_filter = 1
|
||||
material = SubResource("ShaderMaterial_7ckhc")
|
||||
position = Vector2(0, -13)
|
||||
texture = ExtResource("3_mgryv")
|
||||
texture = ExtResource("3_2rpco")
|
||||
hframes = 20
|
||||
|
||||
[node name="AnimationTree" type="AnimationTree" parent="."]
|
||||
libraries = {
|
||||
"": ExtResource("4_tcpux")
|
||||
"": ExtResource("4_nk4o6")
|
||||
}
|
||||
tree_root = SubResource("AnimationNodeStateMachine_b0avg")
|
||||
parameters/conditions/is_moving = false
|
||||
|
|
2124
Reed/reed_animation.tres
Normal file
2124
Reed/reed_animation.tres
Normal file
File diff suppressed because it is too large
Load diff
|
@ -32,10 +32,8 @@ func _on_ui_dialogue_opened():
|
|||
func _on_ui_dialogue_continued():
|
||||
play_sound("dialogue_continue")
|
||||
|
||||
func _on_character_got_hurt(new_health: int):
|
||||
func _on_character_got_hurt(_new_health: int):
|
||||
play_sound("melee_hit")
|
||||
if new_health <= 0 and Globals.nsfw:
|
||||
play_sound("effect_smoke")
|
||||
|
||||
func _on_humanoid_character_attacked():
|
||||
play_sound("melee")
|
||||
|
|
|
@ -9,6 +9,8 @@ class_name CharacterBase
|
|||
@export var attack_power: int = 30
|
||||
@export var KNOCKBACK_POWER: float = 40
|
||||
@export var KNOCKBACK_RANDOMNESS: float = 50
|
||||
@export_group("Animations")
|
||||
@export var has_nsfw_animations = false
|
||||
|
||||
signal attacked
|
||||
signal attack_did_hit(other: Area2D, power: int, attack_direction: Vector2)
|
||||
|
|
|
@ -5,23 +5,21 @@ extends Node2D
|
|||
@onready var player = $HiroPlayer
|
||||
@onready var ai = $HiroAI
|
||||
@onready var cutscene_manager = $CutsceneManager
|
||||
@onready var sound_manager = $SoundManager
|
||||
|
||||
func _ready():
|
||||
battle_ui.initialize(player.health, ai.health)
|
||||
battle_ui.set_player_health(player.health)
|
||||
battle_ui.set_enemy_health(ai.health)
|
||||
cutscene_manager.step()
|
||||
# cutscene_manager.step()
|
||||
|
||||
func _on_player_defeated():
|
||||
if Globals.nsfw == true:
|
||||
sound_manager.play_sound("effect_smoke")
|
||||
explosion_generator.spawn(player.position)
|
||||
var cutscene = load("res://Cutscenes/prototype_defeated.tres")
|
||||
cutscene_manager.load_cutscene(cutscene)
|
||||
cutscene_manager.step()
|
||||
|
||||
func _on_ai_defeated():
|
||||
if Globals.nsfw == true:
|
||||
explosion_generator.spawn(ai.position)
|
||||
|
||||
func _on_cutscene_started(cutscene_name):
|
||||
$HiroPlayer.can_move = false
|
||||
|
|
|
@ -166,7 +166,7 @@ func _on_animation_tree_animation_finished(anim_name):
|
|||
state_machine.send_event("melee_complete")
|
||||
|
||||
func _on_defeat_state_entered():
|
||||
if Globals.nsfw:
|
||||
if has_nsfw_animations and Globals.nsfw:
|
||||
anim_playback.travel("naked_start")
|
||||
else:
|
||||
anim_playback.travel("defeated")
|
||||
|
|
Loading…
Reference in a new issue