mirror of
https://github.com/0x7c13/Pal3.Unity.git
synced 2026-11-26 09:28:07 +08:00
Bug fixes
This commit is contained in:
1 parent
7c34cd743a
commit
ffbadeec5e
2 files changed
+27
-20
No files matched your search
@@ -38,8 +38,11 @@ namespace Pal3.Actor
|
||||
get => _actor.IsActive;
|
||||
set
|
||||
{
|
||||
_actor.IsActive = value;
|
||||
if (value) Activate();
|
||||
if (value)
|
||||
{
|
||||
Activate();
|
||||
_actor.IsActive = true;
|
||||
}
|
||||
else DeActivate();
|
||||
}
|
||||
}
|
||||
@@ -98,24 +101,28 @@ namespace Pal3.Actor
|
||||
return;
|
||||
}
|
||||
|
||||
switch (_actor.Info.InitBehaviour)
|
||||
// Perform init action
|
||||
if (!_actor.IsActive)
|
||||
{
|
||||
case ScnActorBehaviour.None:
|
||||
_currentBehaviour = ScnActorBehaviour.None;
|
||||
_actionController.PerformAction(_actor.GetInitAction());
|
||||
break;
|
||||
case ScnActorBehaviour.Hold:
|
||||
_currentBehaviour = ScnActorBehaviour.Hold;
|
||||
_actionController.PerformAction(_actor.GetInitAction());
|
||||
break;
|
||||
case ScnActorBehaviour.Wander:
|
||||
_currentBehaviour = ScnActorBehaviour.Wander;
|
||||
_actionController.PerformAction(_actor.GetIdleAction());
|
||||
break;
|
||||
case ScnActorBehaviour.PathFollow:
|
||||
_currentBehaviour = ScnActorBehaviour.PathFollow;
|
||||
_actionController.PerformAction(_actor.GetIdleAction());
|
||||
break;
|
||||
switch (_actor.Info.InitBehaviour)
|
||||
{
|
||||
case ScnActorBehaviour.None:
|
||||
_currentBehaviour = ScnActorBehaviour.None;
|
||||
_actionController.PerformAction(_actor.GetInitAction());
|
||||
break;
|
||||
case ScnActorBehaviour.Hold:
|
||||
_currentBehaviour = ScnActorBehaviour.Hold;
|
||||
_actionController.PerformAction(_actor.GetInitAction());
|
||||
break;
|
||||
case ScnActorBehaviour.Wander:
|
||||
_currentBehaviour = ScnActorBehaviour.Wander;
|
||||
_actionController.PerformAction(_actor.GetIdleAction());
|
||||
break;
|
||||
case ScnActorBehaviour.PathFollow:
|
||||
_currentBehaviour = ScnActorBehaviour.PathFollow;
|
||||
_actionController.PerformAction(_actor.GetIdleAction());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (_currentBehaviour == ScnActorBehaviour.PathFollow)
|
||||
|
||||
@@ -466,7 +466,7 @@ namespace Pal3.Actor
|
||||
_tilemap.GetWorldPosition(position, _currentLayerIndex),
|
||||
};
|
||||
|
||||
SetupPath(directWayPoints, mode, endOfPathAction, ignoreObstacle: true);
|
||||
SetupPath(directWayPoints, mode, endOfPathAction, ignoreObstacle: true, specialAction);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user