38 lines
603 B
C#
38 lines
603 B
C#
using UFS2.Gameplay;
|
|
using UFS2.ScriptableObjects;
|
|
using UnityEngine;
|
|
|
|
public class FishIdleState : IState
|
|
{
|
|
private FishEntity entity;
|
|
|
|
private float stateLenghthTime;
|
|
|
|
private Transform _Target;
|
|
|
|
private Vector2 randomTime = new Vector2(1f, 3f);
|
|
|
|
private FishData _Data => entity.Data;
|
|
|
|
public FishIdleState(FishEntity entity)
|
|
{
|
|
this.entity = entity;
|
|
}
|
|
|
|
public void Enter()
|
|
{
|
|
entity.SetAnimatorFloat("speed", 0f);
|
|
entity.SetAIEnabled(value: true);
|
|
entity.ResetBaitRefferences();
|
|
}
|
|
|
|
public void Execute()
|
|
{
|
|
entity.Physics.GravityScaleDown(0.99f);
|
|
}
|
|
|
|
public void Exit()
|
|
{
|
|
}
|
|
}
|