Skip to content

How to correctly use Update and FixedUpdate? #39

Description

@omid3098

Hi,
I'm using this simple example like you described in Readme:

using MonsterLove.StateMachine;
using UnityEngine;
public class FSMTest : MonoBehaviour
{
    public enum States { Init }
    StateMachine<States> fsm;
    void Awake()
    {
        fsm = new StateMachine<States>(this);
        fsm.ChangeState(States.Init);
    }
    void Init_Enter() { Debug.Log("Init_Enter"); }
    void Init_FixedUpdate() { Debug.Log("Init_FixedUpdate"); }
    void Init_Update() { Debug.Log("Init_Update"); }
}

But the Update and FixedUpdate wont execcute.
What am I missing?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions