API Docs for:
Show:

Phaser.Plugin.GamygdalaExpression Class

This Phaser plugin class renders the emotions in a crude way to visualize what happens to an agent It is provided for convenience, depends on Phaser functionality, and it is not suggested that this is the only (or even preferred) way emotions should be used in a game One is free to use emotions in any way (e.g. changing gameplay, storyline, enemy behaviour, using rendered faces on the actual sprites, etc..) See gamygdala_demo.html for a clear example of how to use this class.

Constructor

Phaser.Plugin.GamygdalaExpression

(
  • game
  • sprite
  • agent
  • [showOnlyMaxIntensity]
)

Parameters:

  • game Phaser.Game

    Your Phaser game

  • sprite Phaser.Sprite

    The sprite to which this expression belongs

  • agent TUDelft.Gamygdala.Agent

    The emotional agent who's emotional state will be expressed.

  • [showOnlyMaxIntensity] Boolean optional

    Setting showOnlyMaxIntensity to true shows only the expression with the highest intensity. False or omitted results in showing all.

Methods

Phaser.Plugin.GamygdalaExpression.update

()

This is run automatically when the Phaser plugins update is performed during the core game loop It renders the emotional expression for the sprite to whom the expression is coupled