merge
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<Project Sdk="Godot.NET.Sdk/4.4.1">
|
||||
<Project Sdk="Godot.NET.Sdk/4.4.0">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<EnableDynamicLoading>true</EnableDynamicLoading>
|
||||
|
||||
38
Zennysoft.Game.Ma/Ma.csproj.old.3
Normal file
38
Zennysoft.Game.Ma/Ma.csproj.old.3
Normal file
@@ -0,0 +1,38 @@
|
||||
<Project Sdk="Godot.NET.Sdk/4.4.1">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<EnableDynamicLoading>true</EnableDynamicLoading>
|
||||
<WarningsAsErrors>CS9057</WarningsAsErrors>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Chickensoft.AutoInject" Version="2.5.0" />
|
||||
<PackageReference Include="Chickensoft.GodotNodeInterfaces" Version="2.4.0" />
|
||||
<PackageReference Include="Chickensoft.Introspection" Version="2.2.0" />
|
||||
<PackageReference Include="Chickensoft.Introspection.Generator" Version="2.2.0" />
|
||||
<PackageReference Include="Chickensoft.LogicBlocks" Version="5.16.0" />
|
||||
<PackageReference Include="Chickensoft.LogicBlocks.DiagramGenerator" Version="5.16.0" />
|
||||
<PackageReference Include="Chickensoft.SaveFileBuilder" Version="1.1.0" />
|
||||
<PackageReference Include="Chickensoft.Serialization.Godot" Version="0.7.6" />
|
||||
<PackageReference Include="GodotSharp.SourceGenerators" Version="2.6.0-250131-2115.Release" />
|
||||
<PackageReference Include="SimpleInjector" Version="5.5.0" />
|
||||
<PackageReference Include="SSH.NET" Version="2024.2.0" />
|
||||
<PackageReference Include="System.IO.Abstractions" Version="22.0.11" />
|
||||
<PackageReference Include="Zeroconf" Version="3.7.16" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include=".editorconfig" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Zennysoft.Game.Godot.Implementation\Zennysoft.Game.Implementation.csproj" />
|
||||
<ProjectReference Include="..\Zennysoft.Game.Ma.Implementation\Zennysoft.Ma.Adapter.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Update="Godot.SourceGenerators" Version="4.4.0-dev.2" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Update="GodotSharp" Version="4.4.0-dev.2" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Update="GodotSharpEditor" Version="4.4.0-dev.2" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -18,7 +18,7 @@
|
||||
[ext_resource type="PackedScene" uid="uid://bli0t0d6ommvi" path="res://src/enemy/enemy_types/04. sara/SaraModelView.tscn" id="16_alsxp"]
|
||||
[ext_resource type="PackedScene" uid="uid://byd7cwxq1be6f" path="res://src/enemy/enemy_types/07. chinthe/ChintheModelView.tscn" id="17_qov77"]
|
||||
[ext_resource type="PackedScene" uid="uid://c5xijwxkg4pf6" path="res://src/enemy/enemy_types/05. ballos/BallosModelView.tscn" id="18_sxd8s"]
|
||||
[ext_resource type="PackedScene" uid="uid://c5asojy73n44d" path="res://src/enemy/enemy_types/13. gold sproingy/GoldSproingyModelView.tscn" id="19_gkucd"]
|
||||
[ext_resource type="PackedScene" uid="uid://c5asojy73n44d" path="res://src/enemy/enemy_types/13. gold sproingy/GoldSproingyModelView2.tscn" id="19_gkucd"]
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_dvixg"]
|
||||
shading_mode = 0
|
||||
|
||||
@@ -6,6 +6,7 @@ using System.Collections.Immutable;
|
||||
using System.Linq;
|
||||
using Zennysoft.Ma.Adapter;
|
||||
using Zennysoft.Ma.Adapter.Entity;
|
||||
using static Zennysoft.Ma.Adapter.AppLogic;
|
||||
|
||||
namespace Zennysoft.Game.Ma;
|
||||
|
||||
@@ -45,7 +46,8 @@ public abstract partial class Enemy : CharacterBody3D, IEnemy, IProvide<IEnemyLo
|
||||
|
||||
[Export] public int ExpGiven { get; set; } = 10;
|
||||
|
||||
private bool _activated = false;
|
||||
protected bool _activated = false;
|
||||
private Vector3 _previousPosition = Vector3.Zero;
|
||||
|
||||
public Enemy()
|
||||
{
|
||||
@@ -77,6 +79,8 @@ public abstract partial class Enemy : CharacterBody3D, IEnemy, IProvide<IEnemyLo
|
||||
|
||||
if (this is IHaveFollowBehavior)
|
||||
_enemyLogic.Input(new EnemyLogic.Input.Follow());
|
||||
if (this is IHaveFleeBehavior)
|
||||
_enemyLogic.Input(new EnemyLogic.Input.Flee());
|
||||
}
|
||||
})
|
||||
.Handle((in EnemyLogic.Output.Idle _) =>
|
||||
@@ -180,9 +184,17 @@ public abstract partial class Enemy : CharacterBody3D, IEnemy, IProvide<IEnemyLo
|
||||
|
||||
protected void LookAtTarget(Vector3 targetPosition)
|
||||
{
|
||||
var velocity = GlobalPosition - _previousPosition;
|
||||
if (velocity.IsZeroApprox())
|
||||
{
|
||||
_previousPosition = GlobalPosition;
|
||||
return;
|
||||
}
|
||||
|
||||
var lookDirection = GlobalPosition - targetPosition;
|
||||
if (lookDirection != GlobalPosition)
|
||||
LookAt(new Vector3(lookDirection.X, GlobalPosition.Y, lookDirection.Z), Vector3.Up);
|
||||
var look = new Vector3(lookDirection.X, GlobalPosition.Y, lookDirection.Z);
|
||||
if (!look.IsEqualApprox(GlobalPosition))
|
||||
LookAt(look, Vector3.Up);
|
||||
}
|
||||
|
||||
protected void SetTarget(Vector3 targetPosition) => TargetPosition = targetPosition;
|
||||
|
||||
@@ -12,12 +12,12 @@ public abstract partial class Enemy2D : Enemy
|
||||
|
||||
[Node] private Area3D LineOfSight { get; set; } = default!;
|
||||
|
||||
[Node] private RayCast3D Raycast { get; set; } = default!;
|
||||
|
||||
public override IEnemyModelView EnemyModelView => _enemyModelView;
|
||||
|
||||
[Node] private EnemyModelView2D _enemyModelView { get; set; } = default!;
|
||||
|
||||
private Vector3 _previousPosition = Vector3.Zero;
|
||||
|
||||
public void OnEnterTree()
|
||||
{
|
||||
LineOfSight.BodyEntered += LineOfSight_BodyEntered;
|
||||
@@ -28,6 +28,19 @@ public abstract partial class Enemy2D : Enemy
|
||||
_enemyModelView.SetCurrentDirection(GlobalBasis, -_player.GlobalBasis.Z);
|
||||
}
|
||||
|
||||
public override void _Process(double delta)
|
||||
{
|
||||
if (_enemyLogic.Value is EnemyLogic.State.FollowPlayer || _enemyLogic.Value is EnemyLogic.State.Patrolling)
|
||||
{
|
||||
var velocity = (GlobalPosition - _previousPosition) / (float)delta;
|
||||
if (velocity.IsZeroApprox())
|
||||
_enemyLogic.Input(new EnemyLogic.Input.Idle());
|
||||
else
|
||||
_enemyLogic.Input(new EnemyLogic.Input.Move());
|
||||
_previousPosition = GlobalPosition;
|
||||
}
|
||||
}
|
||||
|
||||
protected void PlayerDetector_BodyEntered(Node3D node)
|
||||
{
|
||||
if (node is IPlayer)
|
||||
@@ -53,18 +66,7 @@ public abstract partial class Enemy2D : Enemy
|
||||
|
||||
private void LineOfSight_BodyEntered(Node3D body)
|
||||
{
|
||||
var overlappingBodies = LineOfSight.GetOverlappingBodies();
|
||||
foreach (var _ in overlappingBodies)
|
||||
{
|
||||
if (Raycast.GlobalPosition != _player.GlobalPosition)
|
||||
Raycast.LookAt(_player.GlobalPosition, Vector3.Up);
|
||||
Raycast.ForceRaycastUpdate();
|
||||
if (Raycast.IsColliding())
|
||||
{
|
||||
var collider = Raycast.GetCollider();
|
||||
if (collider is IPlayer)
|
||||
_enemyLogic.Input(new EnemyLogic.Input.Alert());
|
||||
}
|
||||
}
|
||||
if (body is IPlayer)
|
||||
_enemyLogic.Input(new EnemyLogic.Input.Alert());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,24 +10,24 @@ public abstract partial class EnemyModelView : Node3D, IEnemyModelView
|
||||
{
|
||||
public override void _Notification(int what) => this.Notify(what);
|
||||
|
||||
private readonly string _idleName = "Idle";
|
||||
private readonly string _walkingName = "Walking";
|
||||
private readonly string _stopWalkName = "Stop Walk";
|
||||
private readonly string _primaryAttackName = "Primary Attack";
|
||||
private readonly string _secondaryAttackName = "Secondary Attack";
|
||||
private readonly string _primarySkillName = "Primary Skill";
|
||||
private readonly string _activateName = "Activate";
|
||||
private readonly string _activateFront = "activate";
|
||||
private readonly string _activateLeft = "activate_left";
|
||||
private readonly string _activateRight = "activate_right";
|
||||
private readonly string _activateBack = "activate_back";
|
||||
private readonly string _parametersPlayback = "parameters/playback";
|
||||
protected readonly string _idleName = "Idle";
|
||||
protected readonly string _walkingName = "Walking";
|
||||
protected readonly string _stopWalkName = "Stop Walk";
|
||||
protected readonly string _primaryAttackName = "Primary Attack";
|
||||
protected readonly string _secondaryAttackName = "Secondary Attack";
|
||||
protected readonly string _primarySkillName = "Primary Skill";
|
||||
protected readonly string _activateName = "Activate";
|
||||
protected readonly string _activateFront = "activate";
|
||||
protected readonly string _activateLeft = "activate_left";
|
||||
protected readonly string _activateRight = "activate_right";
|
||||
protected readonly string _activateBack = "activate_back";
|
||||
protected readonly string _parametersPlayback = "parameters/playback";
|
||||
|
||||
[Node] public AnimationTree AnimationTree { get; set; } = default!;
|
||||
|
||||
[Export] public AttackDataResource AttackData { get; set; }
|
||||
|
||||
private AnimationNodeStateMachinePlayback _stateMachine;
|
||||
protected AnimationNodeStateMachinePlayback _stateMachine;
|
||||
|
||||
public event EventHandler HitPlayer;
|
||||
|
||||
@@ -44,19 +44,19 @@ public abstract partial class EnemyModelView : Node3D, IEnemyModelView
|
||||
AnimationTree.AnimationFinished += AnimationTree_AnimationFinished;
|
||||
}
|
||||
|
||||
public virtual void PlayPrimaryAttackAnimation() => _stateMachine.Travel(_primaryAttackName);
|
||||
public virtual void PlayPrimaryAttackAnimation() => _stateMachine.Travel(_primaryAttackName, false);
|
||||
|
||||
public virtual void PlaySecondaryAttackAnimation() => _stateMachine.Travel(_secondaryAttackName);
|
||||
public virtual void PlaySecondaryAttackAnimation() => _stateMachine.Travel(_secondaryAttackName, false);
|
||||
|
||||
public virtual void PlayPrimarySkillAnimation() => _stateMachine.Travel(_primarySkillName);
|
||||
public virtual void PlayPrimarySkillAnimation() => _stateMachine.Travel(_primarySkillName, false);
|
||||
|
||||
public virtual void PlayIdleAnimation() => _stateMachine.Travel(_idleName);
|
||||
public virtual void PlayIdleAnimation() => _stateMachine.Travel(_idleName, false);
|
||||
|
||||
public virtual void PlayWalkAnimation() => _stateMachine.Travel(_walkingName);
|
||||
public virtual void PlayWalkAnimation() => _stateMachine.Travel(_walkingName, false);
|
||||
|
||||
public virtual void PlayStopWalkAnimation() => _stateMachine.Travel(_stopWalkName);
|
||||
public virtual void PlayStopWalkAnimation() => _stateMachine.Travel(_stopWalkName, false);
|
||||
|
||||
public virtual void PlayActivateAnimation() => _stateMachine.Travel(_activateName);
|
||||
public virtual void PlayActivateAnimation() => _stateMachine.Travel(_activateName, false);
|
||||
|
||||
public virtual void PlayDeathAnimation() => throw new System.NotImplementedException();
|
||||
|
||||
@@ -64,7 +64,7 @@ public abstract partial class EnemyModelView : Node3D, IEnemyModelView
|
||||
|
||||
protected virtual void OnPlayerHit(AttackEventArgs arg) => HitPlayer?.Invoke(this, arg);
|
||||
|
||||
private void AnimationTree_AnimationFinished(StringName animName)
|
||||
protected void AnimationTree_AnimationFinished(StringName animName)
|
||||
{
|
||||
if (animName == _activateFront || animName == _activateLeft || animName == _activateRight || animName == _activateBack)
|
||||
ActivationFinished?.Invoke(this, EventArgs.Empty);
|
||||
|
||||
@@ -40,7 +40,7 @@ public static class EnemyTypeToEnemyConverter
|
||||
case EnemyType.Palan:
|
||||
return InstantiateFromPath(@$"{_folderPath}/11. Palan/Palan.tscn");
|
||||
case EnemyType.ShieldOfHeaven:
|
||||
return InstantiateFromPath(@$"{_folderPath}/12. Shield of Heaven/ShieldModelView.tscn");
|
||||
return InstantiateFromPath(@$"{_folderPath}/12. Shield of Heaven/ShieldOfHeaven.tscn");
|
||||
case EnemyType.GoldSproingy:
|
||||
return InstantiateFromPath(@$"{_folderPath}/13. gold sproingy/GoldSproingy.tscn");
|
||||
default:
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Chickensoft.GodotNodeInterfaces;
|
||||
using Godot;
|
||||
using System;
|
||||
|
||||
namespace Zennysoft.Game.Ma;
|
||||
|
||||
@@ -98,4 +98,4 @@ states/left/position = Vector2(378, 179)
|
||||
states/right/node = SubResource("AnimationNodeAnimation_8wbs7")
|
||||
states/right/position = Vector2(701, 179)
|
||||
transitions = ["Start", "forward", SubResource("AnimationNodeStateMachineTransition_ivy74"), "forward", "left", SubResource("AnimationNodeStateMachineTransition_x7uye"), "left", "forward", SubResource("AnimationNodeStateMachineTransition_djeua"), "forward", "back", SubResource("AnimationNodeStateMachineTransition_8wbs7"), "back", "forward", SubResource("AnimationNodeStateMachineTransition_mnr4r"), "left", "right", SubResource("AnimationNodeStateMachineTransition_l2wq1"), "right", "left", SubResource("AnimationNodeStateMachineTransition_jwlar"), "back", "left", SubResource("AnimationNodeStateMachineTransition_fdoul"), "left", "back", SubResource("AnimationNodeStateMachineTransition_kpotx"), "forward", "right", SubResource("AnimationNodeStateMachineTransition_lfuuf"), "right", "forward", SubResource("AnimationNodeStateMachineTransition_dfvqa"), "right", "back", SubResource("AnimationNodeStateMachineTransition_dnvt3"), "back", "right", SubResource("AnimationNodeStateMachineTransition_m7aft"), "forward", "End", SubResource("AnimationNodeStateMachineTransition_26rpk"), "right", "End", SubResource("AnimationNodeStateMachineTransition_164gf"), "left", "End", SubResource("AnimationNodeStateMachineTransition_hsg0y"), "back", "End", SubResource("AnimationNodeStateMachineTransition_8dcca")]
|
||||
graph_offset = Vector2(0, 97.0247)
|
||||
graph_offset = Vector2(0, -99.1793)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[gd_resource type="AnimationNodeStateMachine" load_steps=18 format=3 uid="uid://co7lshemjrro8"]
|
||||
[gd_resource type="AnimationNodeStateMachine" load_steps=22 format=3 uid="uid://co7lshemjrro8"]
|
||||
|
||||
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_ivy74"]
|
||||
animation = &"idle_back"
|
||||
@@ -75,6 +75,18 @@ switch_mode = 1
|
||||
advance_mode = 2
|
||||
advance_expression = "_enemyDirection == 1"
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_7of2s"]
|
||||
break_loop_at_end = true
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_uwb20"]
|
||||
break_loop_at_end = true
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_vnd8n"]
|
||||
break_loop_at_end = true
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_v0yrd"]
|
||||
break_loop_at_end = true
|
||||
|
||||
[resource]
|
||||
states/End/position = Vector2(910, 100)
|
||||
states/back/node = SubResource("AnimationNodeAnimation_ivy74")
|
||||
@@ -85,4 +97,4 @@ states/left/node = SubResource("AnimationNodeAnimation_djeua")
|
||||
states/left/position = Vector2(378, 179)
|
||||
states/right/node = SubResource("AnimationNodeAnimation_8wbs7")
|
||||
states/right/position = Vector2(701, 179)
|
||||
transitions = ["Start", "forward", SubResource("AnimationNodeStateMachineTransition_ivy74"), "forward", "left", SubResource("AnimationNodeStateMachineTransition_x7uye"), "left", "forward", SubResource("AnimationNodeStateMachineTransition_djeua"), "forward", "back", SubResource("AnimationNodeStateMachineTransition_8wbs7"), "back", "forward", SubResource("AnimationNodeStateMachineTransition_mnr4r"), "left", "right", SubResource("AnimationNodeStateMachineTransition_l2wq1"), "right", "left", SubResource("AnimationNodeStateMachineTransition_jwlar"), "back", "left", SubResource("AnimationNodeStateMachineTransition_fdoul"), "left", "back", SubResource("AnimationNodeStateMachineTransition_kpotx"), "forward", "right", SubResource("AnimationNodeStateMachineTransition_lfuuf"), "right", "forward", SubResource("AnimationNodeStateMachineTransition_dfvqa"), "right", "back", SubResource("AnimationNodeStateMachineTransition_dnvt3"), "back", "right", SubResource("AnimationNodeStateMachineTransition_m7aft")]
|
||||
transitions = ["Start", "forward", SubResource("AnimationNodeStateMachineTransition_ivy74"), "forward", "left", SubResource("AnimationNodeStateMachineTransition_x7uye"), "left", "forward", SubResource("AnimationNodeStateMachineTransition_djeua"), "forward", "back", SubResource("AnimationNodeStateMachineTransition_8wbs7"), "back", "forward", SubResource("AnimationNodeStateMachineTransition_mnr4r"), "left", "right", SubResource("AnimationNodeStateMachineTransition_l2wq1"), "right", "left", SubResource("AnimationNodeStateMachineTransition_jwlar"), "back", "left", SubResource("AnimationNodeStateMachineTransition_fdoul"), "left", "back", SubResource("AnimationNodeStateMachineTransition_kpotx"), "forward", "right", SubResource("AnimationNodeStateMachineTransition_lfuuf"), "right", "forward", SubResource("AnimationNodeStateMachineTransition_dfvqa"), "right", "back", SubResource("AnimationNodeStateMachineTransition_dnvt3"), "back", "right", SubResource("AnimationNodeStateMachineTransition_m7aft"), "forward", "End", SubResource("AnimationNodeStateMachineTransition_7of2s"), "left", "End", SubResource("AnimationNodeStateMachineTransition_uwb20"), "right", "End", SubResource("AnimationNodeStateMachineTransition_vnd8n"), "back", "End", SubResource("AnimationNodeStateMachineTransition_v0yrd")]
|
||||
|
||||
@@ -76,24 +76,16 @@ advance_mode = 2
|
||||
advance_expression = "_enemyDirection == 1"
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_v537b"]
|
||||
break_loop_at_end = true
|
||||
reset = false
|
||||
switch_mode = 2
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_11ejb"]
|
||||
break_loop_at_end = true
|
||||
reset = false
|
||||
switch_mode = 2
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_ear7g"]
|
||||
break_loop_at_end = true
|
||||
reset = false
|
||||
switch_mode = 2
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_bxbbg"]
|
||||
break_loop_at_end = true
|
||||
reset = false
|
||||
switch_mode = 2
|
||||
|
||||
[resource]
|
||||
states/End/position = Vector2(910, 100)
|
||||
|
||||
58
Zennysoft.Game.Ma/src/enemy/behaviors/FleeBehavior.cs
Normal file
58
Zennysoft.Game.Ma/src/enemy/behaviors/FleeBehavior.cs
Normal file
@@ -0,0 +1,58 @@
|
||||
using Chickensoft.AutoInject;
|
||||
using Chickensoft.Introspection;
|
||||
using Godot;
|
||||
using System.Linq;
|
||||
using Zennysoft.Game.Abstractions.Entity;
|
||||
|
||||
namespace Zennysoft.Game.Ma;
|
||||
|
||||
[Meta(typeof(IAutoNode))]
|
||||
public partial class FleeBehavior : Node3D, IBehavior
|
||||
{
|
||||
public override void _Notification(int what) => this.Notify(what);
|
||||
|
||||
[Export] private double _fleeSpeed { get; set; } = 300f;
|
||||
|
||||
[Export] private double _thinkTime { get; set; } = 2f;
|
||||
|
||||
[Signal] public delegate void OnVelocityComputedEventHandler(Vector3 safeVelocity);
|
||||
|
||||
[Dependency] public IGame _game => this.DependOn<IGame>();
|
||||
[Dependency] public IMap _map => this.DependOn<IMap>();
|
||||
|
||||
private NavigationAgent3D _navigationAgent;
|
||||
|
||||
|
||||
public void Init(NavigationAgent3D navigationAgent)
|
||||
{
|
||||
_navigationAgent = navigationAgent;
|
||||
}
|
||||
|
||||
public void OnReady()
|
||||
{
|
||||
SetPhysicsProcess(false);
|
||||
}
|
||||
|
||||
public void StartFlee(NavigationAgent3D navigationAgent)
|
||||
{
|
||||
var currentRoom = _map.GetPlayersCurrentRoom();
|
||||
var rooms = _game.CurrentFloor.Rooms;
|
||||
var validRooms = new Godot.Collections.Array<MonsterRoom>(rooms.OfType<MonsterRoom>());
|
||||
var randomRoom = validRooms.PickRandom();
|
||||
_navigationAgent.TargetPosition = randomRoom.PlayerSpawn.GlobalPosition;
|
||||
SetPhysicsProcess(true);
|
||||
}
|
||||
|
||||
public void StopFlee()
|
||||
{
|
||||
SetPhysicsProcess(false);
|
||||
}
|
||||
|
||||
public void OnPhysicsProcess(double delta)
|
||||
{
|
||||
var nextVelocity = _navigationAgent.GetNextPathPosition();
|
||||
var parent = GetParent() as Node3D;
|
||||
var velocity = parent.GlobalPosition.DirectionTo(nextVelocity) * (float)_fleeSpeed * (float)delta;
|
||||
EmitSignal(SignalName.OnVelocityComputed, velocity);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
uid://drur3hx4p4du4
|
||||
7
Zennysoft.Game.Ma/src/enemy/behaviors/FleeBehavior.tscn
Normal file
7
Zennysoft.Game.Ma/src/enemy/behaviors/FleeBehavior.tscn
Normal file
@@ -0,0 +1,7 @@
|
||||
[gd_scene load_steps=2 format=3 uid="uid://g4cupevu280j"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://drur3hx4p4du4" path="res://src/enemy/behaviors/FleeBehavior.cs" id="1_cty3c"]
|
||||
|
||||
[node name="NavigationAgent" type="Node3D"]
|
||||
script = ExtResource("1_cty3c")
|
||||
_thinkTime = 0.8
|
||||
@@ -23,16 +23,17 @@ public partial class FollowBehavior : Node3D, IBehavior
|
||||
private NavigationAgent3D _navigationAgent;
|
||||
private Timer _thinkTimer;
|
||||
|
||||
public FollowBehavior()
|
||||
{
|
||||
_thinkTimer = new Timer() { WaitTime = _thinkTime };
|
||||
_thinkTimer.Timeout += OnTimeout;
|
||||
AddChild(_thinkTimer);
|
||||
}
|
||||
|
||||
public void Init(NavigationAgent3D navigationAgent)
|
||||
{
|
||||
_navigationAgent = navigationAgent;
|
||||
}
|
||||
|
||||
public void OnReady()
|
||||
{
|
||||
_thinkTimer = new Timer() { WaitTime = _thinkTime };
|
||||
_thinkTimer.Timeout += OnTimeout;
|
||||
AddChild(_thinkTimer);
|
||||
SetPhysicsProcess(false);
|
||||
}
|
||||
|
||||
@@ -63,6 +64,5 @@ public partial class FollowBehavior : Node3D, IBehavior
|
||||
{
|
||||
_thinkTimer.Stop();
|
||||
_thinkTimer.Timeout -= OnTimeout;
|
||||
_thinkTimer.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
10
Zennysoft.Game.Ma/src/enemy/behaviors/IHaveFleeBehavior.cs
Normal file
10
Zennysoft.Game.Ma/src/enemy/behaviors/IHaveFleeBehavior.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
using Godot;
|
||||
|
||||
namespace Zennysoft.Game.Ma;
|
||||
|
||||
public interface IHaveFleeBehavior
|
||||
{
|
||||
public FleeBehavior FleeBehavior { get; }
|
||||
|
||||
public NavigationAgent3D NavigationAgent { get; }
|
||||
}
|
||||
@@ -23,20 +23,25 @@ public partial class PatrolBehavior : Node3D, IBehavior
|
||||
private NavigationAgent3D _navigationAgent;
|
||||
|
||||
private int _recursiveCounter = 0;
|
||||
private Vector3 _homePosition;
|
||||
|
||||
public Vector3 HomePosition { get; set; }
|
||||
public Vector3 HomePosition
|
||||
{
|
||||
get => _homePosition;
|
||||
set
|
||||
{
|
||||
_homePosition = value;
|
||||
_navigationAgent.TargetPosition = value;
|
||||
}
|
||||
}
|
||||
|
||||
[Signal] public delegate void OnVelocityComputedEventHandler(Vector3 safeVelocity);
|
||||
|
||||
public PatrolBehavior()
|
||||
public void OnReady()
|
||||
{
|
||||
_patrolTimer = new Timer() { WaitTime = _patrolTime };
|
||||
_patrolTimer.Timeout += PatrolTimer_Timeout;
|
||||
AddChild(_patrolTimer);
|
||||
}
|
||||
|
||||
public void OnReady()
|
||||
{
|
||||
SetPhysicsProcess(false);
|
||||
}
|
||||
|
||||
@@ -44,10 +49,12 @@ public partial class PatrolBehavior : Node3D, IBehavior
|
||||
{
|
||||
_navigationAgent = navigationAgent;
|
||||
_navigationAgent.WaypointReached += NavigationAgent_WaypointReached;
|
||||
_navigationAgent.TargetPosition = HomePosition;
|
||||
}
|
||||
|
||||
private async void NavigationAgent_WaypointReached(Dictionary details) => await ToSignal(GetTree().CreateTimer(_thinkTime), "timeout");
|
||||
private async void NavigationAgent_WaypointReached(Dictionary details)
|
||||
{
|
||||
await ToSignal(GetTree().CreateTimer(_thinkTime), "timeout");
|
||||
}
|
||||
|
||||
public void StartPatrol()
|
||||
{
|
||||
|
||||
@@ -35,6 +35,8 @@ public partial class Sproingy : Enemy2D, IHavePatrolBehavior, IHaveEngagePlayerB
|
||||
_enemyLogic.Input(new EnemyLogic.Input.Patrol());
|
||||
}
|
||||
|
||||
public override void Move() => EnemyModelView.PlayIdleAnimation();
|
||||
|
||||
public override void _ExitTree()
|
||||
{
|
||||
PatrolBehavior.OnVelocityComputed -= OnVelocityComputed;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=91 format=3 uid="uid://bimjnsu52y3xi"]
|
||||
[gd_scene load_steps=81 format=3 uid="uid://bimjnsu52y3xi"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cvr1qimxpignl" path="res://src/enemy/EnemyModelView2D.cs" id="1_oh25a"]
|
||||
[ext_resource type="Texture2D" uid="uid://dd0ia6isdqg61" path="res://src/enemy/enemy_types/01. sproingy/animations/ATTACK/Layer 1.png" id="1_pbx41"]
|
||||
@@ -59,9 +59,7 @@
|
||||
[ext_resource type="Texture2D" uid="uid://b3gndmrlrvexy" path="res://src/enemy/enemy_types/01. sproingy/animations/IDLE_WALK_SIDE/Layer 13.png" id="53_nr2vc"]
|
||||
[ext_resource type="Texture2D" uid="uid://b1cmx8l4ia3fv" path="res://src/enemy/enemy_types/01. sproingy/animations/IDLE_WALK_SIDE/Layer 14.png" id="54_jdvn0"]
|
||||
[ext_resource type="Texture2D" uid="uid://c7t4626rox02s" path="res://src/enemy/enemy_types/01. sproingy/animations/IDLE_WALK_SIDE/Layer 15.png" id="55_2eqor"]
|
||||
[ext_resource type="AudioStream" uid="uid://dfa3i8ukq1kdl" path="res://src/audio/sfx/ENEMY_sproing_attack.ogg" id="60_mnr4r"]
|
||||
[ext_resource type="AnimationNodeStateMachine" uid="uid://cbq8xog50cjjy" path="res://src/enemy/animation_state_machines/PrimaryAttackStateMachine.tres" id="60_x7uye"]
|
||||
[ext_resource type="AnimationNodeStateMachine" uid="uid://cy2ngl55c0rws" path="res://src/enemy/animation_state_machines/WalkingStateMachine.tres" id="61_djeua"]
|
||||
[ext_resource type="AnimationNodeStateMachine" uid="uid://co7lshemjrro8" path="res://src/enemy/animation_state_machines/IdleStateMachine.tres" id="62_8wbs7"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_ivy74"]
|
||||
@@ -341,36 +339,6 @@ tracks/1/keys = {
|
||||
"values": [0, 14]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_1tda5"]
|
||||
resource_name = "idle_back_walk"
|
||||
length = 1.16667
|
||||
loop_mode = 1
|
||||
step = 0.0833333
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("Sprite3D/SubViewportContainer/SubViewport/AnimatedSprite:animation")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [&"idle_back_walk"]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("Sprite3D/SubViewportContainer/SubViewport/AnimatedSprite:frame")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0, 1.16667),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [0, 14]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_53wuj"]
|
||||
resource_name = "idle_front"
|
||||
length = 1.16667
|
||||
@@ -401,36 +369,6 @@ tracks/1/keys = {
|
||||
"values": [0, 14]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_31nry"]
|
||||
resource_name = "idle_front_walk"
|
||||
length = 1.16667
|
||||
loop_mode = 1
|
||||
step = 0.0833333
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("Sprite3D/SubViewportContainer/SubViewport/AnimatedSprite:animation")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [&"idle_front_walk"]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("Sprite3D/SubViewportContainer/SubViewport/AnimatedSprite:frame")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0, 1.16667),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [0, 14]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_fpvxl"]
|
||||
resource_name = "idle_left"
|
||||
length = 1.16667
|
||||
@@ -473,48 +411,6 @@ tracks/2/keys = {
|
||||
"values": [false]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_1870e"]
|
||||
resource_name = "idle_left_walk"
|
||||
length = 1.16667
|
||||
loop_mode = 1
|
||||
step = 0.0833333
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("Sprite3D/SubViewportContainer/SubViewport/AnimatedSprite:frame")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 1.16667),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [0, 14]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("Sprite3D/SubViewportContainer/SubViewport/AnimatedSprite:animation")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [&"idle_left_walk"]
|
||||
}
|
||||
tracks/2/type = "value"
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/path = NodePath("Sprite3D/SubViewportContainer/SubViewport/AnimatedSprite:flip_h")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [false]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_ni60h"]
|
||||
resource_name = "idle_right"
|
||||
length = 1.16667
|
||||
@@ -557,48 +453,6 @@ tracks/2/keys = {
|
||||
"values": [&"idle_left_walk"]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_7hf3j"]
|
||||
resource_name = "idle_right_walk"
|
||||
length = 1.16667
|
||||
loop_mode = 1
|
||||
step = 0.0833333
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("Sprite3D/SubViewportContainer/SubViewport/AnimatedSprite:frame")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 1.16667),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [0, 14]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("Sprite3D/SubViewportContainer/SubViewport/AnimatedSprite:flip_h")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [true]
|
||||
}
|
||||
tracks/2/type = "value"
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/path = NodePath("Sprite3D/SubViewportContainer/SubViewport/AnimatedSprite:animation")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [&"idle_left_walk"]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_ruc6s"]
|
||||
resource_name = "attack"
|
||||
length = 0.750008
|
||||
@@ -639,21 +493,6 @@ tracks/2/keys = {
|
||||
"update": 1,
|
||||
"values": [true, false, true]
|
||||
}
|
||||
tracks/3/type = "audio"
|
||||
tracks/3/imported = false
|
||||
tracks/3/enabled = true
|
||||
tracks/3/path = NodePath("Atk")
|
||||
tracks/3/interp = 1
|
||||
tracks/3/loop_wrap = true
|
||||
tracks/3/keys = {
|
||||
"clips": [{
|
||||
"end_offset": 0.0,
|
||||
"start_offset": 0.0,
|
||||
"stream": ExtResource("60_mnr4r")
|
||||
}],
|
||||
"times": PackedFloat32Array(0.0833333)
|
||||
}
|
||||
tracks/3/use_blend = true
|
||||
|
||||
[sub_resource type="Animation" id="Animation_djeua"]
|
||||
resource_name = "primary_attack_back"
|
||||
@@ -695,21 +534,6 @@ tracks/2/keys = {
|
||||
"update": 1,
|
||||
"values": [&"attack"]
|
||||
}
|
||||
tracks/3/type = "audio"
|
||||
tracks/3/imported = false
|
||||
tracks/3/enabled = true
|
||||
tracks/3/path = NodePath("Atk")
|
||||
tracks/3/interp = 1
|
||||
tracks/3/loop_wrap = true
|
||||
tracks/3/keys = {
|
||||
"clips": [{
|
||||
"end_offset": 0.0,
|
||||
"start_offset": 0.0,
|
||||
"stream": ExtResource("60_mnr4r")
|
||||
}],
|
||||
"times": PackedFloat32Array(0.0833333)
|
||||
}
|
||||
tracks/3/use_blend = true
|
||||
|
||||
[sub_resource type="Animation" id="Animation_ivy74"]
|
||||
resource_name = "primary_attack_left"
|
||||
@@ -751,21 +575,6 @@ tracks/2/keys = {
|
||||
"update": 1,
|
||||
"values": [&"attack"]
|
||||
}
|
||||
tracks/3/type = "audio"
|
||||
tracks/3/imported = false
|
||||
tracks/3/enabled = true
|
||||
tracks/3/path = NodePath("Atk")
|
||||
tracks/3/interp = 1
|
||||
tracks/3/loop_wrap = true
|
||||
tracks/3/keys = {
|
||||
"clips": [{
|
||||
"end_offset": 0.0,
|
||||
"start_offset": 0.0,
|
||||
"stream": ExtResource("60_mnr4r")
|
||||
}],
|
||||
"times": PackedFloat32Array(0.0833333)
|
||||
}
|
||||
tracks/3/use_blend = true
|
||||
|
||||
[sub_resource type="Animation" id="Animation_x7uye"]
|
||||
resource_name = "primary_attack_right"
|
||||
@@ -819,33 +628,14 @@ tracks/3/keys = {
|
||||
"update": 1,
|
||||
"values": [&"attack"]
|
||||
}
|
||||
tracks/4/type = "audio"
|
||||
tracks/4/imported = false
|
||||
tracks/4/enabled = true
|
||||
tracks/4/path = NodePath("Atk")
|
||||
tracks/4/interp = 1
|
||||
tracks/4/loop_wrap = true
|
||||
tracks/4/keys = {
|
||||
"clips": [{
|
||||
"end_offset": 0.0,
|
||||
"start_offset": 0.0,
|
||||
"stream": ExtResource("60_mnr4r")
|
||||
}],
|
||||
"times": PackedFloat32Array(0.0833333)
|
||||
}
|
||||
tracks/4/use_blend = true
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_6tj5r"]
|
||||
_data = {
|
||||
&"RESET": SubResource("Animation_ch8ic"),
|
||||
&"idle_back": SubResource("Animation_d5bmw"),
|
||||
&"idle_back_walk": SubResource("Animation_1tda5"),
|
||||
&"idle_front": SubResource("Animation_53wuj"),
|
||||
&"idle_front_walk": SubResource("Animation_31nry"),
|
||||
&"idle_left": SubResource("Animation_fpvxl"),
|
||||
&"idle_left_walk": SubResource("Animation_1870e"),
|
||||
&"idle_right": SubResource("Animation_ni60h"),
|
||||
&"idle_right_walk": SubResource("Animation_7hf3j"),
|
||||
&"primary_attack": SubResource("Animation_ruc6s"),
|
||||
&"primary_attack_back": SubResource("Animation_djeua"),
|
||||
&"primary_attack_left": SubResource("Animation_ivy74"),
|
||||
@@ -858,31 +648,16 @@ advance_mode = 2
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_8wbs7"]
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_mnr4r"]
|
||||
reset = false
|
||||
switch_mode = 2
|
||||
advance_mode = 2
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_l2wq1"]
|
||||
reset = false
|
||||
switch_mode = 1
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_jwlar"]
|
||||
reset = false
|
||||
switch_mode = 1
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_fdoul"]
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_kpotx"]
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachine" id="AnimationNodeStateMachine_l2wq1"]
|
||||
states/Idle/node = ExtResource("61_djeua")
|
||||
states/Idle/node = ExtResource("62_8wbs7")
|
||||
states/Idle/position = Vector2(453, 100)
|
||||
"states/Primary Attack/node" = ExtResource("60_x7uye")
|
||||
"states/Primary Attack/position" = Vector2(453, 237)
|
||||
states/Start/position = Vector2(201, 100)
|
||||
states/Walking/node = ExtResource("62_8wbs7")
|
||||
states/Walking/position = Vector2(703, 100)
|
||||
transitions = ["Start", "Idle", SubResource("AnimationNodeStateMachineTransition_djeua"), "Idle", "Primary Attack", SubResource("AnimationNodeStateMachineTransition_8wbs7"), "Primary Attack", "Idle", SubResource("AnimationNodeStateMachineTransition_mnr4r"), "Idle", "Walking", SubResource("AnimationNodeStateMachineTransition_l2wq1"), "Walking", "Idle", SubResource("AnimationNodeStateMachineTransition_jwlar"), "Walking", "Primary Attack", SubResource("AnimationNodeStateMachineTransition_fdoul"), "Primary Attack", "Walking", SubResource("AnimationNodeStateMachineTransition_kpotx")]
|
||||
transitions = ["Start", "Idle", SubResource("AnimationNodeStateMachineTransition_djeua"), "Idle", "Primary Attack", SubResource("AnimationNodeStateMachineTransition_8wbs7"), "Primary Attack", "Idle", SubResource("AnimationNodeStateMachineTransition_mnr4r")]
|
||||
|
||||
[node name="EnemyModelView" type="Node3D"]
|
||||
script = ExtResource("1_oh25a")
|
||||
@@ -943,7 +718,3 @@ root_node = NodePath("%AnimationTree/..")
|
||||
tree_root = SubResource("AnimationNodeStateMachine_l2wq1")
|
||||
advance_expression_base_node = NodePath("..")
|
||||
anim_player = NodePath("../AnimationPlayer")
|
||||
|
||||
[node name="Atk" type="AudioStreamPlayer3D" parent="."]
|
||||
process_mode = 3
|
||||
bus = &"SFX"
|
||||
|
||||
@@ -34,4 +34,7 @@ public partial class Michael : Enemy2D, IHavePatrolBehavior, IHaveEngagePlayerBe
|
||||
{
|
||||
_enemyLogic.Input(new EnemyLogic.Input.Patrol());
|
||||
}
|
||||
|
||||
|
||||
public override void Move() => EnemyModelView.PlayIdleAnimation();
|
||||
}
|
||||
@@ -14,6 +14,7 @@ radius = 1.0
|
||||
height = 2.66932
|
||||
|
||||
[sub_resource type="CylinderShape3D" id="CylinderShape3D_eek1b"]
|
||||
radius = 1.0
|
||||
|
||||
[sub_resource type="SphereShape3D" id="SphereShape3D_wrps7"]
|
||||
radius = 1.0
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=145 format=3 uid="uid://bjg8wyvp8q6oc"]
|
||||
[gd_scene load_steps=141 format=3 uid="uid://bjg8wyvp8q6oc"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cvr1qimxpignl" path="res://src/enemy/EnemyModelView2D.cs" id="1_o4cc2"]
|
||||
[ext_resource type="Script" uid="uid://dlsgyx4i1jmp3" path="res://src/enemy/EnemyLoreInfo.cs" id="2_3eot4"]
|
||||
@@ -71,7 +71,6 @@
|
||||
[ext_resource type="Texture2D" uid="uid://vxphbifafq0q" path="res://src/enemy/enemy_types/02. michael/animations/IDLE_WALK/LEFT SIDE/Michael_IdleWalk_Left (21).png" id="68_msiau"]
|
||||
[ext_resource type="Texture2D" uid="uid://7r30bjydumon" path="res://src/enemy/enemy_types/02. michael/animations/IDLE_WALK/LEFT SIDE/Michael_IdleWalk_Left (22).png" id="69_lec8c"]
|
||||
[ext_resource type="Texture2D" uid="uid://djspx2smexhme" path="res://src/enemy/enemy_types/02. michael/animations/IDLE_WALK/LEFT SIDE/Michael_IdleWalk_Left (23).png" id="70_f0jo7"]
|
||||
[ext_resource type="AudioStream" uid="uid://w6l4yoo1kcmq" path="res://src/audio/sfx/ENEMY_MICHAEL_ATTACK1.ogg" id="72_fxhv6"]
|
||||
[ext_resource type="PackedScene" uid="uid://dpoonda2dwwic" path="res://src/enemy/BasicEnemyAnimationTree.tscn" id="73_gby04"]
|
||||
[ext_resource type="AnimationNodeStateMachine" uid="uid://cbq8xog50cjjy" path="res://src/enemy/animation_state_machines/PrimaryAttackStateMachine.tres" id="74_fxhv6"]
|
||||
[ext_resource type="Texture2D" uid="uid://duygq1qfer5oa" path="res://src/vfx/Enemy/michael_attack.png" id="74_mip6u"]
|
||||
@@ -573,21 +572,6 @@ tracks/3/keys = {
|
||||
"clips": PackedStringArray("Attack VFX"),
|
||||
"times": PackedFloat32Array(0)
|
||||
}
|
||||
tracks/4/type = "audio"
|
||||
tracks/4/imported = false
|
||||
tracks/4/enabled = true
|
||||
tracks/4/path = NodePath("AudioStreamPlayer3D")
|
||||
tracks/4/interp = 1
|
||||
tracks/4/loop_wrap = true
|
||||
tracks/4/keys = {
|
||||
"clips": [{
|
||||
"end_offset": 0.0,
|
||||
"start_offset": 0.0,
|
||||
"stream": ExtResource("72_fxhv6")
|
||||
}],
|
||||
"times": PackedFloat32Array(0.15)
|
||||
}
|
||||
tracks/4/use_blend = true
|
||||
|
||||
[sub_resource type="Animation" id="Animation_bk4gf"]
|
||||
resource_name = "primary_attack_back"
|
||||
@@ -653,21 +637,6 @@ tracks/4/keys = {
|
||||
"update": 0,
|
||||
"values": [0, 41]
|
||||
}
|
||||
tracks/5/type = "audio"
|
||||
tracks/5/imported = false
|
||||
tracks/5/enabled = true
|
||||
tracks/5/path = NodePath("AudioStreamPlayer3D")
|
||||
tracks/5/interp = 1
|
||||
tracks/5/loop_wrap = true
|
||||
tracks/5/keys = {
|
||||
"clips": [{
|
||||
"end_offset": 0.0,
|
||||
"start_offset": 0.0,
|
||||
"stream": ExtResource("72_fxhv6")
|
||||
}],
|
||||
"times": PackedFloat32Array(0.15)
|
||||
}
|
||||
tracks/5/use_blend = true
|
||||
|
||||
[sub_resource type="Animation" id="Animation_gby04"]
|
||||
resource_name = "primary_attack_left"
|
||||
@@ -733,21 +702,6 @@ tracks/4/keys = {
|
||||
"update": 0,
|
||||
"values": [0, 41]
|
||||
}
|
||||
tracks/5/type = "audio"
|
||||
tracks/5/imported = false
|
||||
tracks/5/enabled = true
|
||||
tracks/5/path = NodePath("AudioStreamPlayer3D")
|
||||
tracks/5/interp = 1
|
||||
tracks/5/loop_wrap = true
|
||||
tracks/5/keys = {
|
||||
"clips": [{
|
||||
"end_offset": 0.0,
|
||||
"start_offset": 0.0,
|
||||
"stream": ExtResource("72_fxhv6")
|
||||
}],
|
||||
"times": PackedFloat32Array(0.15)
|
||||
}
|
||||
tracks/5/use_blend = true
|
||||
|
||||
[sub_resource type="Animation" id="Animation_mip6u"]
|
||||
resource_name = "primary_attack_right"
|
||||
@@ -825,21 +779,6 @@ tracks/5/keys = {
|
||||
"update": 1,
|
||||
"values": [true]
|
||||
}
|
||||
tracks/6/type = "audio"
|
||||
tracks/6/imported = false
|
||||
tracks/6/enabled = true
|
||||
tracks/6/path = NodePath("AudioStreamPlayer3D")
|
||||
tracks/6/interp = 1
|
||||
tracks/6/loop_wrap = true
|
||||
tracks/6/keys = {
|
||||
"clips": [{
|
||||
"end_offset": 0.0,
|
||||
"start_offset": 0.0,
|
||||
"stream": ExtResource("72_fxhv6")
|
||||
}],
|
||||
"times": PackedFloat32Array(0.15)
|
||||
}
|
||||
tracks/6/use_blend = true
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_346xs"]
|
||||
_data = {
|
||||
@@ -864,24 +803,12 @@ reset = false
|
||||
switch_mode = 2
|
||||
advance_mode = 2
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_fxhv6"]
|
||||
reset = false
|
||||
switch_mode = 1
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_pxi1p"]
|
||||
reset = false
|
||||
switch_mode = 1
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_gejfr"]
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachine" id="AnimationNodeStateMachine_gejfr"]
|
||||
states/Idle/node = ExtResource("74_pxi1p")
|
||||
states/Idle/position = Vector2(417, 93)
|
||||
states/Idle/position = Vector2(428, 91)
|
||||
"states/Primary Attack/node" = ExtResource("74_fxhv6")
|
||||
"states/Primary Attack/position" = Vector2(428, 248)
|
||||
states/Walking/node = ExtResource("74_pxi1p")
|
||||
states/Walking/position = Vector2(611, 93)
|
||||
transitions = ["Start", "Idle", SubResource("AnimationNodeStateMachineTransition_d8ow6"), "Idle", "Primary Attack", SubResource("AnimationNodeStateMachineTransition_ck0ak"), "Primary Attack", "Idle", SubResource("AnimationNodeStateMachineTransition_y4gx8"), "Idle", "Walking", SubResource("AnimationNodeStateMachineTransition_fxhv6"), "Walking", "Idle", SubResource("AnimationNodeStateMachineTransition_pxi1p"), "Walking", "Primary Attack", SubResource("AnimationNodeStateMachineTransition_gejfr")]
|
||||
transitions = ["Start", "Idle", SubResource("AnimationNodeStateMachineTransition_d8ow6"), "Idle", "Primary Attack", SubResource("AnimationNodeStateMachineTransition_ck0ak"), "Primary Attack", "Idle", SubResource("AnimationNodeStateMachineTransition_y4gx8")]
|
||||
|
||||
[sub_resource type="Animation" id="Animation_fxhv6"]
|
||||
resource_name = "Attack VFX"
|
||||
@@ -1314,7 +1241,3 @@ transform = Transform3D(0.72, 0, 0, 0, 0.72, 0, 0, 0, 0.72, -0.129818, 0.274447,
|
||||
modulate = Color(0.977, 0.31, 1, 0.741176)
|
||||
billboard = 2
|
||||
sprite_frames = SubResource("SpriteFrames_suy1t")
|
||||
|
||||
[node name="AudioStreamPlayer3D" type="AudioStreamPlayer3D" parent="."]
|
||||
process_mode = 3
|
||||
bus = &"SFX"
|
||||
|
||||
@@ -40,6 +40,8 @@ public partial class Sara : Enemy2D, IHavePatrolBehavior, IHaveEngagePlayerBehav
|
||||
_enemyLogic.Input(new EnemyLogic.Input.Patrol());
|
||||
}
|
||||
|
||||
public override void Move() => EnemyModelView.PlayIdleAnimation();
|
||||
|
||||
public override void PerformAction()
|
||||
{
|
||||
var rng = new RandomNumberGenerator();
|
||||
|
||||
@@ -18,6 +18,7 @@ height = 5.0
|
||||
radius = 1.0
|
||||
|
||||
[sub_resource type="CylinderShape3D" id="CylinderShape3D_746fv"]
|
||||
radius = 1.25
|
||||
|
||||
[node name="Sara" type="CharacterBody3D"]
|
||||
process_mode = 1
|
||||
|
||||
@@ -1828,7 +1828,7 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.31442, 0)
|
||||
script = ExtResource("1_oh25a")
|
||||
|
||||
[node name="Sprite3D" type="Sprite3D" parent="."]
|
||||
transform = Transform3D(1.5, 0, 0, 0, 1.5, 0, 0, 0, 1.5, 0, 0, 0)
|
||||
transform = Transform3D(1.5, 0, 0, 0, 1.5, 0, 0, 0, 1.5, 0, -1.31336, 0)
|
||||
pixel_size = 0.005
|
||||
billboard = 1
|
||||
shaded = true
|
||||
|
||||
@@ -18,6 +18,7 @@ radius = 1.0
|
||||
radius = 1.20703
|
||||
|
||||
[sub_resource type="CylinderShape3D" id="CylinderShape3D_jhnwb"]
|
||||
radius = 1.75
|
||||
|
||||
[node name="Ballos" type="CharacterBody3D"]
|
||||
process_mode = 1
|
||||
@@ -70,10 +71,13 @@ shape = SubResource("CylinderShape3D_jhnwb")
|
||||
|
||||
[node name="PatrolBehavior" parent="Components" instance=ExtResource("4_bjnvx")]
|
||||
unique_name_in_owner = true
|
||||
_patrolSpeed = 200.0
|
||||
_thinkTime = 2.0
|
||||
_patrolTime = 30.0
|
||||
|
||||
[node name="FollowBehavior" parent="Components" instance=ExtResource("5_55sdf")]
|
||||
unique_name_in_owner = true
|
||||
_followSpeed = 150.0
|
||||
_followSpeed = 225.0
|
||||
|
||||
[node name="EngagePlayerBehavior" parent="Components" instance=ExtResource("6_2xj0s")]
|
||||
unique_name_in_owner = true
|
||||
|
||||
@@ -1469,7 +1469,7 @@ _data = {
|
||||
script = ExtResource("1_ueqp5")
|
||||
|
||||
[node name="Sprite3D" type="Sprite3D" parent="."]
|
||||
transform = Transform3D(1.5, 0, 0, 0, 1.5, 0, 0, 0, 1.5, 0, 1.24865, 0)
|
||||
transform = Transform3D(1.5, 0, 0, 0, 1.5, 0, 0, 0, 1.5, 0, 0.0275542, 0)
|
||||
billboard = 2
|
||||
alpha_cut = 1
|
||||
texture_filter = 0
|
||||
|
||||
@@ -4,6 +4,7 @@ using Godot;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Zennysoft.Game.Ma;
|
||||
using Zennysoft.Ma.Adapter;
|
||||
|
||||
[Meta(typeof(IAutoNode))]
|
||||
public partial class Chariot : Enemy2D, IHavePatrolBehavior, IHaveEngagePlayerBehavior, IHaveFollowBehavior
|
||||
@@ -26,16 +27,42 @@ public partial class Chariot : Enemy2D, IHavePatrolBehavior, IHaveEngagePlayerBe
|
||||
FollowBehavior.Init(NavigationAgent);
|
||||
PatrolBehavior.Init(NavigationAgent);
|
||||
PatrolBehavior.HomePosition = GlobalPosition;
|
||||
PatrolBehavior.OnVelocityComputed += OnVelocityComputed;
|
||||
FollowBehavior.OnVelocityComputed += OnVelocityComputed;
|
||||
PatrolBehavior.OnVelocityComputed += OnChariotVelocityComputed;
|
||||
FollowBehavior.OnVelocityComputed += OnChariotVelocityComputed;
|
||||
EngagePlayerBehavior.TakeAction += EngagePlayerBehavior_TakeAction;
|
||||
EngagePlayerBehavior.AcquireTarget += EngagePlayerBehavior_AcquireTarget;
|
||||
_enemyLogic.Input(new EnemyLogic.Input.Patrol());
|
||||
PlayerDetector.BodyEntered += PlayerDetector_BodyEntered;
|
||||
PlayerDetector.BodyExited += PlayerDetector_BodyExited;
|
||||
PlayerDetector.BodyEntered += Chariot_PlayerDetected;
|
||||
PlayerDetector.BodyExited += Chariot_PlayerExitArea;
|
||||
SetPhysicsProcess(true);
|
||||
}
|
||||
|
||||
private void Chariot_PlayerExitArea(Node3D body)
|
||||
{
|
||||
EngagePlayerBehavior.Disengage();
|
||||
}
|
||||
|
||||
private void Chariot_PlayerDetected(Node3D body)
|
||||
{
|
||||
if (body is not IPlayer)
|
||||
return;
|
||||
|
||||
if (!_activated)
|
||||
_enemyLogic.Input(new EnemyLogic.Input.Activate());
|
||||
EngagePlayerBehavior.Engage();
|
||||
}
|
||||
|
||||
public override void Idle()
|
||||
{
|
||||
if (!_activated)
|
||||
base.Idle();
|
||||
}
|
||||
|
||||
public override void Move()
|
||||
{
|
||||
if (!_activated)
|
||||
base.Move();
|
||||
}
|
||||
|
||||
public void OnResolved()
|
||||
{
|
||||
_enemyLogic.Input(new EnemyLogic.Input.Patrol());
|
||||
@@ -43,7 +70,18 @@ public partial class Chariot : Enemy2D, IHavePatrolBehavior, IHaveEngagePlayerBe
|
||||
|
||||
public override void Activate()
|
||||
{
|
||||
EnemyModelView.PlayActivateAnimation();
|
||||
if (!_activated)
|
||||
{
|
||||
((EnemyModelView)EnemyModelView).CanMove = false;
|
||||
Velocity = Vector3.Zero;
|
||||
EnemyModelView.PlayActivateAnimation();
|
||||
}
|
||||
}
|
||||
|
||||
public override void _Process(double delta)
|
||||
{
|
||||
if (!_activated)
|
||||
base._Process(delta);
|
||||
}
|
||||
|
||||
public override void PerformAction()
|
||||
@@ -53,4 +91,12 @@ public partial class Chariot : Enemy2D, IHavePatrolBehavior, IHaveEngagePlayerBe
|
||||
var selection = rng.RandWeighted([PrimaryAttackChance, SecondaryAttackChance]);
|
||||
options[(int)selection].Invoke();
|
||||
}
|
||||
|
||||
public void OnChariotVelocityComputed(Vector3 safeVelocity)
|
||||
{
|
||||
Velocity = safeVelocity;
|
||||
LookAtTarget(safeVelocity);
|
||||
if (((EnemyModelView)EnemyModelView).CanMove)
|
||||
MoveAndSlide();
|
||||
}
|
||||
}
|
||||
@@ -17,6 +17,7 @@ radius = 1.0
|
||||
radius = 1.20703
|
||||
|
||||
[sub_resource type="CylinderShape3D" id="CylinderShape3D_582pa"]
|
||||
radius = 2.0
|
||||
|
||||
[node name="Chariot" type="CharacterBody3D"]
|
||||
process_mode = 1
|
||||
@@ -44,6 +45,7 @@ shape = SubResource("CylinderShape3D_jbgmx")
|
||||
[node name="Raycast" type="RayCast3D" parent="LineOfSight"]
|
||||
unique_name_in_owner = true
|
||||
transform = Transform3D(-1, 0, 8.74228e-08, 0, 1, 0, -8.74228e-08, 0, -1, 0, 0, 0)
|
||||
target_position = Vector3(0, 0, 3)
|
||||
|
||||
[node name="Collision" type="Area3D" parent="."]
|
||||
collision_layer = 2048
|
||||
@@ -59,7 +61,7 @@ transform = Transform3D(0.999848, 0, 0.0174524, 0, 1, 0, -0.0174524, 0, 0.999848
|
||||
[node name="PlayerDetector" type="Area3D" parent="."]
|
||||
unique_name_in_owner = true
|
||||
collision_layer = 0
|
||||
collision_mask = 34
|
||||
collision_mask = 2
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="PlayerDetector"]
|
||||
shape = SubResource("CylinderShape3D_582pa")
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
using Chickensoft.AutoInject;
|
||||
using Chickensoft.Introspection;
|
||||
using Godot;
|
||||
|
||||
namespace Zennysoft.Game.Ma;
|
||||
|
||||
[Meta(typeof(IAutoNode))]
|
||||
public partial class ChariotModelView : EnemyModelView2D, IEnemyModelView
|
||||
{
|
||||
public override void _Notification(int what) => this.Notify(what);
|
||||
|
||||
[Node] AnimationTree ScrollAnimationTree { get; set; } = default!;
|
||||
|
||||
|
||||
public override void PlayActivateAnimation()
|
||||
{
|
||||
_stateMachine.Travel(_activateName);
|
||||
var scrollStateMachine = (AnimationNodeStateMachinePlayback)ScrollAnimationTree.Get(_parametersPlayback);
|
||||
scrollStateMachine.Travel(_activateName);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
[gd_scene load_steps=1187 format=3 uid="uid://dcm53j3rncxdm"]
|
||||
[gd_scene load_steps=1176 format=3 uid="uid://dcm53j3rncxdm"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cvr1qimxpignl" path="res://src/enemy/EnemyModelView2D.cs" id="1_ol7va"]
|
||||
[ext_resource type="Script" uid="uid://dlsgyx4i1jmp3" path="res://src/enemy/EnemyLoreInfo.cs" id="2_6vf6u"]
|
||||
[ext_resource type="Script" uid="uid://ckxqmb4tu4rml" path="res://src/enemy/enemy_types/06. chariot/ChariotModelView.cs" id="1_behrq"]
|
||||
[ext_resource type="Texture2D" uid="uid://2gwychj1wbtx" path="res://src/enemy/enemy_types/06. chariot/animations/APPEAR/F/0051.png" id="2_1844k"]
|
||||
[ext_resource type="Texture2D" uid="uid://de60a8tqgkidj" path="res://src/enemy/enemy_types/06. chariot/animations/APPEAR/F/0053.png" id="3_486y6"]
|
||||
[ext_resource type="Texture2D" uid="uid://bvaas0ts6f76v" path="res://src/enemy/enemy_types/06. chariot/animations/APPEAR/F/0055.png" id="4_mtow4"]
|
||||
@@ -979,12 +978,6 @@
|
||||
[ext_resource type="AnimationNodeStateMachine" uid="uid://clybvwx3itfeo" path="res://src/enemy/animation_state_machines/SecondaryAttackStateMachine.tres" id="975_mud4o"]
|
||||
[ext_resource type="AnimationNodeStateMachine" uid="uid://cy2ngl55c0rws" path="res://src/enemy/animation_state_machines/WalkingStateMachine.tres" id="976_vxyya"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_500at"]
|
||||
script = ExtResource("2_6vf6u")
|
||||
Name = "Chariot"
|
||||
Description = "Ah....."
|
||||
metadata/_custom_type_script = "uid://dlsgyx4i1jmp3"
|
||||
|
||||
[sub_resource type="ViewportTexture" id="ViewportTexture_vr4bf"]
|
||||
viewport_path = NodePath("Sprite3D/SubViewportContainer/SubViewport")
|
||||
|
||||
@@ -4291,16 +4284,6 @@ tracks/5/keys = {
|
||||
"update": 1,
|
||||
"values": [true]
|
||||
}
|
||||
tracks/6/type = "animation"
|
||||
tracks/6/imported = false
|
||||
tracks/6/enabled = true
|
||||
tracks/6/path = NodePath("ScrollAnimation")
|
||||
tracks/6/interp = 1
|
||||
tracks/6/loop_wrap = true
|
||||
tracks/6/keys = {
|
||||
"clips": PackedStringArray("appear_front"),
|
||||
"times": PackedFloat32Array(0)
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_yv26r"]
|
||||
resource_name = "activate_back"
|
||||
@@ -4652,6 +4635,16 @@ tracks/5/keys = {
|
||||
"update": 1,
|
||||
"values": [true]
|
||||
}
|
||||
tracks/6/type = "animation"
|
||||
tracks/6/imported = false
|
||||
tracks/6/enabled = true
|
||||
tracks/6/path = NodePath("ScrollAnimation")
|
||||
tracks/6/interp = 1
|
||||
tracks/6/loop_wrap = true
|
||||
tracks/6/keys = {
|
||||
"clips": PackedStringArray("back"),
|
||||
"times": PackedFloat32Array(0)
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_gjy1o"]
|
||||
resource_name = "activated_idle_front"
|
||||
@@ -4730,6 +4723,16 @@ tracks/5/keys = {
|
||||
"update": 1,
|
||||
"values": [true]
|
||||
}
|
||||
tracks/6/type = "animation"
|
||||
tracks/6/imported = false
|
||||
tracks/6/enabled = true
|
||||
tracks/6/path = NodePath("ScrollAnimation")
|
||||
tracks/6/interp = 1
|
||||
tracks/6/loop_wrap = true
|
||||
tracks/6/keys = {
|
||||
"clips": PackedStringArray("front"),
|
||||
"times": PackedFloat32Array(0)
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_4ruht"]
|
||||
resource_name = "activated_idle_left"
|
||||
@@ -4820,6 +4823,16 @@ tracks/6/keys = {
|
||||
"update": 1,
|
||||
"values": [1]
|
||||
}
|
||||
tracks/7/type = "animation"
|
||||
tracks/7/imported = false
|
||||
tracks/7/enabled = true
|
||||
tracks/7/path = NodePath("ScrollAnimation")
|
||||
tracks/7/interp = 1
|
||||
tracks/7/loop_wrap = true
|
||||
tracks/7/keys = {
|
||||
"clips": PackedStringArray("left"),
|
||||
"times": PackedFloat32Array(0)
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_sg6db"]
|
||||
resource_name = "activated_idle_right"
|
||||
@@ -4898,6 +4911,16 @@ tracks/5/keys = {
|
||||
"update": 1,
|
||||
"values": [true]
|
||||
}
|
||||
tracks/6/type = "animation"
|
||||
tracks/6/imported = false
|
||||
tracks/6/enabled = true
|
||||
tracks/6/path = NodePath("ScrollAnimation")
|
||||
tracks/6/interp = 1
|
||||
tracks/6/loop_wrap = true
|
||||
tracks/6/keys = {
|
||||
"clips": PackedStringArray("right"),
|
||||
"times": PackedFloat32Array(0)
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_3q7ob"]
|
||||
resource_name = "idle_back"
|
||||
@@ -6253,7 +6276,7 @@ tracks/2/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [-10]
|
||||
"values": [0]
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_bhhf1"]
|
||||
@@ -6269,222 +6292,216 @@ _data = {
|
||||
&"right": SubResource("Animation_86buh")
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_vx836"]
|
||||
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_p70s4"]
|
||||
animation = &"appear_back"
|
||||
|
||||
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_61mt4"]
|
||||
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_jrkfh"]
|
||||
animation = &"appear_front"
|
||||
|
||||
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_mle3q"]
|
||||
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_mud4o"]
|
||||
animation = &"appear_left"
|
||||
|
||||
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_ov0ka"]
|
||||
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_vxyya"]
|
||||
animation = &"appear_right"
|
||||
|
||||
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_rqgr1"]
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_katqq"]
|
||||
advance_mode = 2
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_50tti"]
|
||||
reset = false
|
||||
switch_mode = 1
|
||||
advance_mode = 2
|
||||
advance_expression = "_enemyDirection == 0"
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_3uias"]
|
||||
reset = false
|
||||
switch_mode = 1
|
||||
advance_mode = 2
|
||||
advance_expression = "_enemyDirection == 2"
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_e82ix"]
|
||||
switch_mode = 1
|
||||
advance_mode = 2
|
||||
advance_expression = "_enemyDirection == 0"
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_fxpqr"]
|
||||
reset = false
|
||||
switch_mode = 1
|
||||
advance_mode = 2
|
||||
advance_expression = "_enemyDirection == 1"
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_t50im"]
|
||||
switch_mode = 1
|
||||
advance_mode = 2
|
||||
advance_expression = "_enemyDirection == 1"
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_pf5g7"]
|
||||
switch_mode = 1
|
||||
advance_mode = 2
|
||||
advance_expression = "_enemyDirection == 2"
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_0qxo1"]
|
||||
switch_mode = 1
|
||||
advance_mode = 2
|
||||
advance_expression = "_enemyDirection == 3"
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_q68rh"]
|
||||
switch_mode = 1
|
||||
advance_mode = 2
|
||||
advance_expression = "_enemyDirection == 2"
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_ou1lf"]
|
||||
switch_mode = 1
|
||||
advance_mode = 2
|
||||
advance_expression = "_enemyDirection == 1"
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_qbpj5"]
|
||||
switch_mode = 1
|
||||
advance_mode = 2
|
||||
advance_expression = "_enemyDirection == 3"
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_jd70t"]
|
||||
switch_mode = 1
|
||||
advance_mode = 2
|
||||
advance_expression = "_enemyDirection == 0"
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_ihqjo"]
|
||||
switch_mode = 1
|
||||
advance_mode = 2
|
||||
advance_expression = "_enemyDirection == 3"
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_sxhkj"]
|
||||
switch_mode = 2
|
||||
advance_mode = 2
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_nb6b0"]
|
||||
switch_mode = 2
|
||||
advance_mode = 2
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_n3k46"]
|
||||
switch_mode = 2
|
||||
advance_mode = 2
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_73pcy"]
|
||||
switch_mode = 2
|
||||
advance_mode = 2
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachine" id="AnimationNodeStateMachine_10rwh"]
|
||||
states/End/position = Vector2(875, 100)
|
||||
states/appear_back/node = SubResource("AnimationNodeAnimation_p70s4")
|
||||
states/appear_back/position = Vector2(526, 207)
|
||||
states/appear_front/node = SubResource("AnimationNodeAnimation_jrkfh")
|
||||
states/appear_front/position = Vector2(526, 64)
|
||||
states/appear_left/node = SubResource("AnimationNodeAnimation_mud4o")
|
||||
states/appear_left/position = Vector2(390, 140)
|
||||
states/appear_right/node = SubResource("AnimationNodeAnimation_vxyya")
|
||||
states/appear_right/position = Vector2(721, 140)
|
||||
transitions = ["Start", "appear_front", SubResource("AnimationNodeStateMachineTransition_katqq"), "appear_front", "appear_left", SubResource("AnimationNodeStateMachineTransition_50tti"), "appear_left", "appear_front", SubResource("AnimationNodeStateMachineTransition_3uias"), "appear_right", "appear_left", SubResource("AnimationNodeStateMachineTransition_e82ix"), "appear_left", "appear_right", SubResource("AnimationNodeStateMachineTransition_fxpqr"), "appear_front", "appear_right", SubResource("AnimationNodeStateMachineTransition_t50im"), "appear_right", "appear_front", SubResource("AnimationNodeStateMachineTransition_pf5g7"), "appear_front", "appear_back", SubResource("AnimationNodeStateMachineTransition_0qxo1"), "appear_back", "appear_front", SubResource("AnimationNodeStateMachineTransition_q68rh"), "appear_back", "appear_right", SubResource("AnimationNodeStateMachineTransition_ou1lf"), "appear_right", "appear_back", SubResource("AnimationNodeStateMachineTransition_qbpj5"), "appear_back", "appear_left", SubResource("AnimationNodeStateMachineTransition_jd70t"), "appear_left", "appear_back", SubResource("AnimationNodeStateMachineTransition_ihqjo"), "appear_front", "End", SubResource("AnimationNodeStateMachineTransition_sxhkj"), "appear_right", "End", SubResource("AnimationNodeStateMachineTransition_nb6b0"), "appear_left", "End", SubResource("AnimationNodeStateMachineTransition_n3k46"), "appear_back", "End", SubResource("AnimationNodeStateMachineTransition_73pcy")]
|
||||
|
||||
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_atau3"]
|
||||
animation = &"back"
|
||||
|
||||
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_u86rl"]
|
||||
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_17smd"]
|
||||
animation = &"front"
|
||||
|
||||
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_uflom"]
|
||||
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_4x58o"]
|
||||
animation = &"left"
|
||||
|
||||
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_n737b"]
|
||||
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_c2k77"]
|
||||
animation = &"right"
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_u86rl"]
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_60y1w"]
|
||||
advance_mode = 2
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_cp5rk"]
|
||||
switch_mode = 1
|
||||
advance_mode = 2
|
||||
advance_expression = "_enemyDirection == 0"
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_uq53j"]
|
||||
switch_mode = 1
|
||||
advance_mode = 2
|
||||
advance_expression = "_enemyDirection == 2"
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_rt4gk"]
|
||||
switch_mode = 1
|
||||
advance_mode = 2
|
||||
advance_expression = "_enemyDirection == 3"
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_uj0a7"]
|
||||
switch_mode = 1
|
||||
advance_mode = 2
|
||||
advance_expression = "_enemyDirection == 2"
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_64f8u"]
|
||||
switch_mode = 1
|
||||
advance_mode = 2
|
||||
advance_expression = "_enemyDirection == 1"
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_hcypj"]
|
||||
switch_mode = 1
|
||||
advance_mode = 2
|
||||
advance_expression = "_enemyDirection == 2"
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_46h58"]
|
||||
switch_mode = 1
|
||||
advance_mode = 2
|
||||
advance_expression = "_enemyDirection == 3"
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_p3l3v"]
|
||||
reset = false
|
||||
switch_mode = 1
|
||||
advance_mode = 2
|
||||
advance_expression = "_enemyDirection == 0"
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_uflom"]
|
||||
reset = false
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_x2b0v"]
|
||||
switch_mode = 1
|
||||
advance_mode = 2
|
||||
advance_expression = "_enemyDirection == 1"
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_n737b"]
|
||||
reset = false
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_4fxyf"]
|
||||
switch_mode = 1
|
||||
advance_mode = 2
|
||||
advance_expression = "_enemyDirection == 0"
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_1ebmq"]
|
||||
reset = false
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_mm4jq"]
|
||||
switch_mode = 1
|
||||
advance_mode = 2
|
||||
advance_expression = "_enemyDirection == 1"
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_rei16"]
|
||||
reset = false
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_yssn0"]
|
||||
switch_mode = 1
|
||||
advance_mode = 2
|
||||
advance_expression = "_enemyDirection == 3"
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_36car"]
|
||||
reset = false
|
||||
switch_mode = 1
|
||||
[sub_resource type="AnimationNodeStateMachine" id="AnimationNodeStateMachine_2we52"]
|
||||
states/End/position = Vector2(881, 100)
|
||||
states/Start/position = Vector2(192, 100)
|
||||
states/back/node = SubResource("AnimationNodeAnimation_atau3")
|
||||
states/back/position = Vector2(500, 170)
|
||||
states/front/node = SubResource("AnimationNodeAnimation_17smd")
|
||||
states/front/position = Vector2(500, 37)
|
||||
states/left/node = SubResource("AnimationNodeAnimation_4x58o")
|
||||
states/left/position = Vector2(378, 100)
|
||||
states/right/node = SubResource("AnimationNodeAnimation_c2k77")
|
||||
states/right/position = Vector2(608, 100)
|
||||
transitions = ["Start", "front", SubResource("AnimationNodeStateMachineTransition_60y1w"), "front", "left", SubResource("AnimationNodeStateMachineTransition_cp5rk"), "left", "front", SubResource("AnimationNodeStateMachineTransition_uq53j"), "front", "back", SubResource("AnimationNodeStateMachineTransition_rt4gk"), "back", "front", SubResource("AnimationNodeStateMachineTransition_uj0a7"), "front", "right", SubResource("AnimationNodeStateMachineTransition_64f8u"), "right", "front", SubResource("AnimationNodeStateMachineTransition_hcypj"), "left", "back", SubResource("AnimationNodeStateMachineTransition_46h58"), "back", "left", SubResource("AnimationNodeStateMachineTransition_p3l3v"), "left", "right", SubResource("AnimationNodeStateMachineTransition_x2b0v"), "right", "left", SubResource("AnimationNodeStateMachineTransition_4fxyf"), "back", "right", SubResource("AnimationNodeStateMachineTransition_mm4jq"), "right", "back", SubResource("AnimationNodeStateMachineTransition_yssn0")]
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_8ibrv"]
|
||||
reset = false
|
||||
switch_mode = 1
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_nryy0"]
|
||||
reset = false
|
||||
switch_mode = 1
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_wiqwp"]
|
||||
reset = false
|
||||
switch_mode = 1
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_h78qd"]
|
||||
reset = false
|
||||
switch_mode = 1
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_puo0m"]
|
||||
reset = false
|
||||
switch_mode = 1
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_0wf03"]
|
||||
switch_mode = 1
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_vx836"]
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_qscn7"]
|
||||
switch_mode = 2
|
||||
advance_mode = 2
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_61mt4"]
|
||||
switch_mode = 2
|
||||
advance_mode = 2
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_mle3q"]
|
||||
switch_mode = 2
|
||||
advance_mode = 2
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_ov0ka"]
|
||||
switch_mode = 2
|
||||
advance_mode = 2
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_6l842"]
|
||||
switch_mode = 2
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_4a52m"]
|
||||
reset = false
|
||||
switch_mode = 2
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_853at"]
|
||||
reset = false
|
||||
switch_mode = 2
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_7747u"]
|
||||
switch_mode = 2
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_j68mp"]
|
||||
switch_mode = 2
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_f7875"]
|
||||
reset = false
|
||||
switch_mode = 2
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_fwqgi"]
|
||||
reset = false
|
||||
switch_mode = 2
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_ja5r0"]
|
||||
reset = false
|
||||
switch_mode = 2
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_fx8qk"]
|
||||
reset = false
|
||||
switch_mode = 2
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_4aent"]
|
||||
reset = false
|
||||
switch_mode = 2
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_ofalu"]
|
||||
reset = false
|
||||
switch_mode = 2
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_26a75"]
|
||||
reset = false
|
||||
switch_mode = 2
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_xw806"]
|
||||
reset = false
|
||||
switch_mode = 1
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_lh6fm"]
|
||||
reset = false
|
||||
switch_mode = 1
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_r80ld"]
|
||||
reset = false
|
||||
switch_mode = 1
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_b04nj"]
|
||||
reset = false
|
||||
switch_mode = 1
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_fcn2i"]
|
||||
reset = false
|
||||
switch_mode = 1
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_7dqih"]
|
||||
reset = false
|
||||
switch_mode = 1
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_lg1l0"]
|
||||
reset = false
|
||||
switch_mode = 1
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_8chr7"]
|
||||
reset = false
|
||||
switch_mode = 1
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_wk5wj"]
|
||||
reset = false
|
||||
switch_mode = 1
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_yuqg3"]
|
||||
reset = false
|
||||
switch_mode = 1
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_fo1ps"]
|
||||
reset = false
|
||||
switch_mode = 1
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_fqmmj"]
|
||||
reset = false
|
||||
switch_mode = 1
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_rqgr1"]
|
||||
reset = false
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_mmslw"]
|
||||
reset = false
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_w35hd"]
|
||||
reset = false
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_voekp"]
|
||||
reset = false
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_behrq"]
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachine" id="AnimationNodeStateMachine_32cdq"]
|
||||
states/End/position = Vector2(1112, 125)
|
||||
states/Activate/node = SubResource("AnimationNodeStateMachine_10rwh")
|
||||
states/Activate/position = Vector2(238.918, 22)
|
||||
states/End/position = Vector2(854, 22)
|
||||
states/Idle/node = SubResource("AnimationNodeStateMachine_2we52")
|
||||
states/Idle/position = Vector2(452.918, 22)
|
||||
states/Start/position = Vector2(34, 22)
|
||||
states/appear_back/node = SubResource("AnimationNodeAnimation_vx836")
|
||||
states/appear_back/position = Vector2(527, 278)
|
||||
states/appear_front/node = SubResource("AnimationNodeAnimation_61mt4")
|
||||
states/appear_front/position = Vector2(574, -40)
|
||||
states/appear_left/node = SubResource("AnimationNodeAnimation_mle3q")
|
||||
states/appear_left/position = Vector2(275, 429)
|
||||
states/appear_right/node = SubResource("AnimationNodeAnimation_ov0ka")
|
||||
states/appear_right/position = Vector2(520, 130)
|
||||
states/back/node = SubResource("AnimationNodeAnimation_rqgr1")
|
||||
states/back/position = Vector2(1015, 372)
|
||||
states/front/node = SubResource("AnimationNodeAnimation_u86rl")
|
||||
states/front/position = Vector2(858, 22)
|
||||
states/left/node = SubResource("AnimationNodeAnimation_uflom")
|
||||
states/left/position = Vector2(819, 372)
|
||||
states/right/node = SubResource("AnimationNodeAnimation_n737b")
|
||||
states/right/position = Vector2(1160, 5)
|
||||
transitions = ["appear_front", "appear_right", SubResource("AnimationNodeStateMachineTransition_u86rl"), "appear_front", "appear_back", SubResource("AnimationNodeStateMachineTransition_uflom"), "appear_front", "appear_left", SubResource("AnimationNodeStateMachineTransition_n737b"), "appear_left", "appear_front", SubResource("AnimationNodeStateMachineTransition_1ebmq"), "appear_left", "appear_right", SubResource("AnimationNodeStateMachineTransition_rei16"), "appear_left", "appear_back", SubResource("AnimationNodeStateMachineTransition_36car"), "appear_back", "appear_left", SubResource("AnimationNodeStateMachineTransition_8ibrv"), "appear_back", "appear_front", SubResource("AnimationNodeStateMachineTransition_nryy0"), "appear_back", "appear_right", SubResource("AnimationNodeStateMachineTransition_wiqwp"), "appear_right", "appear_back", SubResource("AnimationNodeStateMachineTransition_h78qd"), "appear_right", "appear_front", SubResource("AnimationNodeStateMachineTransition_puo0m"), "appear_right", "appear_left", SubResource("AnimationNodeStateMachineTransition_0wf03"), "appear_front", "front", SubResource("AnimationNodeStateMachineTransition_vx836"), "appear_left", "left", SubResource("AnimationNodeStateMachineTransition_61mt4"), "appear_back", "back", SubResource("AnimationNodeStateMachineTransition_mle3q"), "appear_right", "right", SubResource("AnimationNodeStateMachineTransition_ov0ka"), "appear_front", "right", SubResource("AnimationNodeStateMachineTransition_6l842"), "appear_front", "left", SubResource("AnimationNodeStateMachineTransition_4a52m"), "appear_front", "back", SubResource("AnimationNodeStateMachineTransition_853at"), "appear_right", "front", SubResource("AnimationNodeStateMachineTransition_7747u"), "appear_right", "left", SubResource("AnimationNodeStateMachineTransition_j68mp"), "appear_right", "back", SubResource("AnimationNodeStateMachineTransition_f7875"), "appear_left", "front", SubResource("AnimationNodeStateMachineTransition_fwqgi"), "appear_left", "right", SubResource("AnimationNodeStateMachineTransition_ja5r0"), "appear_left", "back", SubResource("AnimationNodeStateMachineTransition_fx8qk"), "appear_back", "front", SubResource("AnimationNodeStateMachineTransition_4aent"), "appear_back", "left", SubResource("AnimationNodeStateMachineTransition_ofalu"), "appear_back", "right", SubResource("AnimationNodeStateMachineTransition_26a75"), "front", "left", SubResource("AnimationNodeStateMachineTransition_xw806"), "front", "back", SubResource("AnimationNodeStateMachineTransition_lh6fm"), "front", "right", SubResource("AnimationNodeStateMachineTransition_r80ld"), "right", "front", SubResource("AnimationNodeStateMachineTransition_b04nj"), "right", "left", SubResource("AnimationNodeStateMachineTransition_fcn2i"), "right", "back", SubResource("AnimationNodeStateMachineTransition_7dqih"), "back", "right", SubResource("AnimationNodeStateMachineTransition_lg1l0"), "back", "left", SubResource("AnimationNodeStateMachineTransition_8chr7"), "back", "front", SubResource("AnimationNodeStateMachineTransition_wk5wj"), "left", "back", SubResource("AnimationNodeStateMachineTransition_yuqg3"), "left", "front", SubResource("AnimationNodeStateMachineTransition_fo1ps"), "left", "right", SubResource("AnimationNodeStateMachineTransition_fqmmj"), "Start", "appear_front", SubResource("AnimationNodeStateMachineTransition_rqgr1"), "Start", "appear_right", SubResource("AnimationNodeStateMachineTransition_mmslw"), "Start", "appear_left", SubResource("AnimationNodeStateMachineTransition_w35hd"), "Start", "appear_back", SubResource("AnimationNodeStateMachineTransition_voekp")]
|
||||
graph_offset = Vector2(-96, 164.065)
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_p70s4"]
|
||||
advance_mode = 2
|
||||
transitions = ["Activate", "Idle", SubResource("AnimationNodeStateMachineTransition_qscn7"), "Start", "Activate", SubResource("AnimationNodeStateMachineTransition_behrq")]
|
||||
graph_offset = Vector2(-617.082, -169.416)
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_jrkfh"]
|
||||
|
||||
@@ -6493,35 +6510,41 @@ switch_mode = 2
|
||||
advance_mode = 2
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_vxyya"]
|
||||
switch_mode = 2
|
||||
advance_mode = 2
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_jj0f0"]
|
||||
switch_mode = 2
|
||||
advance_mode = 2
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_28bos"]
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_ylf7i"]
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_btfu3"]
|
||||
switch_mode = 2
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_86buh"]
|
||||
advance_mode = 2
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_p70s4"]
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_btfu3"]
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_yl7ba"]
|
||||
switch_mode = 2
|
||||
advance_mode = 2
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachine" id="AnimationNodeStateMachine_katqq"]
|
||||
states/Activate/node = ExtResource("971_5duvr")
|
||||
states/Activate/position = Vector2(729, 100)
|
||||
states/Activate/position = Vector2(499, 185)
|
||||
"states/Activated Idle/node" = ExtResource("972_86buh")
|
||||
"states/Activated Idle/position" = Vector2(540, 184)
|
||||
"states/Activated Idle/position" = Vector2(499, 262)
|
||||
states/Idle/node = ExtResource("973_p70s4")
|
||||
states/Idle/position = Vector2(359, 100)
|
||||
states/Idle/position = Vector2(366, 100)
|
||||
"states/Primary Attack/node" = ExtResource("974_jrkfh")
|
||||
"states/Primary Attack/position" = Vector2(334, 295)
|
||||
"states/Primary Attack/position" = Vector2(342, 345)
|
||||
"states/Secondary Attack/node" = ExtResource("975_mud4o")
|
||||
"states/Secondary Attack/position" = Vector2(699, 295)
|
||||
"states/Secondary Attack/position" = Vector2(620, 345)
|
||||
states/Start/position = Vector2(198, 100)
|
||||
states/Walking/node = ExtResource("976_vxyya")
|
||||
states/Walking/position = Vector2(359, 184)
|
||||
transitions = ["Start", "Idle", SubResource("AnimationNodeStateMachineTransition_p70s4"), "Idle", "Activate", SubResource("AnimationNodeStateMachineTransition_jrkfh"), "Activate", "Activated Idle", SubResource("AnimationNodeStateMachineTransition_mud4o"), "Idle", "Walking", SubResource("AnimationNodeStateMachineTransition_vxyya"), "Walking", "Idle", SubResource("AnimationNodeStateMachineTransition_jj0f0"), "Activated Idle", "Primary Attack", SubResource("AnimationNodeStateMachineTransition_28bos"), "Activated Idle", "Secondary Attack", SubResource("AnimationNodeStateMachineTransition_ylf7i"), "Primary Attack", "Activated Idle", SubResource("AnimationNodeStateMachineTransition_btfu3"), "Secondary Attack", "Activated Idle", SubResource("AnimationNodeStateMachineTransition_yl7ba")]
|
||||
states/Walking/position = Vector2(620, 100)
|
||||
transitions = ["Walking", "Activate", SubResource("AnimationNodeStateMachineTransition_jrkfh"), "Activate", "Activated Idle", SubResource("AnimationNodeStateMachineTransition_mud4o"), "Secondary Attack", "Activated Idle", SubResource("AnimationNodeStateMachineTransition_vxyya"), "Primary Attack", "Activated Idle", SubResource("AnimationNodeStateMachineTransition_jj0f0"), "Activated Idle", "Primary Attack", SubResource("AnimationNodeStateMachineTransition_28bos"), "Activated Idle", "Secondary Attack", SubResource("AnimationNodeStateMachineTransition_ylf7i"), "Start", "Idle", SubResource("AnimationNodeStateMachineTransition_86buh"), "Idle", "Walking", SubResource("AnimationNodeStateMachineTransition_p70s4"), "Walking", "Idle", SubResource("AnimationNodeStateMachineTransition_btfu3"), "Idle", "Activate", SubResource("AnimationNodeStateMachineTransition_yl7ba")]
|
||||
|
||||
[sub_resource type="Animation" id="Animation_jrkfh"]
|
||||
resource_name = "ATTACK 1"
|
||||
@@ -7335,11 +7358,11 @@ animations = [{
|
||||
}]
|
||||
|
||||
[node name="EnemyModelView" type="Node3D"]
|
||||
script = ExtResource("1_ol7va")
|
||||
EnemyLoreInfo = SubResource("Resource_500at")
|
||||
script = ExtResource("1_behrq")
|
||||
|
||||
[node name="Sprite3D" type="Sprite3D" parent="."]
|
||||
transform = Transform3D(1.5, 0, 0, 0, 1.5, 0, 0, 0, 1.5, 0, 1.85151, 0)
|
||||
transform = Transform3D(1.5, 0, 0, 0, 1.5, 0, 0, 0, 1.5, 0, 0.319186, 0)
|
||||
pixel_size = 0.007
|
||||
billboard = 2
|
||||
alpha_cut = 1
|
||||
texture_filter = 0
|
||||
@@ -7409,6 +7432,7 @@ libraries = {
|
||||
unique_name_in_owner = true
|
||||
root_node = NodePath("%ScrollAnimationTree/..")
|
||||
tree_root = SubResource("AnimationNodeStateMachine_32cdq")
|
||||
advance_expression_base_node = NodePath("..")
|
||||
anim_player = NodePath("../ScrollAnimation")
|
||||
|
||||
[node name="AnimationTree" type="AnimationTree" parent="."]
|
||||
@@ -7425,10 +7449,10 @@ libraries = {
|
||||
}
|
||||
|
||||
[node name="Attack 1" type="AnimatedSprite3D" parent="Attack VFX Player"]
|
||||
transform = Transform3D(0.84, 0, 0, 0, 0.84, 0, 0, 0, 0.84, -0.189979, 1.67911, 0)
|
||||
transform = Transform3D(0.84, 0, 0, 0, 0.84, 0, 0, 0, 0.84, 0, 0.319186, 0)
|
||||
sprite_frames = SubResource("SpriteFrames_nb6b0")
|
||||
frame = 26
|
||||
|
||||
[node name="Attack 2" type="AnimatedSprite3D" parent="Attack VFX Player"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.12026, 1.4116, 0)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.319186, 0)
|
||||
sprite_frames = SubResource("SpriteFrames_i4gi3")
|
||||
|
||||
@@ -24,6 +24,7 @@ public partial class Chinthe : Enemy2D, IHaveEngagePlayerBehavior, IHaveFollowBe
|
||||
|
||||
public void OnReady()
|
||||
{
|
||||
FollowBehavior.Init(NavigationAgent);
|
||||
EnemyModelView.ActivationFinished += EnemyModelView_ActivationFinished;
|
||||
EnemyModelView.TeleportAnimationFinished += Teleport;
|
||||
SetPhysicsProcess(true);
|
||||
@@ -39,16 +40,25 @@ public partial class Chinthe : Enemy2D, IHaveEngagePlayerBehavior, IHaveFollowBe
|
||||
|
||||
private void EnemyModelView_ActivationFinished(object sender, EventArgs e)
|
||||
{
|
||||
FollowBehavior.Init(NavigationAgent);
|
||||
FollowBehavior.OnVelocityComputed += OnChintheVelocityComputed;
|
||||
EngagePlayerBehavior.TakeAction += EngagePlayerBehavior_TakeAction;
|
||||
EngagePlayerBehavior.AcquireTarget += EngagePlayerBehavior_AcquireTarget;
|
||||
PlayerDetector.BodyEntered += PlayerDetector_BodyEntered;
|
||||
PlayerDetector.BodyEntered += PlayerDetector_BodyEntered2;
|
||||
PlayerDetector.BodyExited += PlayerDetector_BodyExited;
|
||||
_enemyLogic.Input(new EnemyLogic.Input.Follow());
|
||||
_enemyLogic.Input(new EnemyLogic.Input.Move());
|
||||
}
|
||||
|
||||
private void PlayerDetector_BodyEntered2(Node3D body)
|
||||
{
|
||||
_enemyLogic.Input(new EnemyLogic.Input.ReachedPlayer());
|
||||
EnemyModelView.PlayStopWalkAnimation();
|
||||
}
|
||||
|
||||
public override void _Process(double delta)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Activate()
|
||||
{
|
||||
EnemyModelView.PlayActivateAnimation();
|
||||
@@ -57,8 +67,10 @@ public partial class Chinthe : Enemy2D, IHaveEngagePlayerBehavior, IHaveFollowBe
|
||||
private void Teleport(object sender, EventArgs e)
|
||||
{
|
||||
var targetPosition = _player.GlobalBasis.Z;
|
||||
var currentDirection = GlobalBasis.Z;
|
||||
GlobalPosition = GlobalPosition + new Vector3(0, 0, 5 * targetPosition.Z);
|
||||
var dot = _player.GlobalBasis.Z.Dot(GlobalBasis.Z);
|
||||
var currentDirection = GlobalBasis.Z.Normalized();
|
||||
var amountToTeleportBy = dot > 0 ? 5 : -5;
|
||||
GlobalPosition = GlobalPosition + new Vector3(amountToTeleportBy * targetPosition.X, 0, amountToTeleportBy * targetPosition.Z);
|
||||
}
|
||||
|
||||
public void OnChintheVelocityComputed(Vector3 safeVelocity)
|
||||
|
||||
@@ -35,7 +35,6 @@ axis_lock_angular_x = true
|
||||
axis_lock_angular_z = true
|
||||
motion_mode = 1
|
||||
script = ExtResource("1_120m2")
|
||||
PrimaryAttackChance = 0.9
|
||||
|
||||
[node name="CollisionShape" type="CollisionShape3D" parent="."]
|
||||
unique_name_in_owner = true
|
||||
@@ -45,21 +44,13 @@ shape = SubResource("CapsuleShape3D_cwfph")
|
||||
[node name="LineOfSight" type="Area3D" parent="."]
|
||||
unique_name_in_owner = true
|
||||
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 0, 0)
|
||||
collision_layer = 2
|
||||
collision_mask = 2
|
||||
collision_layer = 0
|
||||
collision_mask = 32
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="LineOfSight"]
|
||||
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0, 0, -2)
|
||||
shape = SubResource("CylinderShape3D_jbgmx")
|
||||
|
||||
[node name="Raycast" type="RayCast3D" parent="LineOfSight"]
|
||||
unique_name_in_owner = true
|
||||
transform = Transform3D(-1, 0, 8.74228e-08, 0, 1, 0, -8.74228e-08, 0, -1, 0, 0, 0)
|
||||
target_position = Vector3(0, 0, -5)
|
||||
collision_mask = 3
|
||||
debug_shape_custom_color = Color(0.60023, 7.84531e-06, 0.405364, 1)
|
||||
debug_shape_thickness = 5
|
||||
|
||||
[node name="EnemyModelView" parent="." instance=ExtResource("3_ncr2e")]
|
||||
unique_name_in_owner = true
|
||||
EnemyLoreInfo = SubResource("Resource_120m2")
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=505 format=3 uid="uid://byd7cwxq1be6f"]
|
||||
[gd_scene load_steps=504 format=3 uid="uid://byd7cwxq1be6f"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cvr1qimxpignl" path="res://src/enemy/EnemyModelView2D.cs" id="1_6dej3"]
|
||||
[ext_resource type="Texture2D" uid="uid://dnd6d5cx7x7i8" path="res://src/enemy/enemy_types/07. chinthe/animations/CHINTHE - RERENDER/BACK/0400.png" id="2_3sdh3"]
|
||||
@@ -398,7 +398,6 @@
|
||||
[ext_resource type="AudioStream" uid="uid://bq4te4d8m0uiw" path="res://src/audio/sfx/enemy_chinthe_mainattack.ogg" id="392_li182"]
|
||||
[ext_resource type="AudioStream" uid="uid://b0w77kgmtd3g5" path="res://src/audio/sfx/enemy_chinthe_teleport.ogg" id="393_sgkk0"]
|
||||
[ext_resource type="AnimationNodeStateMachine" uid="uid://cbq8xog50cjjy" path="res://src/enemy/animation_state_machines/PrimaryAttackStateMachine.tres" id="394_ldtka"]
|
||||
[ext_resource type="AnimationNodeStateMachine" uid="uid://cy2ngl55c0rws" path="res://src/enemy/animation_state_machines/WalkingStateMachine.tres" id="395_jbhro"]
|
||||
[ext_resource type="Texture2D" uid="uid://c7pf2dib2ilhs" path="res://src/vfx/Enemy/CHINTHE_BLAST.png" id="395_ymova"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_w4c47"]
|
||||
@@ -2123,6 +2122,7 @@ tracks/1/keys = {
|
||||
[sub_resource type="Animation" id="Animation_wjklo"]
|
||||
resource_name = "idle_back_walk"
|
||||
length = 1.41668
|
||||
loop_mode = 1
|
||||
step = 0.0833333
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
@@ -2318,6 +2318,7 @@ tracks/1/keys = {
|
||||
[sub_resource type="Animation" id="Animation_sodds"]
|
||||
resource_name = "idle_walk_left"
|
||||
length = 1.41668
|
||||
loop_mode = 1
|
||||
step = 0.0833333
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
@@ -2439,6 +2440,7 @@ tracks/2/keys = {
|
||||
[sub_resource type="Animation" id="Animation_t3xhd"]
|
||||
resource_name = "idle_walk_right"
|
||||
length = 1.41667
|
||||
loop_mode = 1
|
||||
step = 0.0833333
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
@@ -2837,242 +2839,6 @@ tracks/1/keys = {
|
||||
"values": [0, 10]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_keq07"]
|
||||
resource_name = "stop_back_walk"
|
||||
length = 1.41668
|
||||
step = 0.0833333
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("Sprite3D/SubViewportContainer/SubViewport/AnimatedSprite:animation")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [&"idle_back_walk"]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("Sprite3D/SubViewportContainer/SubViewport/AnimatedSprite:frame")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0, 1.41667),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [0, 17]
|
||||
}
|
||||
tracks/2/type = "value"
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/path = NodePath("Sprite3D:position")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
"times": PackedFloat32Array(0, 0.166667, 0.416667),
|
||||
"transitions": PackedFloat32Array(1, 5.46418, 1),
|
||||
"update": 0,
|
||||
"values": [Vector3(0, 0, 0), Vector3(0, 1.5, 0), Vector3(0, 0, 0)]
|
||||
}
|
||||
tracks/3/type = "value"
|
||||
tracks/3/imported = false
|
||||
tracks/3/enabled = true
|
||||
tracks/3/path = NodePath(".:CanMove")
|
||||
tracks/3/interp = 1
|
||||
tracks/3/loop_wrap = true
|
||||
tracks/3/keys = {
|
||||
"times": PackedFloat32Array(0, 0.167921, 0.417721),
|
||||
"transitions": PackedFloat32Array(1, 1, 1),
|
||||
"update": 1,
|
||||
"values": [false, true, false]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_w4c47"]
|
||||
resource_name = "stop_left_walk"
|
||||
length = 1.41668
|
||||
step = 0.0833333
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("Sprite3D/SubViewportContainer/SubViewport/AnimatedSprite:animation")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [&"idle_left_walk"]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("Sprite3D/SubViewportContainer/SubViewport/AnimatedSprite:frame")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0, 1.41667),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [0, 17]
|
||||
}
|
||||
tracks/2/type = "value"
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/path = NodePath("Sprite3D:position")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
"times": PackedFloat32Array(0, 0.166667, 0.416667),
|
||||
"transitions": PackedFloat32Array(1, 5.46418, 1),
|
||||
"update": 0,
|
||||
"values": [Vector3(0, 0, 0), Vector3(0, 1.5, 0), Vector3(0, 0, 0)]
|
||||
}
|
||||
tracks/3/type = "value"
|
||||
tracks/3/imported = false
|
||||
tracks/3/enabled = true
|
||||
tracks/3/path = NodePath("Sprite3D:flip_h")
|
||||
tracks/3/interp = 1
|
||||
tracks/3/loop_wrap = true
|
||||
tracks/3/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [true]
|
||||
}
|
||||
tracks/4/type = "value"
|
||||
tracks/4/imported = false
|
||||
tracks/4/enabled = true
|
||||
tracks/4/path = NodePath(".:CanMove")
|
||||
tracks/4/interp = 1
|
||||
tracks/4/loop_wrap = true
|
||||
tracks/4/keys = {
|
||||
"times": PackedFloat32Array(0, 0.167921, 0.417721),
|
||||
"transitions": PackedFloat32Array(1, 1, 1),
|
||||
"update": 1,
|
||||
"values": [false, true, false]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_5lbxl"]
|
||||
resource_name = "stop_right_walk"
|
||||
length = 1.41667
|
||||
step = 0.0833333
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("Sprite3D/SubViewportContainer/SubViewport/AnimatedSprite:animation")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [&"idle_left_walk"]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("Sprite3D/SubViewportContainer/SubViewport/AnimatedSprite:frame")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0, 1.41667),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [0, 17]
|
||||
}
|
||||
tracks/2/type = "value"
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/path = NodePath("Sprite3D:position")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
"times": PackedFloat32Array(0, 0.166667, 0.416667),
|
||||
"transitions": PackedFloat32Array(1, 5.46418, 1),
|
||||
"update": 0,
|
||||
"values": [Vector3(0, 0, 0), Vector3(0, 1.5, 0), Vector3(0, 0, 0)]
|
||||
}
|
||||
tracks/3/type = "value"
|
||||
tracks/3/imported = false
|
||||
tracks/3/enabled = true
|
||||
tracks/3/path = NodePath("Sprite3D:flip_h")
|
||||
tracks/3/interp = 1
|
||||
tracks/3/loop_wrap = true
|
||||
tracks/3/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [false]
|
||||
}
|
||||
tracks/4/type = "value"
|
||||
tracks/4/imported = false
|
||||
tracks/4/enabled = true
|
||||
tracks/4/path = NodePath(".:CanMove")
|
||||
tracks/4/interp = 1
|
||||
tracks/4/loop_wrap = true
|
||||
tracks/4/keys = {
|
||||
"times": PackedFloat32Array(0, 0.167921, 0.417721),
|
||||
"transitions": PackedFloat32Array(1, 1, 1),
|
||||
"update": 1,
|
||||
"values": [false, true, false]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_jbhro"]
|
||||
resource_name = "stop_walk_front"
|
||||
length = 1.41668
|
||||
step = 0.0833333
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("Sprite3D/SubViewportContainer/SubViewport/AnimatedSprite:animation")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [&"idle_front_walk"]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("Sprite3D/SubViewportContainer/SubViewport/AnimatedSprite:frame")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0, 1.41667),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [0, 17]
|
||||
}
|
||||
tracks/2/type = "value"
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/path = NodePath("Sprite3D:position")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
"times": PackedFloat32Array(0, 0.166667, 0.416667),
|
||||
"transitions": PackedFloat32Array(1, 5.46418, 1),
|
||||
"update": 0,
|
||||
"values": [Vector3(0, 0, 0), Vector3(0, 1.5, 0), Vector3(0, 0, 0)]
|
||||
}
|
||||
tracks/3/type = "value"
|
||||
tracks/3/imported = false
|
||||
tracks/3/enabled = true
|
||||
tracks/3/path = NodePath(".:CanMove")
|
||||
tracks/3/interp = 1
|
||||
tracks/3/loop_wrap = true
|
||||
tracks/3/keys = {
|
||||
"times": PackedFloat32Array(0, 0.0833333, 0.416667),
|
||||
"transitions": PackedFloat32Array(1, 1, 1),
|
||||
"update": 1,
|
||||
"values": [false, true, false]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_6dej3"]
|
||||
resource_name = "teleport"
|
||||
length = 0.833341
|
||||
@@ -3291,10 +3057,6 @@ _data = {
|
||||
&"secondary_attack": SubResource("Animation_6avl1"),
|
||||
&"secondary_attack_back": SubResource("Animation_nusgj"),
|
||||
&"secondary_attack_left": SubResource("Animation_ixs6i"),
|
||||
&"stop_back_walk": SubResource("Animation_keq07"),
|
||||
&"stop_left_walk": SubResource("Animation_w4c47"),
|
||||
&"stop_right_walk": SubResource("Animation_5lbxl"),
|
||||
&"stop_walk_front": SubResource("Animation_jbhro"),
|
||||
&"teleport": SubResource("Animation_6dej3"),
|
||||
&"teleport in": SubResource("Animation_3sdh3")
|
||||
}
|
||||
@@ -3302,73 +3064,90 @@ _data = {
|
||||
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_sgkk0"]
|
||||
animation = &"teleport"
|
||||
|
||||
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_jbhro"]
|
||||
animation = &"stop_back_walk"
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_li182"]
|
||||
advance_mode = 2
|
||||
|
||||
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_keq07"]
|
||||
animation = &"stop_left_walk"
|
||||
[sub_resource type="AnimationNodeStateMachine" id="AnimationNodeStateMachine_li182"]
|
||||
states/Start/position = Vector2(273, 100)
|
||||
transitions = ["Start", "End", SubResource("AnimationNodeStateMachineTransition_li182")]
|
||||
|
||||
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_w4c47"]
|
||||
animation = &"stop_right_walk"
|
||||
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_li182"]
|
||||
animation = &"teleport in"
|
||||
|
||||
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_5lbxl"]
|
||||
animation = &"stop_walk_front"
|
||||
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_yu6fp"]
|
||||
animation = &"idle_back_walk"
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_yu6fp"]
|
||||
reset = false
|
||||
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_djlpo"]
|
||||
animation = &"idle_front_walk"
|
||||
|
||||
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_t2war"]
|
||||
animation = &"idle_left_walk"
|
||||
|
||||
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_b16jm"]
|
||||
animation = &"idle_right_walk"
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_d1ogr"]
|
||||
advance_mode = 2
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_djlpo"]
|
||||
switch_mode = 1
|
||||
advance_mode = 2
|
||||
advance_expression = "_enemyDirection == 0"
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_t2war"]
|
||||
switch_mode = 1
|
||||
advance_mode = 2
|
||||
advance_expression = "_enemyDirection == 2"
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_b16jm"]
|
||||
switch_mode = 1
|
||||
advance_mode = 2
|
||||
advance_expression = "_enemyDirection == 3"
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_d1ogr"]
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_7dl50"]
|
||||
switch_mode = 1
|
||||
advance_mode = 2
|
||||
advance_expression = "_enemyDirection == 2"
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_7dl50"]
|
||||
advance_mode = 2
|
||||
advance_expression = "_enemyDirection == 1"
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_y2ova"]
|
||||
advance_mode = 2
|
||||
advance_expression = "_enemyDirection == 2"
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_8vs7h"]
|
||||
switch_mode = 1
|
||||
advance_mode = 2
|
||||
advance_expression = "_enemyDirection == 1"
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_8vs7h"]
|
||||
switch_mode = 1
|
||||
advance_mode = 2
|
||||
advance_expression = "_enemyDirection == 2"
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_rgja2"]
|
||||
switch_mode = 1
|
||||
advance_mode = 2
|
||||
advance_expression = "_enemyDirection == 3"
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_syao6"]
|
||||
switch_mode = 1
|
||||
advance_mode = 2
|
||||
advance_expression = "_enemyDirection == 1"
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_3iqav"]
|
||||
switch_mode = 1
|
||||
advance_mode = 2
|
||||
advance_expression = "_enemyDirection == 0"
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_3iqav"]
|
||||
advance_mode = 2
|
||||
advance_expression = "_enemyDirection == 3"
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_ii52r"]
|
||||
switch_mode = 1
|
||||
advance_mode = 2
|
||||
advance_expression = "_enemyDirection == 1"
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_v8fg0"]
|
||||
switch_mode = 1
|
||||
advance_mode = 2
|
||||
advance_expression = "_enemyDirection == 0"
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_r44fx"]
|
||||
switch_mode = 2
|
||||
switch_mode = 1
|
||||
advance_mode = 2
|
||||
advance_expression = "_enemyDirection == 3"
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_dhuhq"]
|
||||
switch_mode = 2
|
||||
@@ -3382,19 +3161,20 @@ advance_mode = 2
|
||||
switch_mode = 2
|
||||
advance_mode = 2
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachine" id="AnimationNodeStateMachine_8u7he"]
|
||||
states/stop_back_walk/node = SubResource("AnimationNodeAnimation_jbhro")
|
||||
states/stop_back_walk/position = Vector2(516, 203)
|
||||
states/stop_left_walk/node = SubResource("AnimationNodeAnimation_keq07")
|
||||
states/stop_left_walk/position = Vector2(354, 135)
|
||||
states/stop_right_walk/node = SubResource("AnimationNodeAnimation_w4c47")
|
||||
states/stop_right_walk/position = Vector2(687, 135)
|
||||
states/stop_walk_front/node = SubResource("AnimationNodeAnimation_5lbxl")
|
||||
states/stop_walk_front/position = Vector2(516, 72)
|
||||
transitions = ["Start", "stop_walk_front", SubResource("AnimationNodeStateMachineTransition_yu6fp"), "stop_walk_front", "stop_left_walk", SubResource("AnimationNodeStateMachineTransition_djlpo"), "stop_left_walk", "stop_walk_front", SubResource("AnimationNodeStateMachineTransition_t2war"), "stop_walk_front", "stop_back_walk", SubResource("AnimationNodeStateMachineTransition_b16jm"), "stop_back_walk", "stop_walk_front", SubResource("AnimationNodeStateMachineTransition_d1ogr"), "stop_walk_front", "stop_right_walk", SubResource("AnimationNodeStateMachineTransition_7dl50"), "stop_right_walk", "stop_walk_front", SubResource("AnimationNodeStateMachineTransition_y2ova"), "stop_back_walk", "stop_right_walk", SubResource("AnimationNodeStateMachineTransition_8vs7h"), "stop_right_walk", "stop_back_walk", SubResource("AnimationNodeStateMachineTransition_rgja2"), "stop_back_walk", "stop_left_walk", SubResource("AnimationNodeStateMachineTransition_syao6"), "stop_left_walk", "stop_back_walk", SubResource("AnimationNodeStateMachineTransition_3iqav"), "stop_left_walk", "stop_right_walk", SubResource("AnimationNodeStateMachineTransition_ii52r"), "stop_right_walk", "stop_left_walk", SubResource("AnimationNodeStateMachineTransition_v8fg0"), "stop_right_walk", "End", SubResource("AnimationNodeStateMachineTransition_r44fx"), "stop_walk_front", "End", SubResource("AnimationNodeStateMachineTransition_dhuhq"), "stop_back_walk", "End", SubResource("AnimationNodeStateMachineTransition_y4bdd"), "stop_left_walk", "End", SubResource("AnimationNodeStateMachineTransition_syb4h")]
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_8u7he"]
|
||||
switch_mode = 2
|
||||
advance_mode = 2
|
||||
|
||||
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_li182"]
|
||||
animation = &"teleport in"
|
||||
[sub_resource type="AnimationNodeStateMachine" id="AnimationNodeStateMachine_7dl50"]
|
||||
states/idle_back_walk/node = SubResource("AnimationNodeAnimation_yu6fp")
|
||||
states/idle_back_walk/position = Vector2(537, 279)
|
||||
states/idle_front_walk/node = SubResource("AnimationNodeAnimation_djlpo")
|
||||
states/idle_front_walk/position = Vector2(537, 100)
|
||||
states/idle_left_walk/node = SubResource("AnimationNodeAnimation_t2war")
|
||||
states/idle_left_walk/position = Vector2(362, 179)
|
||||
states/idle_right_walk/node = SubResource("AnimationNodeAnimation_b16jm")
|
||||
states/idle_right_walk/position = Vector2(756, 179)
|
||||
transitions = ["Start", "idle_front_walk", SubResource("AnimationNodeStateMachineTransition_d1ogr"), "idle_front_walk", "idle_left_walk", SubResource("AnimationNodeStateMachineTransition_djlpo"), "idle_left_walk", "idle_front_walk", SubResource("AnimationNodeStateMachineTransition_t2war"), "idle_front_walk", "idle_back_walk", SubResource("AnimationNodeStateMachineTransition_b16jm"), "idle_back_walk", "idle_front_walk", SubResource("AnimationNodeStateMachineTransition_7dl50"), "idle_front_walk", "idle_right_walk", SubResource("AnimationNodeStateMachineTransition_y2ova"), "idle_right_walk", "idle_front_walk", SubResource("AnimationNodeStateMachineTransition_8vs7h"), "idle_right_walk", "idle_back_walk", SubResource("AnimationNodeStateMachineTransition_rgja2"), "idle_back_walk", "idle_right_walk", SubResource("AnimationNodeStateMachineTransition_syao6"), "idle_right_walk", "idle_left_walk", SubResource("AnimationNodeStateMachineTransition_3iqav"), "idle_left_walk", "idle_right_walk", SubResource("AnimationNodeStateMachineTransition_ii52r"), "idle_back_walk", "idle_left_walk", SubResource("AnimationNodeStateMachineTransition_v8fg0"), "idle_left_walk", "idle_back_walk", SubResource("AnimationNodeStateMachineTransition_r44fx"), "idle_front_walk", "End", SubResource("AnimationNodeStateMachineTransition_dhuhq"), "idle_right_walk", "End", SubResource("AnimationNodeStateMachineTransition_y4bdd"), "idle_back_walk", "End", SubResource("AnimationNodeStateMachineTransition_syb4h"), "idle_left_walk", "End", SubResource("AnimationNodeStateMachineTransition_8u7he")]
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_umemc"]
|
||||
advance_mode = 2
|
||||
@@ -3405,24 +3185,10 @@ advance_mode = 2
|
||||
switch_mode = 2
|
||||
advance_mode = 2
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_jbhro"]
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_keq07"]
|
||||
switch_mode = 2
|
||||
advance_mode = 2
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_w4c47"]
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_li182"]
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_8u7he"]
|
||||
reset = false
|
||||
switch_mode = 1
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_8e7of"]
|
||||
switch_mode = 2
|
||||
advance_mode = 2
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_manul"]
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_auprl"]
|
||||
@@ -3433,6 +3199,18 @@ advance_mode = 2
|
||||
switch_mode = 2
|
||||
advance_mode = 2
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_jbhro"]
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_yu6fp"]
|
||||
switch_mode = 2
|
||||
advance_mode = 2
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_sgkk0"]
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_8e7of"]
|
||||
break_loop_at_end = true
|
||||
switch_mode = 2
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachine" id="AnimationNodeStateMachine_nvqie"]
|
||||
states/Activate/node = ExtResource("243_5jjkq")
|
||||
states/Activate/position = Vector2(583, 100)
|
||||
@@ -3443,15 +3221,15 @@ states/Idle/position = Vector2(348, 285)
|
||||
"states/Primary Skill/node" = SubResource("AnimationNodeAnimation_sgkk0")
|
||||
"states/Primary Skill/position" = Vector2(82.437, 193.144)
|
||||
states/Start/position = Vector2(199, 100)
|
||||
"states/Stop Walk/node" = SubResource("AnimationNodeStateMachine_8u7he")
|
||||
"states/Stop Walk/position" = Vector2(132.437, 323.65)
|
||||
"states/Stop Walk/node" = SubResource("AnimationNodeStateMachine_li182")
|
||||
"states/Stop Walk/position" = Vector2(72.437, 334.144)
|
||||
"states/Teleport In/node" = SubResource("AnimationNodeAnimation_li182")
|
||||
"states/Teleport In/position" = Vector2(-67.563, 254.144)
|
||||
"states/Unactivated Idle/node" = ExtResource("245_gr3tp")
|
||||
"states/Unactivated Idle/position" = Vector2(357, 100)
|
||||
states/Walking/node = ExtResource("395_jbhro")
|
||||
states/Walking/position = Vector2(348, 398.498)
|
||||
transitions = ["Start", "Unactivated Idle", SubResource("AnimationNodeStateMachineTransition_umemc"), "Unactivated Idle", "Activate", SubResource("AnimationNodeStateMachineTransition_t3xhd"), "Activate", "Idle", SubResource("AnimationNodeStateMachineTransition_5jjkq"), "Idle", "Primary Attack", SubResource("AnimationNodeStateMachineTransition_jbhro"), "Primary Attack", "Idle", SubResource("AnimationNodeStateMachineTransition_keq07"), "Idle", "Walking", SubResource("AnimationNodeStateMachineTransition_w4c47"), "Walking", "Primary Attack", SubResource("AnimationNodeStateMachineTransition_li182"), "Walking", "Stop Walk", SubResource("AnimationNodeStateMachineTransition_8u7he"), "Stop Walk", "Idle", SubResource("AnimationNodeStateMachineTransition_8e7of"), "Idle", "Primary Skill", SubResource("AnimationNodeStateMachineTransition_manul"), "Primary Skill", "Teleport In", SubResource("AnimationNodeStateMachineTransition_auprl"), "Teleport In", "Idle", SubResource("AnimationNodeStateMachineTransition_i5vf2")]
|
||||
states/Walking/node = SubResource("AnimationNodeStateMachine_7dl50")
|
||||
states/Walking/position = Vector2(348, 400.144)
|
||||
transitions = ["Start", "Unactivated Idle", SubResource("AnimationNodeStateMachineTransition_umemc"), "Unactivated Idle", "Activate", SubResource("AnimationNodeStateMachineTransition_t3xhd"), "Activate", "Idle", SubResource("AnimationNodeStateMachineTransition_5jjkq"), "Primary Attack", "Idle", SubResource("AnimationNodeStateMachineTransition_keq07"), "Idle", "Primary Skill", SubResource("AnimationNodeStateMachineTransition_manul"), "Primary Skill", "Teleport In", SubResource("AnimationNodeStateMachineTransition_auprl"), "Teleport In", "Idle", SubResource("AnimationNodeStateMachineTransition_i5vf2"), "Idle", "Primary Attack", SubResource("AnimationNodeStateMachineTransition_jbhro"), "Stop Walk", "Idle", SubResource("AnimationNodeStateMachineTransition_yu6fp"), "Idle", "Walking", SubResource("AnimationNodeStateMachineTransition_sgkk0"), "Walking", "Stop Walk", SubResource("AnimationNodeStateMachineTransition_8e7of")]
|
||||
graph_offset = Vector2(-196.563, 38.1444)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_tawq7"]
|
||||
|
||||
@@ -29,12 +29,16 @@ public partial class Ambassador : Enemy2D, IHavePatrolBehavior, IHaveEngagePlaye
|
||||
FollowBehavior.OnVelocityComputed += OnVelocityComputed;
|
||||
EngagePlayerBehavior.TakeAction += EngagePlayerBehavior_TakeAction;
|
||||
EngagePlayerBehavior.AcquireTarget += EngagePlayerBehavior_AcquireTarget;
|
||||
_enemyLogic.Input(new EnemyLogic.Input.Patrol());
|
||||
PlayerDetector.BodyEntered += PlayerDetector_BodyEntered;
|
||||
PlayerDetector.BodyExited += PlayerDetector_BodyExited;
|
||||
SetPhysicsProcess(true);
|
||||
}
|
||||
|
||||
public void OnResolved()
|
||||
{
|
||||
_enemyLogic.Input(new EnemyLogic.Input.Patrol());
|
||||
}
|
||||
|
||||
public override void PerformAction()
|
||||
{
|
||||
var rng = new RandomNumberGenerator();
|
||||
|
||||
@@ -18,6 +18,7 @@ height = 5.0
|
||||
radius = 1.0
|
||||
|
||||
[sub_resource type="CylinderShape3D" id="CylinderShape3D_sjoyv"]
|
||||
radius = 1.75
|
||||
|
||||
[node name="Ambassador" type="CharacterBody3D"]
|
||||
process_mode = 1
|
||||
|
||||
@@ -1880,7 +1880,8 @@ script = ExtResource("1_h27bt")
|
||||
EnemyLoreInfo = SubResource("Resource_f45wt")
|
||||
|
||||
[node name="Sprite3D" type="Sprite3D" parent="."]
|
||||
transform = Transform3D(1.5, 0, 0, 0, 1.5, 0, 0, 0, 1.5, 0, 0.545209, 0)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.765249, 0)
|
||||
pixel_size = 0.02
|
||||
billboard = 2
|
||||
shaded = true
|
||||
texture_filter = 0
|
||||
|
||||
@@ -1882,10 +1882,10 @@ transitions = ["Start", "Idle", SubResource("AnimationNodeStateMachineTransition
|
||||
[node name="EnemyModelView" type="Node3D"]
|
||||
script = ExtResource("1_a8qtn")
|
||||
EnemyLoreInfo = SubResource("Resource_f45wt")
|
||||
_enemyDirection = 1
|
||||
|
||||
[node name="Sprite3D" type="Sprite3D" parent="."]
|
||||
transform = Transform3D(1.5, 0, 0, 0, 1.5, 0, 0, 0, 1.5, 0, 0.487989, 0)
|
||||
transform = Transform3D(1.5, 0, 0, 0, 1.5, 0, 0, 0, 1.5, 0, -0.941682, 0)
|
||||
pixel_size = 0.015
|
||||
billboard = 2
|
||||
shaded = true
|
||||
texture_filter = 0
|
||||
|
||||
@@ -1882,10 +1882,9 @@ transitions = ["Start", "Idle", SubResource("AnimationNodeStateMachineTransition
|
||||
[node name="EnemyModelView" type="Node3D"]
|
||||
script = ExtResource("1_s0qsg")
|
||||
EnemyLoreInfo = SubResource("Resource_f45wt")
|
||||
_enemyDirection = 1
|
||||
|
||||
[node name="Sprite3D" type="Sprite3D" parent="."]
|
||||
transform = Transform3D(1.5, 0, 0, 0, 1.5, 0, 0, 0, 1.5, 0, 0.561663, 0)
|
||||
transform = Transform3D(1.5, 0, 0, 0, 1.5, 0, 0, 0, 1.5, 0, -0.765249, 0)
|
||||
billboard = 2
|
||||
shaded = true
|
||||
texture_filter = 0
|
||||
|
||||
@@ -30,12 +30,13 @@ public partial class AgniDemon : Enemy2D, IHavePatrolBehavior, IHaveEngagePlayer
|
||||
FollowBehavior.OnVelocityComputed += OnVelocityComputed;
|
||||
EngagePlayerBehavior.TakeAction += EngagePlayerBehavior_TakeAction;
|
||||
EngagePlayerBehavior.AcquireTarget += EngagePlayerBehavior_AcquireTarget;
|
||||
_enemyLogic.Input(new EnemyLogic.Input.Patrol());
|
||||
PlayerDetector.BodyEntered += PlayerDetector_BodyEntered;
|
||||
PlayerDetector.BodyExited += PlayerDetector_BodyExited;
|
||||
SetPhysicsProcess(true);
|
||||
}
|
||||
|
||||
public override void Move() => EnemyModelView.PlayIdleAnimation();
|
||||
|
||||
public override void PerformAction()
|
||||
{
|
||||
var rng = new RandomNumberGenerator();
|
||||
@@ -43,4 +44,14 @@ public partial class AgniDemon : Enemy2D, IHavePatrolBehavior, IHaveEngagePlayer
|
||||
var selection = rng.RandWeighted([PrimaryAttackChance, SecondaryAttackChance]);
|
||||
options[(int)selection].Invoke();
|
||||
}
|
||||
|
||||
public override void _ExitTree()
|
||||
{
|
||||
PatrolBehavior.OnVelocityComputed -= OnVelocityComputed;
|
||||
FollowBehavior.OnVelocityComputed -= OnVelocityComputed;
|
||||
EngagePlayerBehavior.TakeAction -= EngagePlayerBehavior_TakeAction;
|
||||
EngagePlayerBehavior.AcquireTarget -= EngagePlayerBehavior_AcquireTarget;
|
||||
PlayerDetector.BodyEntered -= PlayerDetector_BodyEntered;
|
||||
PlayerDetector.BodyExited -= PlayerDetector_BodyExited;
|
||||
}
|
||||
}
|
||||
@@ -18,6 +18,7 @@ radius = 1.0
|
||||
radius = 1.20703
|
||||
|
||||
[sub_resource type="CylinderShape3D" id="CylinderShape3D_tbkej"]
|
||||
radius = 2.0
|
||||
|
||||
[node name="Agni" type="CharacterBody3D"]
|
||||
process_mode = 1
|
||||
|
||||
@@ -2264,7 +2264,7 @@ script = ExtResource("1_wl7dh")
|
||||
EnemyLoreInfo = SubResource("Resource_f45wt")
|
||||
|
||||
[node name="Sprite3D" type="Sprite3D" parent="."]
|
||||
transform = Transform3D(1.5, 0, 0, 0, 1.5, 0, 0, 0, 1.5, 0, 0.530475, 0)
|
||||
transform = Transform3D(1.5, 0, 0, 0, 1.5, 0, 0, 0, 1.5, 0, -1.11516, 0)
|
||||
billboard = 2
|
||||
texture_filter = 0
|
||||
render_priority = 100
|
||||
|
||||
@@ -30,12 +30,16 @@ public partial class Palan : Enemy2D, IHavePatrolBehavior, IHaveEngagePlayerBeha
|
||||
FollowBehavior.OnVelocityComputed += OnVelocityComputed;
|
||||
EngagePlayerBehavior.TakeAction += EngagePlayerBehavior_TakeAction;
|
||||
EngagePlayerBehavior.AcquireTarget += EngagePlayerBehavior_AcquireTarget;
|
||||
_enemyLogic.Input(new EnemyLogic.Input.Patrol());
|
||||
PlayerDetector.BodyEntered += PlayerDetector_BodyEntered;
|
||||
PlayerDetector.BodyExited += PlayerDetector_BodyExited;
|
||||
SetPhysicsProcess(true);
|
||||
}
|
||||
|
||||
public void OnResolved()
|
||||
{
|
||||
_enemyLogic.Input(new EnemyLogic.Input.Patrol());
|
||||
}
|
||||
|
||||
public override void PerformAction()
|
||||
{
|
||||
var rng = new RandomNumberGenerator();
|
||||
@@ -43,4 +47,14 @@ public partial class Palan : Enemy2D, IHavePatrolBehavior, IHaveEngagePlayerBeha
|
||||
var selection = rng.RandWeighted([PrimaryAttackChance, SecondaryAttackChance]);
|
||||
options[(int)selection].Invoke();
|
||||
}
|
||||
|
||||
public override void _ExitTree()
|
||||
{
|
||||
PatrolBehavior.OnVelocityComputed -= OnVelocityComputed;
|
||||
FollowBehavior.OnVelocityComputed -= OnVelocityComputed;
|
||||
EngagePlayerBehavior.TakeAction -= EngagePlayerBehavior_TakeAction;
|
||||
EngagePlayerBehavior.AcquireTarget -= EngagePlayerBehavior_AcquireTarget;
|
||||
PlayerDetector.BodyEntered -= PlayerDetector_BodyEntered;
|
||||
PlayerDetector.BodyExited -= PlayerDetector_BodyExited;
|
||||
}
|
||||
}
|
||||
@@ -18,6 +18,7 @@ radius = 1.0
|
||||
radius = 1.20703
|
||||
|
||||
[sub_resource type="CylinderShape3D" id="CylinderShape3D_c82i6"]
|
||||
radius = 2.5
|
||||
|
||||
[node name="Palan" type="CharacterBody3D"]
|
||||
process_mode = 1
|
||||
|
||||
@@ -1648,7 +1648,7 @@ tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [14]
|
||||
"values": [0]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_0qt6f"]
|
||||
@@ -2212,7 +2212,7 @@ animations = [{
|
||||
script = ExtResource("1_yke7o")
|
||||
|
||||
[node name="Sprite3D" type="Sprite3D" parent="."]
|
||||
transform = Transform3D(1.5, 0, 0, 0, 1.5, 0, 0, 0, 1.5, 0, 1.5643, 0)
|
||||
transform = Transform3D(1.5, 0, 0, 0, 1.5, 0, 0, 0, 1.5, 0, 0.0366734, 0)
|
||||
pixel_size = 0.005
|
||||
billboard = 1
|
||||
alpha_cut = 1
|
||||
@@ -2270,13 +2270,12 @@ libraries = {
|
||||
}
|
||||
|
||||
[node name="Sunblast" type="AnimatedSprite3D" parent="AnimationPlayer2"]
|
||||
transform = Transform3D(0.335, 0, 0, 0, 0.335, 0, 0, 0, 0.335, -0.546079, 1.9693, 0)
|
||||
transform = Transform3D(0.335, 0, 0, 0, 0.335, 0, 0, 0, 0.335, -0.546079, 0.441674, 0)
|
||||
sprite_frames = SubResource("SpriteFrames_skutu")
|
||||
frame = 15
|
||||
|
||||
[node name="Primary Attack" type="AnimatedSprite3D" parent="AnimationPlayer2"]
|
||||
transform = Transform3D(0.275, 0, 0, 0, 0.275, 0, 0, 0, 0.275, 0, 2.86574, -0.317864)
|
||||
transform = Transform3D(0.275, 0, 0, 0, 0.275, 0, 0, 0, 0.275, 0, 1.33811, -0.317864)
|
||||
billboard = 1
|
||||
render_priority = 102
|
||||
sprite_frames = SubResource("SpriteFrames_j3g1o")
|
||||
frame = 14
|
||||
|
||||
@@ -3233,7 +3233,7 @@ animations = [{
|
||||
script = ExtResource("1_h8pla")
|
||||
|
||||
[node name="Sprite3D" type="Sprite3D" parent="."]
|
||||
transform = Transform3D(1.5, 0, 0, 0, 1.5, 0, 0, 0, 1.5, 0, 3.8716, 0)
|
||||
transform = Transform3D(1.5, 0, 0, 0, 1.5, 0, 0, 0, 1.5, 0, 1.12245, 0)
|
||||
billboard = 2
|
||||
alpha_cut = 1
|
||||
texture_filter = 0
|
||||
@@ -3289,11 +3289,12 @@ libraries = {
|
||||
}
|
||||
|
||||
[node name="Attack 1 VFX" type="AnimatedSprite3D" parent="VFX Animation Player"]
|
||||
transform = Transform3D(1.5, 0, 0, 0, 1.5, 0, 0, 0, 1.5, 0, 3.8961, 0.733219)
|
||||
transform = Transform3D(1.5, 0, 0, 0, 1.5, 0, 0, 0, 1.5, 0, 1.14695, 0.733219)
|
||||
modulate = Color(1, 1, 1, 0.788235)
|
||||
billboard = 1
|
||||
texture_filter = 0
|
||||
sprite_frames = SubResource("SpriteFrames_ie7uh")
|
||||
|
||||
[node name="Attack 2 VFX" type="AnimatedSprite3D" parent="VFX Animation Player"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -2.74915, 0)
|
||||
sprite_frames = SubResource("SpriteFrames_lgwan")
|
||||
|
||||
@@ -24,9 +24,18 @@ public partial class ShieldOfHeaven : Enemy2D, IHavePatrolBehavior, IHaveEngageP
|
||||
FollowBehavior.OnVelocityComputed += OnVelocityComputed;
|
||||
EngagePlayerBehavior.TakeAction += EngagePlayerBehavior_TakeAction;
|
||||
EngagePlayerBehavior.AcquireTarget += EngagePlayerBehavior_AcquireTarget;
|
||||
_enemyLogic.Input(new EnemyLogic.Input.Patrol());
|
||||
PlayerDetector.BodyEntered += PlayerDetector_BodyEntered;
|
||||
PlayerDetector.BodyExited += PlayerDetector_BodyExited;
|
||||
SetPhysicsProcess(true);
|
||||
}
|
||||
|
||||
public override void _ExitTree()
|
||||
{
|
||||
PatrolBehavior.OnVelocityComputed -= OnVelocityComputed;
|
||||
FollowBehavior.OnVelocityComputed -= OnVelocityComputed;
|
||||
EngagePlayerBehavior.TakeAction -= EngagePlayerBehavior_TakeAction;
|
||||
EngagePlayerBehavior.AcquireTarget -= EngagePlayerBehavior_AcquireTarget;
|
||||
PlayerDetector.BodyEntered -= PlayerDetector_BodyEntered;
|
||||
PlayerDetector.BodyExited -= PlayerDetector_BodyExited;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=9 format=3 uid="uid://5s7c4dsb1wwk"]
|
||||
[gd_scene load_steps=10 format=3 uid="uid://5s7c4dsb1wwk"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cjdivu0v1kfhy" path="res://src/enemy/enemy_types/12. Shield of Heaven/ShieldOfHeaven.cs" id="1_oxa5b"]
|
||||
[ext_resource type="PackedScene" uid="uid://drkaq6grim1fb" path="res://src/enemy/enemy_types/12. Shield of Heaven/ShieldModelView.tscn" id="3_r2swr"]
|
||||
@@ -14,6 +14,9 @@ height = 2.02807
|
||||
height = 5.0
|
||||
radius = 1.0
|
||||
|
||||
[sub_resource type="CylinderShape3D" id="CylinderShape3D_d5a6t"]
|
||||
radius = 2.5
|
||||
|
||||
[sub_resource type="SphereShape3D" id="SphereShape3D_8vcnq"]
|
||||
radius = 1.20703
|
||||
|
||||
@@ -46,6 +49,14 @@ transform = Transform3D(-1, 0, 8.74228e-08, 0, 1, 0, -8.74228e-08, 0, -1, 0, 0,
|
||||
target_position = Vector3(0, 0, -5)
|
||||
collision_mask = 3
|
||||
|
||||
[node name="PlayerDetector" type="Area3D" parent="."]
|
||||
unique_name_in_owner = true
|
||||
collision_layer = 0
|
||||
collision_mask = 34
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="PlayerDetector"]
|
||||
shape = SubResource("CylinderShape3D_d5a6t")
|
||||
|
||||
[node name="Collision" type="Area3D" parent="."]
|
||||
collision_layer = 2048
|
||||
collision_mask = 0
|
||||
|
||||
@@ -1,26 +1,49 @@
|
||||
using Chickensoft.AutoInject;
|
||||
using Chickensoft.Introspection;
|
||||
using Godot;
|
||||
using System;
|
||||
using Zennysoft.Game.Ma;
|
||||
using Zennysoft.Ma.Adapter;
|
||||
|
||||
[Meta(typeof(IAutoNode))]
|
||||
public partial class GoldSproingy : Enemy2D, IHavePatrolBehavior
|
||||
public partial class GoldSproingy : Enemy2D, IHavePatrolBehavior, IHaveFleeBehavior
|
||||
{
|
||||
public override void _Notification(int what) => this.Notify(what);
|
||||
|
||||
[Node] public NavigationAgent3D NavigationAgent { get; set; }
|
||||
[Node] public PatrolBehavior PatrolBehavior { get; set; } = default!;
|
||||
[Node] public FleeBehavior FleeBehavior { get; set; } = default!;
|
||||
|
||||
[Node] public Area3D PlayerDetector { get; set; } = default!;
|
||||
|
||||
public void OnReady()
|
||||
{
|
||||
PatrolBehavior.Init(NavigationAgent);
|
||||
FleeBehavior.Init(NavigationAgent);
|
||||
PatrolBehavior.HomePosition = GlobalPosition;
|
||||
PatrolBehavior.OnVelocityComputed += OnVelocityComputed;
|
||||
_enemyLogic.Input(new EnemyLogic.Input.Patrol());
|
||||
PlayerDetector.BodyEntered += PlayerDetector_BodyEntered;
|
||||
PlayerDetector.BodyExited += PlayerDetector_BodyExited;
|
||||
FleeBehavior.OnVelocityComputed += OnVelocityComputed;
|
||||
PlayerDetector.BodyEntered += GoldSproingyFlee;
|
||||
SetPhysicsProcess(true);
|
||||
}
|
||||
|
||||
private void GoldSproingyFlee(Node3D body)
|
||||
{
|
||||
if (body is IPlayer)
|
||||
_enemyLogic.Input(new EnemyLogic.Input.Flee());
|
||||
}
|
||||
|
||||
public void OnResolved()
|
||||
{
|
||||
_enemyLogic.Input(new EnemyLogic.Input.Patrol());
|
||||
}
|
||||
|
||||
public override void Move() => EnemyModelView.PlayIdleAnimation();
|
||||
|
||||
public override void _ExitTree()
|
||||
{
|
||||
PatrolBehavior.OnVelocityComputed -= OnVelocityComputed;
|
||||
PlayerDetector.BodyEntered -= PlayerDetector_BodyEntered;
|
||||
PlayerDetector.BodyExited -= PlayerDetector_BodyExited;
|
||||
}
|
||||
}
|
||||
@@ -1,26 +1,35 @@
|
||||
[gd_scene load_steps=8 format=3 uid="uid://b3giib0jp3uod"]
|
||||
[gd_scene load_steps=11 format=3 uid="uid://c5ugpasira53m"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://jjulhqd5g3be" path="res://src/enemy/enemy_types/13. gold sproingy/GoldSproingy.cs" id="1_o1o4d"]
|
||||
[ext_resource type="PackedScene" uid="uid://c5asojy73n44d" path="res://src/enemy/enemy_types/13. gold sproingy/GoldSproingyModelView.tscn" id="4_58d4o"]
|
||||
[ext_resource type="PackedScene" uid="uid://2nkvacxsd46b" path="res://src/enemy/behaviors/PatrolBehavior.tscn" id="4_ik3p4"]
|
||||
[ext_resource type="PackedScene" uid="uid://dobiqowi8mhfi" path="res://src/enemy/enemy_types/13. gold sproingy/GoldSproingyModelView.tscn" id="2_o1o4d"]
|
||||
[ext_resource type="PackedScene" uid="uid://2nkvacxsd46b" path="res://src/enemy/behaviors/PatrolBehavior.tscn" id="3_dxqkk"]
|
||||
[ext_resource type="PackedScene" uid="uid://g4cupevu280j" path="res://src/enemy/behaviors/FleeBehavior.tscn" id="4_58d4o"]
|
||||
|
||||
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_cwfph"]
|
||||
radius = 0.106078
|
||||
height = 1.23076
|
||||
|
||||
[sub_resource type="SphereShape3D" id="SphereShape3D_8vcnq"]
|
||||
radius = 0.365183
|
||||
|
||||
[sub_resource type="CylinderShape3D" id="CylinderShape3D_jbgmx"]
|
||||
height = 5.0
|
||||
radius = 1.0
|
||||
|
||||
[sub_resource type="SphereShape3D" id="SphereShape3D_8vcnq"]
|
||||
radius = 0.57308
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_p4gkk"]
|
||||
transparency = 1
|
||||
albedo_color = Color(0.988235, 0, 0.054902, 0.152941)
|
||||
|
||||
[sub_resource type="CylinderShape3D" id="CylinderShape3D_58d4o"]
|
||||
[sub_resource type="CylinderMesh" id="CylinderMesh_drfkj"]
|
||||
material = SubResource("StandardMaterial3D_p4gkk")
|
||||
top_radius = 0.0
|
||||
|
||||
[sub_resource type="CylinderShape3D" id="CylinderShape3D_drfkj"]
|
||||
radius = 1.0
|
||||
|
||||
[node name="GoldSproingy" type="CharacterBody3D"]
|
||||
process_mode = 1
|
||||
collision_layer = 10
|
||||
collision_mask = 3
|
||||
collision_layer = 11
|
||||
axis_lock_linear_y = true
|
||||
axis_lock_angular_x = true
|
||||
axis_lock_angular_z = true
|
||||
@@ -31,22 +40,6 @@ unique_name_in_owner = true
|
||||
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 0, 0)
|
||||
shape = SubResource("CapsuleShape3D_cwfph")
|
||||
|
||||
[node name="LineOfSight" type="Area3D" parent="."]
|
||||
unique_name_in_owner = true
|
||||
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 0, 0)
|
||||
collision_layer = 2
|
||||
collision_mask = 2
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="LineOfSight"]
|
||||
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0, 0, -2)
|
||||
shape = SubResource("CylinderShape3D_jbgmx")
|
||||
|
||||
[node name="Raycast" type="RayCast3D" parent="LineOfSight"]
|
||||
unique_name_in_owner = true
|
||||
transform = Transform3D(-1, 0, 8.74228e-08, 0, 1, 0, -8.74228e-08, 0, -1, 0, 0, 0)
|
||||
target_position = Vector3(0, 0, -5)
|
||||
collision_mask = 3
|
||||
|
||||
[node name="Collision" type="Node3D" parent="."]
|
||||
|
||||
[node name="Collision" type="Area3D" parent="Collision"]
|
||||
@@ -56,22 +49,45 @@ collision_mask = 0
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="Collision/Collision"]
|
||||
shape = SubResource("SphereShape3D_8vcnq")
|
||||
|
||||
[node name="Visual" type="Node3D" parent="."]
|
||||
|
||||
[node name="EnemyModelView" parent="Visual" instance=ExtResource("4_58d4o")]
|
||||
[node name="LineOfSight" type="Area3D" parent="Collision"]
|
||||
unique_name_in_owner = true
|
||||
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 0, 0)
|
||||
collision_layer = 2
|
||||
collision_mask = 2
|
||||
|
||||
[node name="PlayerDetector" type="Area3D" parent="."]
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="Collision/LineOfSight"]
|
||||
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0, 0, -2)
|
||||
shape = SubResource("CylinderShape3D_jbgmx")
|
||||
|
||||
[node name="DebugCone" type="MeshInstance3D" parent="Collision/LineOfSight"]
|
||||
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, -1, 0, 1, -4.37114e-08, 1.27175e-07, 0, -1.45472)
|
||||
visible = false
|
||||
mesh = SubResource("CylinderMesh_drfkj")
|
||||
|
||||
[node name="Raycast" type="RayCast3D" parent="Collision"]
|
||||
unique_name_in_owner = true
|
||||
target_position = Vector3(0, 0, -5)
|
||||
collision_mask = 3
|
||||
|
||||
[node name="PlayerDetector" type="Area3D" parent="Collision"]
|
||||
unique_name_in_owner = true
|
||||
collision_layer = 0
|
||||
collision_mask = 34
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="PlayerDetector"]
|
||||
shape = SubResource("CylinderShape3D_58d4o")
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="Collision/PlayerDetector"]
|
||||
shape = SubResource("CylinderShape3D_drfkj")
|
||||
|
||||
[node name="Visual" type="Node3D" parent="."]
|
||||
|
||||
[node name="EnemyModelView" parent="Visual" instance=ExtResource("2_o1o4d")]
|
||||
unique_name_in_owner = true
|
||||
|
||||
[node name="Components" type="Node3D" parent="."]
|
||||
|
||||
[node name="PatrolBehavior" parent="Components" instance=ExtResource("4_ik3p4")]
|
||||
[node name="PatrolBehavior" parent="Components" instance=ExtResource("3_dxqkk")]
|
||||
unique_name_in_owner = true
|
||||
|
||||
[node name="FleeBehavior" parent="Components" instance=ExtResource("4_58d4o")]
|
||||
unique_name_in_owner = true
|
||||
|
||||
[node name="NavigationAgent" type="NavigationAgent3D" parent="Components"]
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
[gd_scene load_steps=115 format=3 uid="uid://c5asojy73n44d"]
|
||||
[gd_scene load_steps=68 format=3 uid="uid://dobiqowi8mhfi"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cvr1qimxpignl" path="res://src/enemy/EnemyModelView2D.cs" id="1_mnn74"]
|
||||
[ext_resource type="Script" uid="uid://dlsgyx4i1jmp3" path="res://src/enemy/EnemyLoreInfo.cs" id="2_e7c5t"]
|
||||
[ext_resource type="Script" uid="uid://cvr1qimxpignl" path="res://src/enemy/EnemyModelView2D.cs" id="1_7w22e"]
|
||||
[ext_resource type="Script" uid="uid://dlsgyx4i1jmp3" path="res://src/enemy/EnemyLoreInfo.cs" id="2_ca1o5"]
|
||||
[ext_resource type="Script" uid="uid://ctshiyffvt4y5" path="res://src/system/AttackDataResource.cs" id="3_3rk4a"]
|
||||
[ext_resource type="Texture2D" uid="uid://bokmaslnp1a4u" path="res://src/enemy/enemy_types/13. gold sproingy/animations/GOLD_SPROING_FRONT/Layer 1.png" id="3_kfpgw"]
|
||||
[ext_resource type="Texture2D" uid="uid://bi5by5os5u7py" path="res://src/enemy/enemy_types/13. gold sproingy/animations/GOLD_SPROING_BACK/Layer 1.png" id="3_w6gcy"]
|
||||
[ext_resource type="Texture2D" uid="uid://ca5uvl08g0147" path="res://src/enemy/enemy_types/13. gold sproingy/animations/GOLD_SPROING_BACK/Layer 2.png" id="4_2o8qa"]
|
||||
[ext_resource type="Material" uid="uid://x2bv1q51mcjq" path="res://src/enemy/PixelMelt.tres" id="4_12m8q"]
|
||||
[ext_resource type="Texture2D" uid="uid://buwrmhexeytku" path="res://src/enemy/enemy_types/13. gold sproingy/animations/GOLD_SPROING_FRONT/Layer 2.png" id="4_de1qi"]
|
||||
[ext_resource type="Texture2D" uid="uid://bu7magdloqfd6" path="res://src/enemy/enemy_types/13. gold sproingy/animations/GOLD_SPROING_FRONT/Layer 3.png" id="5_8fppi"]
|
||||
[ext_resource type="Texture2D" uid="uid://c4y2y1tttb1to" path="res://src/enemy/enemy_types/13. gold sproingy/animations/GOLD_SPROING_BACK/Layer 3.png" id="5_pa2de"]
|
||||
@@ -47,22 +49,24 @@
|
||||
[ext_resource type="Texture2D" uid="uid://cssrkfehdhgp5" path="res://src/enemy/enemy_types/13. gold sproingy/animations/GOLD_SPROING_SIDE/Layer 13.png" id="30_lcdw8"]
|
||||
[ext_resource type="Texture2D" uid="uid://dl12u2wcp0fkb" path="res://src/enemy/enemy_types/13. gold sproingy/animations/GOLD_SPROING_SIDE/Layer 14.png" id="31_ie1nt"]
|
||||
[ext_resource type="Texture2D" uid="uid://bcu6ei8kbcv2w" path="res://src/enemy/enemy_types/13. gold sproingy/animations/GOLD_SPROING_SIDE/Layer 15.png" id="32_u2p8a"]
|
||||
[ext_resource type="Texture2D" uid="uid://08wt71swke3c" path="res://src/enemy/enemy_types/13. gold sproingy/animations/sproing sparkle sheet.png" id="50_pa2de"]
|
||||
[ext_resource type="AnimationNodeStateMachine" uid="uid://co7lshemjrro8" path="res://src/enemy/animation_state_machines/IdleStateMachine.tres" id="50_smvnd"]
|
||||
[ext_resource type="AnimationNodeStateMachine" uid="uid://cy2ngl55c0rws" path="res://src/enemy/animation_state_machines/WalkingStateMachine.tres" id="51_fynbp"]
|
||||
[ext_resource type="PackedScene" uid="uid://dpoonda2dwwic" path="res://src/enemy/BasicEnemyAnimationTree.tscn" id="59_gqipt"]
|
||||
[ext_resource type="AnimationNodeStateMachine" uid="uid://co7lshemjrro8" path="res://src/enemy/animation_state_machines/IdleStateMachine.tres" id="60_uwoec"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_ivy74"]
|
||||
script = ExtResource("2_e7c5t")
|
||||
script = ExtResource("2_ca1o5")
|
||||
Name = "Sproingy"
|
||||
Description = "He's smaller than I expected..."
|
||||
metadata/_custom_type_script = "uid://dlsgyx4i1jmp3"
|
||||
|
||||
[sub_resource type="ViewportTexture" id="ViewportTexture_h1kaf"]
|
||||
[sub_resource type="Resource" id="Resource_8wbs7"]
|
||||
script = ExtResource("3_3rk4a")
|
||||
Damage = 10
|
||||
ElementType = 0
|
||||
metadata/_custom_type_script = "uid://ctshiyffvt4y5"
|
||||
|
||||
[sub_resource type="ViewportTexture" id="ViewportTexture_etb7g"]
|
||||
viewport_path = NodePath("Sprite3D/SubViewportContainer/SubViewport")
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_6drt6"]
|
||||
resource_local_to_scene = true
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_hypby"]
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
@@ -220,6 +224,7 @@ size = Vector3(1, 0.565, 2)
|
||||
|
||||
[sub_resource type="Animation" id="Animation_ch8ic"]
|
||||
length = 0.001
|
||||
step = 0.0833333
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
@@ -235,37 +240,25 @@ tracks/0/keys = {
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("Sprite3D/SubViewportContainer/SubViewport/AnimatedSprite:frame")
|
||||
tracks/1/path = NodePath("Hitbox/CollisionShape3D:disabled")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [0]
|
||||
"values": [true]
|
||||
}
|
||||
tracks/2/type = "value"
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/path = NodePath("Hitbox/CollisionShape3D:disabled")
|
||||
tracks/2/path = NodePath("Sprite3D/SubViewportContainer/SubViewport/AnimatedSprite:flip_h")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [true]
|
||||
}
|
||||
tracks/3/type = "value"
|
||||
tracks/3/imported = false
|
||||
tracks/3/enabled = true
|
||||
tracks/3/path = NodePath("Sprite3D/SubViewportContainer/SubViewport/AnimatedSprite:flip_h")
|
||||
tracks/3/interp = 1
|
||||
tracks/3/loop_wrap = true
|
||||
tracks/3/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [false]
|
||||
}
|
||||
|
||||
@@ -299,36 +292,6 @@ tracks/1/keys = {
|
||||
"values": [0, 14]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_1tda5"]
|
||||
resource_name = "idle_back_walk"
|
||||
length = 1.16667
|
||||
loop_mode = 1
|
||||
step = 0.0833333
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("Sprite3D/SubViewportContainer/SubViewport/AnimatedSprite:animation")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [&"idle_back_walk"]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("Sprite3D/SubViewportContainer/SubViewport/AnimatedSprite:frame")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0, 1.16667),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [0, 14]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_53wuj"]
|
||||
resource_name = "idle_front"
|
||||
length = 1.16667
|
||||
@@ -359,36 +322,6 @@ tracks/1/keys = {
|
||||
"values": [0, 14]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_31nry"]
|
||||
resource_name = "idle_front_walk"
|
||||
length = 1.16667
|
||||
loop_mode = 1
|
||||
step = 0.0833333
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("Sprite3D/SubViewportContainer/SubViewport/AnimatedSprite:animation")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [&"idle_front_walk"]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("Sprite3D/SubViewportContainer/SubViewport/AnimatedSprite:frame")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0, 1.16667),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [0, 14]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_fpvxl"]
|
||||
resource_name = "idle_left"
|
||||
length = 1.16667
|
||||
@@ -418,35 +351,17 @@ tracks/1/keys = {
|
||||
"update": 1,
|
||||
"values": [&"idle_left_walk"]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_1870e"]
|
||||
resource_name = "idle_left_walk"
|
||||
length = 1.16667
|
||||
loop_mode = 1
|
||||
step = 0.0833333
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("Sprite3D/SubViewportContainer/SubViewport/AnimatedSprite:frame")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 1.16667),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [0, 14]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("Sprite3D/SubViewportContainer/SubViewport/AnimatedSprite:animation")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
tracks/2/type = "value"
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/path = NodePath("Sprite3D/SubViewportContainer/SubViewport/AnimatedSprite:flip_h")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [&"idle_left_walk"]
|
||||
"values": [false]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_ni60h"]
|
||||
@@ -469,32 +384,72 @@ tracks/0/keys = {
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("Sprite3D/SubViewportContainer/SubViewport/AnimatedSprite:animation")
|
||||
tracks/1/path = NodePath("Sprite3D/SubViewportContainer/SubViewport/AnimatedSprite:flip_h")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [&"idle_left_walk"]
|
||||
"values": [true]
|
||||
}
|
||||
tracks/2/type = "value"
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/path = NodePath("Sprite3D/SubViewportContainer/SubViewport/AnimatedSprite:flip_h")
|
||||
tracks/2/path = NodePath("Sprite3D/SubViewportContainer/SubViewport/AnimatedSprite:animation")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [true]
|
||||
"values": [&"idle_left_walk"]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_7hf3j"]
|
||||
resource_name = "idle_right_walk"
|
||||
length = 1.16667
|
||||
loop_mode = 1
|
||||
[sub_resource type="Animation" id="Animation_ruc6s"]
|
||||
resource_name = "attack"
|
||||
length = 0.750008
|
||||
step = 0.0833333
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("Sprite3D/SubViewportContainer/SubViewport/AnimatedSprite:animation")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [&"attack"]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("Sprite3D/SubViewportContainer/SubViewport/AnimatedSprite:frame")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0, 0.75),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [0, 9]
|
||||
}
|
||||
tracks/2/type = "value"
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/path = NodePath("Hitbox/CollisionShape3D:disabled")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
"times": PackedFloat32Array(0, 0.332842, 0.66857),
|
||||
"transitions": PackedFloat32Array(1, 1, 1),
|
||||
"update": 1,
|
||||
"values": [true, false, true]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_djeua"]
|
||||
resource_name = "primary_attack_back"
|
||||
length = 0.750008
|
||||
step = 0.0833333
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
@@ -503,22 +458,104 @@ tracks/0/path = NodePath("Sprite3D/SubViewportContainer/SubViewport/AnimatedSpri
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 1.16667),
|
||||
"times": PackedFloat32Array(0, 0.75),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [0, 14]
|
||||
"values": [0, 9]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("Sprite3D/SubViewportContainer/SubViewport/AnimatedSprite:animation")
|
||||
tracks/1/path = NodePath("Hitbox/CollisionShape3D:disabled")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0, 0.332842, 0.66857),
|
||||
"transitions": PackedFloat32Array(1, 1, 1),
|
||||
"update": 1,
|
||||
"values": [true, false, true]
|
||||
}
|
||||
tracks/2/type = "value"
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/path = NodePath("Sprite3D/SubViewportContainer/SubViewport/AnimatedSprite:animation")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [&"idle_left_walk"]
|
||||
"values": [&"attack"]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_ivy74"]
|
||||
resource_name = "primary_attack_left"
|
||||
length = 0.750008
|
||||
step = 0.0833333
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("Sprite3D/SubViewportContainer/SubViewport/AnimatedSprite:frame")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 0.75),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [0, 9]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("Hitbox/CollisionShape3D:disabled")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0, 0.332842, 0.66857),
|
||||
"transitions": PackedFloat32Array(1, 1, 1),
|
||||
"update": 1,
|
||||
"values": [true, false, true]
|
||||
}
|
||||
tracks/2/type = "value"
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/path = NodePath("Sprite3D/SubViewportContainer/SubViewport/AnimatedSprite:animation")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [&"attack"]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_x7uye"]
|
||||
resource_name = "primary_attack_right"
|
||||
length = 0.750008
|
||||
step = 0.0833333
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("Sprite3D/SubViewportContainer/SubViewport/AnimatedSprite:frame")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 0.75),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [0, 9]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("Hitbox/CollisionShape3D:disabled")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0, 0.332842, 0.66857),
|
||||
"transitions": PackedFloat32Array(1, 1, 1),
|
||||
"update": 1,
|
||||
"values": [true, false, true]
|
||||
}
|
||||
tracks/2/type = "value"
|
||||
tracks/2/imported = false
|
||||
@@ -532,362 +569,55 @@ tracks/2/keys = {
|
||||
"update": 1,
|
||||
"values": [true]
|
||||
}
|
||||
tracks/3/type = "value"
|
||||
tracks/3/imported = false
|
||||
tracks/3/enabled = true
|
||||
tracks/3/path = NodePath("Sprite3D/SubViewportContainer/SubViewport/AnimatedSprite:animation")
|
||||
tracks/3/interp = 1
|
||||
tracks/3/loop_wrap = true
|
||||
tracks/3/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [&"attack"]
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_6tj5r"]
|
||||
_data = {
|
||||
&"RESET": SubResource("Animation_ch8ic"),
|
||||
&"idle_back": SubResource("Animation_d5bmw"),
|
||||
&"idle_back_walk": SubResource("Animation_1tda5"),
|
||||
&"idle_front": SubResource("Animation_53wuj"),
|
||||
&"idle_front_walk": SubResource("Animation_31nry"),
|
||||
&"idle_left": SubResource("Animation_fpvxl"),
|
||||
&"idle_left_walk": SubResource("Animation_1870e"),
|
||||
&"idle_right": SubResource("Animation_ni60h"),
|
||||
&"idle_right_walk": SubResource("Animation_7hf3j")
|
||||
&"primary_attack": SubResource("Animation_ruc6s"),
|
||||
&"primary_attack_back": SubResource("Animation_djeua"),
|
||||
&"primary_attack_left": SubResource("Animation_ivy74"),
|
||||
&"primary_attack_right": SubResource("Animation_x7uye")
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_fynbp"]
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_djeua"]
|
||||
advance_mode = 2
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_bxjfw"]
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_w6rvj"]
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachine" id="AnimationNodeStateMachine_bxjfw"]
|
||||
states/Idle/node = ExtResource("50_smvnd")
|
||||
states/Idle/position = Vector2(399, 100)
|
||||
states/Wallking/node = ExtResource("51_fynbp")
|
||||
states/Wallking/position = Vector2(593, 100)
|
||||
transitions = ["Start", "Idle", SubResource("AnimationNodeStateMachineTransition_fynbp"), "Idle", "Wallking", SubResource("AnimationNodeStateMachineTransition_bxjfw"), "Wallking", "Idle", SubResource("AnimationNodeStateMachineTransition_w6rvj")]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_smvnd"]
|
||||
atlas = ExtResource("50_pa2de")
|
||||
region = Rect2(400, 0, 400, 400)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_fynbp"]
|
||||
atlas = ExtResource("50_pa2de")
|
||||
region = Rect2(800, 0, 400, 400)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_bxjfw"]
|
||||
atlas = ExtResource("50_pa2de")
|
||||
region = Rect2(1200, 0, 400, 400)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_w6rvj"]
|
||||
atlas = ExtResource("50_pa2de")
|
||||
region = Rect2(1600, 0, 400, 400)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_naugu"]
|
||||
atlas = ExtResource("50_pa2de")
|
||||
region = Rect2(2000, 0, 400, 400)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_m1qvc"]
|
||||
atlas = ExtResource("50_pa2de")
|
||||
region = Rect2(2400, 0, 400, 400)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_xcupp"]
|
||||
atlas = ExtResource("50_pa2de")
|
||||
region = Rect2(2800, 0, 400, 400)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_ofrux"]
|
||||
atlas = ExtResource("50_pa2de")
|
||||
region = Rect2(3200, 0, 400, 400)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_dson0"]
|
||||
atlas = ExtResource("50_pa2de")
|
||||
region = Rect2(3600, 0, 400, 400)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_n6dfj"]
|
||||
atlas = ExtResource("50_pa2de")
|
||||
region = Rect2(4000, 0, 400, 400)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_etb7g"]
|
||||
atlas = ExtResource("50_pa2de")
|
||||
region = Rect2(4400, 0, 400, 400)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_1rte7"]
|
||||
atlas = ExtResource("50_pa2de")
|
||||
region = Rect2(4800, 0, 400, 400)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_kddwa"]
|
||||
atlas = ExtResource("50_pa2de")
|
||||
region = Rect2(5200, 0, 400, 400)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_cnghk"]
|
||||
atlas = ExtResource("50_pa2de")
|
||||
region = Rect2(5600, 0, 400, 400)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_vj77s"]
|
||||
atlas = ExtResource("50_pa2de")
|
||||
region = Rect2(6000, 0, 400, 400)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_fks4e"]
|
||||
atlas = ExtResource("50_pa2de")
|
||||
region = Rect2(6400, 0, 400, 400)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_hxvdw"]
|
||||
atlas = ExtResource("50_pa2de")
|
||||
region = Rect2(6800, 0, 400, 400)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_apil1"]
|
||||
atlas = ExtResource("50_pa2de")
|
||||
region = Rect2(7200, 0, 400, 400)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_3om1d"]
|
||||
atlas = ExtResource("50_pa2de")
|
||||
region = Rect2(7600, 0, 400, 400)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_0uq77"]
|
||||
atlas = ExtResource("50_pa2de")
|
||||
region = Rect2(8000, 0, 400, 400)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_xbmia"]
|
||||
atlas = ExtResource("50_pa2de")
|
||||
region = Rect2(8400, 0, 400, 400)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_slakp"]
|
||||
atlas = ExtResource("50_pa2de")
|
||||
region = Rect2(8800, 0, 400, 400)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_6t460"]
|
||||
atlas = ExtResource("50_pa2de")
|
||||
region = Rect2(9200, 0, 400, 400)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_usf0f"]
|
||||
atlas = ExtResource("50_pa2de")
|
||||
region = Rect2(0, 400, 400, 400)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_6rgs8"]
|
||||
atlas = ExtResource("50_pa2de")
|
||||
region = Rect2(400, 400, 400, 400)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_c4rjn"]
|
||||
atlas = ExtResource("50_pa2de")
|
||||
region = Rect2(800, 400, 400, 400)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_v1dp7"]
|
||||
atlas = ExtResource("50_pa2de")
|
||||
region = Rect2(1200, 400, 400, 400)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_wbyup"]
|
||||
atlas = ExtResource("50_pa2de")
|
||||
region = Rect2(1600, 400, 400, 400)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_78bbk"]
|
||||
atlas = ExtResource("50_pa2de")
|
||||
region = Rect2(2000, 400, 400, 400)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_boav0"]
|
||||
atlas = ExtResource("50_pa2de")
|
||||
region = Rect2(2400, 400, 400, 400)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_hmanv"]
|
||||
atlas = ExtResource("50_pa2de")
|
||||
region = Rect2(2800, 400, 400, 400)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_a7gbl"]
|
||||
atlas = ExtResource("50_pa2de")
|
||||
region = Rect2(3200, 400, 400, 400)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_dpqed"]
|
||||
atlas = ExtResource("50_pa2de")
|
||||
region = Rect2(3600, 400, 400, 400)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_5rrl5"]
|
||||
atlas = ExtResource("50_pa2de")
|
||||
region = Rect2(4000, 400, 400, 400)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_r6sry"]
|
||||
atlas = ExtResource("50_pa2de")
|
||||
region = Rect2(4400, 400, 400, 400)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_okh14"]
|
||||
atlas = ExtResource("50_pa2de")
|
||||
region = Rect2(4800, 400, 400, 400)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_h17a2"]
|
||||
atlas = ExtResource("50_pa2de")
|
||||
region = Rect2(5200, 400, 400, 400)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_ratqy"]
|
||||
atlas = ExtResource("50_pa2de")
|
||||
region = Rect2(5600, 400, 400, 400)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_w1tf3"]
|
||||
atlas = ExtResource("50_pa2de")
|
||||
region = Rect2(6000, 400, 400, 400)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_1nd1j"]
|
||||
atlas = ExtResource("50_pa2de")
|
||||
region = Rect2(6400, 400, 400, 400)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_tejdr"]
|
||||
atlas = ExtResource("50_pa2de")
|
||||
region = Rect2(6800, 400, 400, 400)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_cjclh"]
|
||||
atlas = ExtResource("50_pa2de")
|
||||
region = Rect2(7200, 400, 400, 400)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_k21cp"]
|
||||
atlas = ExtResource("50_pa2de")
|
||||
region = Rect2(7600, 400, 400, 400)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_wmd4r"]
|
||||
atlas = ExtResource("50_pa2de")
|
||||
region = Rect2(8000, 400, 400, 400)
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_e53m0"]
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_smvnd")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_fynbp")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_bxjfw")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_w6rvj")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_naugu")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_m1qvc")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_xcupp")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_ofrux")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_dson0")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_n6dfj")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_etb7g")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_1rte7")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_kddwa")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_cnghk")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_vj77s")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_fks4e")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_hxvdw")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_apil1")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_3om1d")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_0uq77")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_xbmia")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_slakp")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_6t460")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_usf0f")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_6rgs8")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_c4rjn")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_v1dp7")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_wbyup")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_78bbk")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_boav0")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_hmanv")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_a7gbl")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_dpqed")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_5rrl5")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_r6sry")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_okh14")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_h17a2")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_ratqy")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_w1tf3")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_1nd1j")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_tejdr")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_cjclh")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_k21cp")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_wmd4r")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"default",
|
||||
"speed": 22.0
|
||||
}]
|
||||
[sub_resource type="AnimationNodeStateMachine" id="AnimationNodeStateMachine_l2wq1"]
|
||||
states/Idle/node = ExtResource("60_uwoec")
|
||||
states/Idle/position = Vector2(453, 100)
|
||||
states/Start/position = Vector2(201, 100)
|
||||
transitions = ["Start", "Idle", SubResource("AnimationNodeStateMachineTransition_djeua")]
|
||||
|
||||
[node name="EnemyModelView" type="Node3D"]
|
||||
script = ExtResource("1_mnn74")
|
||||
script = ExtResource("1_7w22e")
|
||||
EnemyLoreInfo = SubResource("Resource_ivy74")
|
||||
AttackData = SubResource("Resource_8wbs7")
|
||||
|
||||
[node name="Sprite3D" type="Sprite3D" parent="."]
|
||||
transform = Transform3D(1.5, 0, 0, 0, 1.5, 0, 0, 0, 1.5, 0, 0, 0)
|
||||
pixel_size = 0.003
|
||||
transform = Transform3D(6, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0)
|
||||
pixel_size = 0.001
|
||||
billboard = 2
|
||||
shaded = true
|
||||
alpha_cut = 1
|
||||
texture_filter = 0
|
||||
render_priority = 100
|
||||
texture = SubResource("ViewportTexture_h1kaf")
|
||||
texture = SubResource("ViewportTexture_etb7g")
|
||||
|
||||
[node name="SubViewportContainer" type="SubViewportContainer" parent="Sprite3D"]
|
||||
visibility_layer = 0
|
||||
@@ -904,8 +634,9 @@ render_target_update_mode = 4
|
||||
[node name="AnimatedSprite" type="AnimatedSprite2D" parent="Sprite3D/SubViewportContainer/SubViewport"]
|
||||
unique_name_in_owner = true
|
||||
texture_filter = 1
|
||||
material = ExtResource("4_12m8q")
|
||||
position = Vector2(100, 100)
|
||||
sprite_frames = SubResource("SpriteFrames_6drt6")
|
||||
sprite_frames = SubResource("SpriteFrames_hypby")
|
||||
animation = &"idle_left_walk"
|
||||
|
||||
[node name="Hitbox" type="Area3D" parent="."]
|
||||
@@ -913,12 +644,12 @@ unique_name_in_owner = true
|
||||
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, -0.152949, 0, 0)
|
||||
collision_layer = 64
|
||||
collision_mask = 64
|
||||
script = ExtResource("58_ahls6")
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="Hitbox"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.189337, 0.217529, -1.45579)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.125, 0, -1)
|
||||
shape = SubResource("BoxShape3D_53wuj")
|
||||
disabled = true
|
||||
debug_color = Color(0.913666, 0.112039, 0.248501, 0.878431)
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||
unique_name_in_owner = true
|
||||
@@ -926,21 +657,9 @@ libraries = {
|
||||
&"": SubResource("AnimationLibrary_6tj5r")
|
||||
}
|
||||
|
||||
[node name="AnimationTree" parent="." instance=ExtResource("59_gqipt")]
|
||||
[node name="AnimationTree" type="AnimationTree" parent="."]
|
||||
unique_name_in_owner = true
|
||||
tree_root = SubResource("AnimationNodeStateMachine_bxjfw")
|
||||
root_node = NodePath("%AnimationTree/..")
|
||||
tree_root = SubResource("AnimationNodeStateMachine_l2wq1")
|
||||
advance_expression_base_node = NodePath("..")
|
||||
|
||||
[node name="AnimatedSprite3D" type="AnimatedSprite3D" parent="."]
|
||||
transform = Transform3D(0.37, 0, 0, 0, 0.37, 0, 0, 0, 0.37, -0.0374646, 0.291998, -1.19209e-07)
|
||||
modulate = Color(0.996453, 0.984302, 0.800092, 1)
|
||||
billboard = 2
|
||||
texture_filter = 0
|
||||
sprite_frames = SubResource("SpriteFrames_e53m0")
|
||||
autoplay = "default"
|
||||
frame_progress = 0.490257
|
||||
|
||||
[node name="OmniLight3D" type="OmniLight3D" parent="."]
|
||||
light_color = Color(1, 0.900808, 0.709448, 1)
|
||||
shadow_enabled = true
|
||||
omni_range = 1.095
|
||||
anim_player = NodePath("../AnimationPlayer")
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[gd_scene load_steps=10 format=3 uid="uid://dpq17ej06uah1"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://8f4alhh2ubvg" path="res://src/enemy/enemy_types/9b. Aqueos Demon/AqueosDemon.cs" id="1_wtipe"]
|
||||
[ext_resource type="Script" uid="uid://ccakkuoppaidy" path="res://src/enemy/enemy_types/9b. Aqueos Demon/AqueousDemon.cs" id="1_8b86o"]
|
||||
[ext_resource type="PackedScene" uid="uid://cu7n814hhtjwm" path="res://src/enemy/enemy_types/9b. Aqueos Demon/AqueosModelView.tscn" id="2_0hbxv"]
|
||||
[ext_resource type="PackedScene" uid="uid://2nkvacxsd46b" path="res://src/enemy/behaviors/PatrolBehavior.tscn" id="4_5pbfd"]
|
||||
[ext_resource type="PackedScene" uid="uid://mqj4jju3870v" path="res://src/enemy/behaviors/FollowBehavior.tscn" id="5_ha827"]
|
||||
@@ -18,6 +18,7 @@ radius = 1.0
|
||||
radius = 1.20703
|
||||
|
||||
[sub_resource type="CylinderShape3D" id="CylinderShape3D_gxowl"]
|
||||
radius = 2.0
|
||||
|
||||
[node name="AqueousDemon" type="CharacterBody3D"]
|
||||
process_mode = 1
|
||||
@@ -25,7 +26,7 @@ collision_layer = 10
|
||||
collision_mask = 11
|
||||
axis_lock_linear_y = true
|
||||
axis_lock_angular_x = true
|
||||
script = ExtResource("1_wtipe")
|
||||
script = ExtResource("1_8b86o")
|
||||
|
||||
[node name="CollisionShape" type="CollisionShape3D" parent="."]
|
||||
unique_name_in_owner = true
|
||||
|
||||
@@ -2062,10 +2062,9 @@ _data = {
|
||||
[node name="EnemyModelView" type="Node3D"]
|
||||
script = ExtResource("1_vf7er")
|
||||
EnemyLoreInfo = ExtResource("2_ejhrk")
|
||||
_enemyDirection = 1
|
||||
|
||||
[node name="Sprite3D" type="Sprite3D" parent="."]
|
||||
transform = Transform3D(1.5, 0, 0, 0, 1.5, 0, 0, 0, 1.5, 0, 0.516636, 0)
|
||||
transform = Transform3D(1.5, 0, 0, 0, 1.5, 0, 0, 0, 1.5, 0, -1.11516, 0)
|
||||
billboard = 2
|
||||
texture_filter = 0
|
||||
render_priority = 100
|
||||
|
||||
@@ -30,12 +30,13 @@ public partial class AqueousDemon : Enemy2D, IHavePatrolBehavior, IHaveEngagePla
|
||||
FollowBehavior.OnVelocityComputed += OnVelocityComputed;
|
||||
EngagePlayerBehavior.TakeAction += EngagePlayerBehavior_TakeAction;
|
||||
EngagePlayerBehavior.AcquireTarget += EngagePlayerBehavior_AcquireTarget;
|
||||
_enemyLogic.Input(new EnemyLogic.Input.Patrol());
|
||||
PlayerDetector.BodyEntered += PlayerDetector_BodyEntered;
|
||||
PlayerDetector.BodyExited += PlayerDetector_BodyExited;
|
||||
SetPhysicsProcess(true);
|
||||
}
|
||||
|
||||
public override void Move() => EnemyModelView.PlayIdleAnimation();
|
||||
|
||||
public override void PerformAction()
|
||||
{
|
||||
var rng = new RandomNumberGenerator();
|
||||
@@ -43,4 +44,14 @@ public partial class AqueousDemon : Enemy2D, IHavePatrolBehavior, IHaveEngagePla
|
||||
var selection = rng.RandWeighted([PrimaryAttackChance, SecondaryAttackChance]);
|
||||
options[(int)selection].Invoke();
|
||||
}
|
||||
|
||||
public override void _ExitTree()
|
||||
{
|
||||
PatrolBehavior.OnVelocityComputed -= OnVelocityComputed;
|
||||
FollowBehavior.OnVelocityComputed -= OnVelocityComputed;
|
||||
EngagePlayerBehavior.TakeAction -= EngagePlayerBehavior_TakeAction;
|
||||
EngagePlayerBehavior.AcquireTarget -= EngagePlayerBehavior_AcquireTarget;
|
||||
PlayerDetector.BodyEntered -= PlayerDetector_BodyEntered;
|
||||
PlayerDetector.BodyExited -= PlayerDetector_BodyExited;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
uid://ccakkuoppaidy
|
||||
@@ -15,6 +15,8 @@ public partial class EnemyLogic
|
||||
|
||||
public readonly record struct Patrol;
|
||||
|
||||
public readonly record struct Flee;
|
||||
|
||||
public readonly record struct Follow;
|
||||
|
||||
public readonly record struct Move;
|
||||
|
||||
@@ -9,29 +9,47 @@ public partial class EnemyLogic
|
||||
{
|
||||
[Meta, Id("enemy_logic_state_alive")]
|
||||
public abstract partial record Alive : State,
|
||||
IGet<Input.Idle>,
|
||||
IGet<Idle>,
|
||||
IGet<Move>,
|
||||
IGet<Patrol>,
|
||||
IGet<Follow>,
|
||||
IGet<Flee>,
|
||||
IGet<ReachedPlayer>,
|
||||
IGet<Input.LoseTrackOfTarget>,
|
||||
IGet<Input.Defeated>
|
||||
{
|
||||
public Transition On(in Reset input)
|
||||
{
|
||||
Output(new Output.ReturnToDefaultState());
|
||||
return To<Idle>();
|
||||
return ToSelf();
|
||||
}
|
||||
|
||||
public Transition On(in Input.Defeated input) => To<Defeated>();
|
||||
|
||||
public Transition On(in Input.Idle input) => To<Idle>();
|
||||
|
||||
public Transition On(in Follow _) => To<FollowPlayer>();
|
||||
|
||||
public Transition On(in ReachedPlayer input) => To<EngagePlayer>();
|
||||
public Transition On(in Flee _) => To<FleePlayer>();
|
||||
|
||||
public Transition On(in LoseTrackOfTarget input)
|
||||
{
|
||||
Output(new Output.ReturnToDefaultState());
|
||||
return To<Unactivated>();
|
||||
}
|
||||
|
||||
public Transition On(in ReachedPlayer input)
|
||||
{
|
||||
Output(new Output.Idle());
|
||||
return To<EngagePlayer>();
|
||||
}
|
||||
|
||||
public Transition On(in Patrol _) => To<Patrolling>();
|
||||
|
||||
public Transition On(in Idle input)
|
||||
{
|
||||
Output(new Output.Idle());
|
||||
return ToSelf();
|
||||
}
|
||||
|
||||
public Transition On(in Move input)
|
||||
{
|
||||
Output(new Output.Move());
|
||||
|
||||
@@ -16,17 +16,13 @@ public partial class EnemyLogic
|
||||
{
|
||||
var enemy = Get<IEnemy>();
|
||||
if (enemy is IHaveEngagePlayerBehavior engagePlayerEnemy)
|
||||
{
|
||||
engagePlayerEnemy.EngagePlayerBehavior.Engage();
|
||||
}
|
||||
});
|
||||
OnDetach(() =>
|
||||
{
|
||||
var enemy = Get<IEnemy>();
|
||||
if (enemy is IHaveEngagePlayerBehavior engagePlayerEnemy)
|
||||
{
|
||||
engagePlayerEnemy.EngagePlayerBehavior.Disengage();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
using Chickensoft.Introspection;
|
||||
using Zennysoft.Ma.Adapter.Entity;
|
||||
|
||||
namespace Zennysoft.Game.Ma;
|
||||
|
||||
public partial class EnemyLogic
|
||||
{
|
||||
public partial record State
|
||||
{
|
||||
[Meta, Id("enemy_logic_state_fleeplayer")]
|
||||
public partial record FleePlayer : Alive
|
||||
{
|
||||
public FleePlayer()
|
||||
{
|
||||
OnAttach(() =>
|
||||
{
|
||||
var enemy = Get<IEnemy>();
|
||||
if (enemy is IHaveFleeBehavior fleeEnemy)
|
||||
{
|
||||
fleeEnemy.FleeBehavior.StartFlee(fleeEnemy.NavigationAgent);
|
||||
Output(new Output.Move());
|
||||
}
|
||||
});
|
||||
OnDetach(() =>
|
||||
{
|
||||
var enemy = Get<IEnemy>();
|
||||
if (enemy is IHaveFleeBehavior fleeEnemy)
|
||||
{
|
||||
fleeEnemy.FleeBehavior.StopFlee();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8,7 +8,7 @@ public partial class EnemyLogic
|
||||
public partial record State
|
||||
{
|
||||
[Meta, Id("enemy_logic_state_followplayer")]
|
||||
public partial record FollowPlayer : Alive, IGet<Input.LoseTrackOfTarget>
|
||||
public partial record FollowPlayer : Alive
|
||||
{
|
||||
public FollowPlayer()
|
||||
{
|
||||
@@ -18,6 +18,7 @@ public partial class EnemyLogic
|
||||
if (enemy is IHaveFollowBehavior followEnemy)
|
||||
{
|
||||
followEnemy.FollowBehavior.StartFollow(followEnemy.NavigationAgent);
|
||||
Output(new Output.Move());
|
||||
}
|
||||
});
|
||||
OnDetach(() =>
|
||||
@@ -29,12 +30,6 @@ public partial class EnemyLogic
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public Transition On(in Input.LoseTrackOfTarget input)
|
||||
{
|
||||
Output(new Output.ReturnToDefaultState());
|
||||
return To<Idle>();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
using Chickensoft.Introspection;
|
||||
|
||||
namespace Zennysoft.Game.Ma;
|
||||
|
||||
public partial class EnemyLogic
|
||||
{
|
||||
public partial record State
|
||||
{
|
||||
[Meta, Id("enemy_logic_state_idle")]
|
||||
public partial record Idle : Alive
|
||||
{
|
||||
public Idle() => OnAttach(() => Output(new Output.Idle()));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
using Chickensoft.Introspection;
|
||||
using Zennysoft.Ma.Adapter.Entity;
|
||||
using static Zennysoft.Game.Ma.EnemyLogic.Input;
|
||||
|
||||
namespace Zennysoft.Game.Ma;
|
||||
|
||||
@@ -8,7 +9,7 @@ public partial class EnemyLogic
|
||||
public partial record State
|
||||
{
|
||||
[Meta, Id("enemy_logic_state_patrolling")]
|
||||
public partial record Patrolling : Alive
|
||||
public partial record Patrolling : Alive, IGet<Alert>
|
||||
{
|
||||
public Patrolling()
|
||||
{
|
||||
@@ -18,6 +19,7 @@ public partial class EnemyLogic
|
||||
if (enemy is IHavePatrolBehavior patrolEnemy)
|
||||
{
|
||||
patrolEnemy.PatrolBehavior.StartPatrol();
|
||||
Output(new Output.Move());
|
||||
}
|
||||
});
|
||||
OnDetach(() =>
|
||||
@@ -29,6 +31,8 @@ public partial class EnemyLogic
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public Transition On(in Alert _) => To<Activated>();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -134,6 +134,7 @@ public partial class Game : Node3D, IGame
|
||||
_instantiator = new Instantiator(GetTree());
|
||||
_player = _instantiator.LoadAndInstantiate<Player>("res://src/player/Player.tscn");
|
||||
_map = _instantiator.LoadAndInstantiate<Map>("res://src/map/Map.tscn");
|
||||
_map.SpawnPointCreated += MovePlayer;
|
||||
PauseContainer.AddChild((Player)_player);
|
||||
PauseContainer.AddChild((Map)_map);
|
||||
}
|
||||
@@ -167,8 +168,6 @@ public partial class Game : Node3D, IGame
|
||||
|
||||
GameRepo.IsPaused.Sync += IsPaused_Sync;
|
||||
InGameUI.PlayerInfoUI.Activate();
|
||||
|
||||
_map.SpawnPointCreated += MovePlayer;
|
||||
}
|
||||
|
||||
public void LoadExistingGame() => SaveFile.Load().ContinueWith((_) => CallDeferred(nameof(FinishedLoadingSaveFile)));
|
||||
|
||||
@@ -80,7 +80,7 @@ unique_name_in_owner = true
|
||||
script = ExtResource("2_00xd7")
|
||||
FolderName = "SetAFloors"
|
||||
FloorOdds = Array[float]([0.0, 1.0])
|
||||
Sproingy = 1.0
|
||||
GoldSproingy = 1.0
|
||||
|
||||
[node name="Overworld" type="Node" parent="MapOrder"]
|
||||
script = ExtResource("3_v14r0")
|
||||
|
||||
@@ -37,7 +37,8 @@ adjustment_brightness = 1.18
|
||||
adjustment_saturation = 0.7
|
||||
|
||||
[sub_resource type="CameraAttributesPractical" id="CameraAttributesPractical_yrcgx"]
|
||||
dof_blur_far_distance = 25.0
|
||||
dof_blur_far_enabled = true
|
||||
dof_blur_far_distance = 20.0
|
||||
|
||||
[sub_resource type="CylinderShape3D" id="CylinderShape3D_4sygy"]
|
||||
|
||||
@@ -74,7 +75,7 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -16.1611, -0.012, 24.1437)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -18.0285, -0.025, 63.8523)
|
||||
|
||||
[node name="Floor Exit A" parent="." instance=ExtResource("5_hkp1m")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 33.7339, -0.690582, -31.7724)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 33.9096, -0.064, -31.904)
|
||||
|
||||
[node name="Corridors" type="Node3D" parent="."]
|
||||
|
||||
@@ -144,12 +145,12 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -55.9383, 0, -24.0189)
|
||||
[node name="Node3D7" parent="Corridors" instance=ExtResource("6_hsujv")]
|
||||
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, -53.8223, 0, -6.01887)
|
||||
|
||||
[node name="Node3D40" parent="Corridors" instance=ExtResource("6_hsujv")]
|
||||
transform = Transform3D(1.31134e-07, 0, 1, 0, 1, 0, -1, 0, 1.31134e-07, -2.1267, 0.0096339, -18.6185)
|
||||
|
||||
[node name="Node3D8" parent="Corridors" instance=ExtResource("6_hsujv")]
|
||||
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, -53.8223, 0, -10.0189)
|
||||
|
||||
[node name="Node3D8" parent="Corridors/Node3D8" instance=ExtResource("6_hsujv")]
|
||||
transform = Transform3D(-1, 0, 8.74228e-08, 0, 1, 0, -8.74228e-08, 0, -1, -8.59965, -0.00168645, -51.6956)
|
||||
|
||||
[node name="Node3D9" parent="Corridors" instance=ExtResource("6_hsujv")]
|
||||
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, -53.8223, 0, -14.0189)
|
||||
|
||||
@@ -199,20 +200,11 @@ transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, -2.084
|
||||
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, -8.0497, 0, 51.9862)
|
||||
|
||||
[node name="Pit Room A" parent="." instance=ExtResource("12_4sygy")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -20.095, -0.075, -57.034)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -20.095, 0, -56.669)
|
||||
|
||||
[node name="Node3D" parent="." instance=ExtResource("12_hkp1m")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -30.1149, -0.0400015, 11.7445)
|
||||
|
||||
[node name="Node3D2" parent="." instance=ExtResource("12_hkp1m")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2.23557, -0.0400015, -57.3096)
|
||||
|
||||
[node name="Node3D3" parent="." instance=ExtResource("12_hkp1m")]
|
||||
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 16.3976, -0.0400015, -38.5484)
|
||||
|
||||
[node name="Node3D4" parent="." instance=ExtResource("12_hkp1m")]
|
||||
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, -20.5586, -0.0400015, -38.5557)
|
||||
|
||||
[node name="QuestTest" type="Area3D" parent="."]
|
||||
unique_name_in_owner = true
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -7.50048, 0, -2.16434)
|
||||
|
||||
@@ -4,12 +4,12 @@ importer="scene"
|
||||
importer_version=1
|
||||
type="PackedScene"
|
||||
uid="uid://dh8ji8g36mmx5"
|
||||
path="res://.godot/imported/a2-puer.glb-20bdcd533f2a6024a2fa1d9a726cae55.scn"
|
||||
path="res://.godot/imported/A2-Puer.glb-3b11ccd8f9ba6f91fbb05537c52490b0.scn"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://src/map/dungeon/models/Area 2/Puer/a2-puer.glb"
|
||||
dest_files=["res://.godot/imported/a2-puer.glb-20bdcd533f2a6024a2fa1d9a726cae55.scn"]
|
||||
source_file="res://src/map/dungeon/models/Area 2/Puer/A2-Puer.glb"
|
||||
dest_files=["res://.godot/imported/A2-Puer.glb-3b11ccd8f9ba6f91fbb05537c52490b0.scn"]
|
||||
|
||||
[params]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user