A simple component that rotates an entity to face the mouse

Constructor

@:value({ lerp : 0.25 })new (lerp:Float = 0.25)

Creates a new component that rotates an entity to face the mouse

Parameters:

lerp

the rate of change in the angle (0-1)

Methods

inlineset_lerp (lerp:Float):Void

Change the rate of change in the angle (0-1)

Parameters:

null

lerp

Inherited Variables

Defined by Component

@:value(true)active:Bool = true

Whether or not this component gets updated

Inherited Methods

Defined by Component

get_name ():String

returns the name of this component

get_priority ():Int

returns the priority of this component

has_tag (tag:String):Bool

Returns whether or not this component is tagged with given tag

Parameters:

tag

Returns:

Bool return tags.indexOf(tag) >= 0

on_add ():Void

Called when added to an entity

on_remove ():Void

Called when removed from an entity

set_priority (value:Int):Void

sets the priority of this component

Parameters:

null

value