using UnityEngine;
using System.Collections;

public class LittleOctopusFSM : baseFSM
{
    public float timer = 0;
    public float delay = 5;

    public enum FSMState
    {
        None,
        StandBy,
        Chase,
        Attack,
        Dead,
    }

    public FSMState curState;


    protected override void Initialize()
    {
        curState = FSMState.Attack;
    }

    protected override void FSMUpdate()
    {
        switch (curState)
        {
            case FSMState.StandBy: UpdateStandbyState(); break;
            case FSMState.Chase: UpdateChaseState(); break;
            case FSMState.Attack: UpdateAttackState(); break;
            case FSMState.Dead: UpdateDeadState(); break;
        }
    }

    protected void UpdateStandbyState()
    {
       

    }

   
    /// <summary>
    /// Chase states
    /// </summary>
    protected void UpdateChaseState()
    {
        

    }

    /// <summary>
    /// Attack state
    /// </summary>
    protected void UpdateAttackState()
    {
        Debug.Log("Attacking");
        // anim.SetFloat("Jellyfish_Anim", 1);
        Vector3 PlayerMovingPosition = Vector3.MoveTowards(transform.position, target.transform.position, movementSpeed * Time.deltaTime);
        transform.position = PlayerMovingPosition;
    }

    /// <summary>
    /// Dead state
    /// </summary>
    protected void UpdateDeadState()
    {

    }
}