36 lines
774 B
C#
36 lines
774 B
C#
using UFS2.Gameplay;
|
|
using UnityEngine;
|
|
|
|
public class FishMultiplayerHideState : IState
|
|
{
|
|
private FishEntity entity;
|
|
|
|
private MultiplayerFishSpawner.NetworkedFish networkedFish;
|
|
|
|
public FishMultiplayerHideState(FishEntity entity)
|
|
{
|
|
this.entity = entity;
|
|
networkedFish = MultiplayerFishSpawner.GetNetworkedFish(entity);
|
|
}
|
|
|
|
public void Enter()
|
|
{
|
|
entity.SetAnimatorFloat("speed", 0f);
|
|
entity.SetAIEnabled(value: false);
|
|
entity.Physics.Rbody.isKinematic = true;
|
|
entity.Physics.Rbody.velocity = Vector3.zero;
|
|
entity.transform.position = new Vector3(0f, 1000f, 0f);
|
|
entity.ResetBaitRefferences();
|
|
}
|
|
|
|
public void Execute()
|
|
{
|
|
}
|
|
|
|
public void Exit()
|
|
{
|
|
entity.Physics.Rbody.isKinematic = false;
|
|
entity.transform.position = networkedFish.position;
|
|
}
|
|
}
|