Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Feb 4, 2022. It is now read-only.

Hierarchical State Machine for Unity

License

MIT, Unknown licenses found

Licenses found

MIT
LICENSE
Unknown
LICENSE.meta
NotificationsYou must be signed in to change notification settings

IntoTheDev/Hierarchical-State-Machine-for-Unity

Repository files navigation

Hierarchical State Machine for Unity. Most likely I will rewrite it multiple times in the future but for now it suits my needs.

  • Rewrite everything

How to Install

Git Installation

If you have Git on your computer, you can open Package Manager indside Unity, select "Add package from Git url...", and paste linkhttps://github.com/IntoTheDev/Hierarchical-State-Machine-for-Unity.git

or

Open the manifest.json file of your Unity project.Add"com.intothedev.ai": "https://github.com/IntoTheDev/Hierarchical-State-Machine-for-Unity.git"

Simple Example:

publicclassTestStateMachine:HierarchicalStateMachine{[SerializeField]privatefloat_timeInPatrol=1f;[SerializeField]privatefloat_timeInIdle=3f;protectedoverrideStateMachineSetup(){varpatrolState=newPatrolState(transform,speed:5f,randomizeStartSpeed:true);varemptyState=newEmpty();varstateMachine=newStateMachine().Configure(startState:patrolState).AddTransition(patrolState,emptyState,newWaitFor(waitFor:1f),reversed:false).AddTransition(emptyState,patrolState,newWaitFor(waitFor:3f),reversed:false);returnstateMachine;}}

About

Hierarchical State Machine for Unity

Topics

Resources

License

MIT, Unknown licenses found

Licenses found

MIT
LICENSE
Unknown
LICENSE.meta

Stars

Watchers

Forks

Releases

No releases published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp