Reticle

ClubCrawler.Objects. Reticle

The targetting reticle for aiming with the mouse.

Constructor

new Reticle(config)

Source:

Description

Parameters:
Name Type Description
config Object

The config object

Properties
Name Type Attributes Default Description
scene Phaser.Scene

The Phaser.Scene

x number <optional>
0

The x coordinate to start the reticle... will be updated when player moves

y number <optional>
0

The y coordinate to start the reticle... updated when player moves

Members

offsetX :number

Source:

The offset from the player the mouse was at last time it moved, for updating position as player moves

Type:
  • number

offsetY :number

Source:

The offset from the player the mouse was at last time it moved, for updating position as player moves

Type:
  • number

player :ClubCrawler.Objects.Player

Source:
Type:

Methods

moveToPlayer()

Source:

Called by Map Manager when player is placed

update()

Source:

Called by DungeonCrawlerGame each update to ensure position relative to player is the same