Initial commit
This commit is contained in:
25
Assets/Darkmatter/Code/Domain/Player/PlayerController.cs
Normal file
25
Assets/Darkmatter/Code/Domain/Player/PlayerController.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using VContainer;
|
||||
using VContainer.Unity;
|
||||
|
||||
namespace Darkmatter.Domain
|
||||
{
|
||||
public class PlayerController : IStartable, ITickable, ILateTickable
|
||||
{
|
||||
[Inject] private PlayerStateMachine psm;
|
||||
|
||||
public void LateTick()
|
||||
{
|
||||
psm.LateUpdate();
|
||||
}
|
||||
|
||||
public void Start()
|
||||
{
|
||||
psm.ChangeState(new LocomotionState(psm));
|
||||
}
|
||||
|
||||
public void Tick()
|
||||
{
|
||||
psm.Update();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user