Download the PHP package mrferrys/finitestatemachine without Composer

On this page you can find all versions of the php package mrferrys/finitestatemachine. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package finitestatemachine

finitestatemachine

A Finite State Machine System based on Chapter 3.1 of Game Programming Gems 1 by Eric Dybsand,Written by Roberto Cezar Bianchini, July 2010 ported to php by MrFerrys.

Description

A Finite State Machine System based on Chapter 3.1 of Game Programming Gems 1 by Eric Dybsand,Written by Roberto Cezar Bianchini, July 2010 ported to php by MrFerrys.

Getting Started

Dependencies

Installation

composer require mrferrys/finitestatemachine

Usage

Authors

MrFerrys

Version History

License

Finite State Machine A Finite State Machine System based on Chapter 3.1 of Game Programming Gems 1 by Eric Dybsand

Written by Roberto Cezar Bianchini, July 2010

How to use:

  1. Place the labels for the transitions and the states of the Finite State System in the corresponding enums.

  2. Write new class(es) inheriting from FSMState and fill each one with pairs (transition-state). These pairs represent the state S2 the FSMSystem should be if while being on state S1, a transition T is fired and state S1 has a transition from it to S2. Remember this is a Deterministic FSM. You can't have one transition leading to two different states.

    Method Reason is used to determine which transition should be fired. You can write the code to fire transitions in another place, and leave this method empty if you feel it's more appropriate to your project.

    Method Act has the code to perform the actions the NPC is supposed do if it's on this state. You can write the code for the actions in another place, and leave this method empty if you feel it's more appropriate to your project.

  3. Create an instance of FSMSystem class and add the states to it.

  4. Call Reason and Act (or whichever methods you have for firing transitions and making the NPCs behave in your game) from your Update or FixedUpdate methods.

    Asynchronous transitions from Unity Engine, like OnTriggerEnter, SendMessage, can also be used, just call the Method PerformTransition from your FSMSystem instance with the correct Transition when the event occurs.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Ported to PHP by MrFerrys Author Roberto Cezar Bianchini

    See the LICENSE file for details

Acknowledgments

Finite State Machine:


All versions of finitestatemachine with dependencies

PHP Build Version
Package Version
Requires php Version >=5.0.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package mrferrys/finitestatemachine contains the following files

Loading the files please wait ....