Minor fixes
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -112,6 +112,7 @@ public partial class Enemy : CharacterBody3D, IEnemy, IProvide<IEnemyLogic>
|
||||
|
||||
public virtual void TakeAction()
|
||||
{
|
||||
_enemyModelView.PlayPrimaryAttackAnimation();
|
||||
}
|
||||
|
||||
public virtual void SetTarget(Vector3 target)
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using Chickensoft.AutoInject;
|
||||
using Chickensoft.GodotNodeInterfaces;
|
||||
using Chickensoft.Introspection;
|
||||
using Godot;
|
||||
using System.Linq;
|
||||
|
||||
@@ -31,11 +31,11 @@ public partial class Sproingy : Enemy, IHasPrimaryAttack, ICanPatrol
|
||||
if (_enemyLogic.Value is not EnemyLogic.State.Activated)
|
||||
return;
|
||||
|
||||
if (_enemyLogic.Value is EnemyLogic.State.FollowPlayer && GlobalPosition.DistanceTo(_player.CurrentPosition) < 1.5f)
|
||||
if (_enemyLogic.Value is EnemyLogic.State.FollowPlayer && GlobalPosition.DistanceTo(_player.CurrentPosition) < 3f)
|
||||
_enemyLogic.Input(new EnemyLogic.Input.StartAttacking());
|
||||
if (_enemyLogic.Value is EnemyLogic.State.FollowPlayer && GlobalPosition.DistanceTo(_player.CurrentPosition) > 30f)
|
||||
else if (_enemyLogic.Value is EnemyLogic.State.FollowPlayer && GlobalPosition.DistanceTo(_player.CurrentPosition) > 30f)
|
||||
_enemyLogic.Input(new EnemyLogic.Input.LostPlayer());
|
||||
if (_enemyLogic.Value is EnemyLogic.State.Attacking && GlobalPosition.DistanceTo(_player.CurrentPosition) > 3f)
|
||||
else if (_enemyLogic.Value is EnemyLogic.State.Attacking && GlobalPosition.DistanceTo(_player.CurrentPosition) > 5f)
|
||||
_enemyLogic.Input(new EnemyLogic.Input.Alerted());
|
||||
|
||||
_navigationAgentClient.CalculateVelocity(GlobalPosition, true);
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -341,6 +341,7 @@ public partial class Player : CharacterBody3D, IPlayer, IProvide<ISaveChunk<Play
|
||||
|
||||
HealthTimer.WaitTime = _healthTimerWaitTime;
|
||||
HealthTimer.Timeout -= OnHealthTimerTimeout;
|
||||
SwordSlashAnimation.Stop();
|
||||
SetProcessInput(false);
|
||||
SetPhysicsProcess(false);
|
||||
//Hitbox.AreaEntered -= Hitbox_AreaEntered;
|
||||
|
||||
@@ -15,9 +15,9 @@ script = ExtResource("2_ebyyx")
|
||||
RotationSpeed = 1.5
|
||||
MoveSpeed = 4.0
|
||||
Acceleration = 2.0
|
||||
CurrentHP = 1
|
||||
CurrentHP = 100
|
||||
MaximumHP = 100
|
||||
CurrentVT = 1
|
||||
CurrentVT = 100
|
||||
MaximumVT = 100
|
||||
CurrentExp = 0
|
||||
ExpToNextLevel = 12
|
||||
|
||||
@@ -43,18 +43,26 @@ public partial class UseTeleportPrompt : Control, IUseTeleportPrompt
|
||||
|
||||
private void NoButton_Pressed()
|
||||
{
|
||||
YesButton.Disabled = true;
|
||||
NoButton.Disabled = true;
|
||||
EmitSignal(SignalName.CloseTeleportPrompt);
|
||||
}
|
||||
|
||||
private void YesButton_Pressed()
|
||||
{
|
||||
YesButton.Disabled = true;
|
||||
NoButton.Disabled = true;
|
||||
EmitSignal(SignalName.TeleportToNextFloor);
|
||||
}
|
||||
|
||||
private void AnimationPlayer_AnimationFinished(StringName animName)
|
||||
{
|
||||
if (animName == "fade_in")
|
||||
{
|
||||
YesButton.Disabled = false;
|
||||
NoButton.Disabled = false;
|
||||
YesButton.CallDeferred(MethodName.GrabFocus);
|
||||
}
|
||||
if (animName == "fade_out")
|
||||
CallDeferred(MethodName.ReleaseFocus);
|
||||
}
|
||||
|
||||
@@ -48,6 +48,8 @@ public partial class PauseDebugMenu : Control, IDebugMenu
|
||||
var tempEnemy = enemy.Instantiate<Enemy>();
|
||||
SpawnEnemyDropDown.AddItem(tempEnemy.Name);
|
||||
}
|
||||
SpawnItemDropDown.AllowReselect = true;
|
||||
SpawnEnemyDropDown.AllowReselect = true;
|
||||
|
||||
SpawnItemDropDown.ItemSelected += SpawnItemDropDown_ItemSelected;
|
||||
SpawnEnemyDropDown.ItemSelected += SpawnEnemyDropDown_ItemSelected;
|
||||
|
||||
Reference in New Issue
Block a user