You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
593 B
30 lines
593 B
public class MerchantStateHandler : StateHandler<Character>
|
|
{
|
|
protected override void OnInitialize()
|
|
{
|
|
AddGlobalState<MerchantGlobalState>();
|
|
|
|
AddState<MerchantIdle>();
|
|
AddState<MerchantAppear>();
|
|
AddState<MerchantDisappear>();
|
|
AddState<MerchantMove>();
|
|
|
|
Excutor.OnSpawned += OnSpawnOwner;
|
|
}
|
|
|
|
private void OnDestroy()
|
|
{
|
|
Excutor.OnSpawned -= OnSpawnOwner;
|
|
}
|
|
|
|
private void OnSpawnOwner(Character owner)
|
|
{
|
|
ChangeGlobalState<MerchantGlobalState>();
|
|
ChangeState<MerchantAppear>();
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|