Skip to content

cameronpenner/UnityStateMachine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

UnityStateMachine

Getting Started

  1. Create a new script and inherit from State
public class JumpingState : State { }
  1. Drag your new state onto a Game Object (A StateMachine should automatically attatch itself)
  2. Create another state and add it to the GameObject
  3. Switch between states by calling SetState()
public class JumpingState : State
{
  public State otherState;

  OnMouseDown()
  {
    SetState(otherState);
  }
}

##Other Information Switch states while editing or playing by clicking the buttons in the editor

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages