Class AI

java.lang.Object
fr.r1r0r0.deltaengine.model.AI

public abstract class AI
extends java.lang.Object
An abstract class that defines an AI. An AI can be attached to an Entity
See Also:
Entity
  • Field Summary

    Fields
    Modifier and Type Field Description
    private Entity attachedEntity  
  • Constructor Summary

    Constructors
    Constructor Description
    AI()  
  • Method Summary

    Modifier and Type Method Description
    Entity getEntity()
    Get bound entity, to update its properties
    void setEntity​(Entity entity)
    Deprecated.
    Do not call it manually.
    abstract void tick()
    Main loop of an AI, called by Engine to process its behaviour

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • attachedEntity

      private Entity attachedEntity
  • Constructor Details

    • AI

      public AI()
  • Method Details

    • setEntity

      public final void setEntity​(Entity entity)
      Deprecated.
      Do not call it manually. Its called automatically when you attach an AI to an entity.
      To bind an entity, who is an AI can access and update its properties
      Parameters:
      entity - entity to bind
    • getEntity

      public final Entity getEntity()
      Get bound entity, to update its properties
      Returns:
      bound entity
    • tick

      public abstract void tick()
      Main loop of an AI, called by Engine to process its behaviour