프로퍼티 | 타입 | 설명 | |
---|---|---|---|
script |
메소드 | 설명 | |
---|---|---|
Character ( ) : System |
Initializes a default Character at the origin which matches the dimensions of its sprite (when loaded)
|
|
Character ( int x, int y ) : System |
Initializes a Character at the given position which matches the dimensions of its sprite (when loaded)
|
|
Character ( int x, int y, int width, int height, string file ) : System |
Initializes a Character at the given position with the given dimensions
|
|
bothFacing ( |
Checks if two Characters are facing each other
|
|
facing ( IInteractable other ) : bool |
Checks if this Character is facing another Interactable (e.g. other Character); used as a check for talking action
|
|
getClique ( ) : Clique | ||
getDirection ( ) : Direction | ||
getName ( ) : string | ||
getOppositeDirection ( ) : Direction |
Returns the reverse direction of this Character's current direction; used for making Characters face each other when talking
|
|
getPersonID ( ) : PersonID | ||
inRange ( IInteractable other, int offset ) : bool |
Checks in this Character is within a given range with another Interactable to perform any action. The range is another rectangle a given number of pixels thicker than the sprite's drawing rectangle. E.g. talk to another character, pickup an item, collision detection
|
|
inRangeAction ( IInteractable other ) : bool |
Checks if this Character is in a given range to perform an action such as talking or pickpocketing
|
|
inRangeCollide ( IInteractable other ) : bool |
Checks if this Character is in a given range for collisions
|
|
isFemale ( ) : bool | ||
isMale ( ) : bool | ||
move ( Direction dir, float elapsed, bool collide = true ) : bool | ||
move ( float angle, float elapsed, bool collide = true ) : bool | ||
onInteract ( ) : void | ||
pickup ( |
Adds the given Pickup to this Character's inventory (and the Pickup disappears)
|
|
setClique ( Clique clique ) : void | ||
setDirection ( Direction dir ) : void |
Sets the direction of this Character and updates which row on the spritesheet to animate
|
|
setMale ( bool male ) : void | ||
setName ( string name ) : void | ||
setPersonID ( PersonID id ) : void | ||
setScript ( string file ) : void |
public Character ( int x, int y ) : System | ||
x | int | X coordinate of the top-left corner |
y | int | Y coordinate of the top-left corner |
리턴 | System |
public Character ( int x, int y, int width, int height, string file ) : System | ||
x | int | X coordinate of the top-left corner |
y | int | Y coordinate of the top-left corner |
width | int | Width in pixels |
height | int | Height in pixels |
file | string | |
리턴 | System |
public bothFacing ( |
||
other | The other Character | |
리턴 | bool |
public facing ( IInteractable other ) : bool | ||
other | IInteractable | The other Interactable |
리턴 | bool |
public inRange ( IInteractable other, int offset ) : bool | ||
other | IInteractable | The other Interactable to range check against |
offset | int | The pixels offset for the range check |
리턴 | bool |
public inRangeAction ( IInteractable other ) : bool | ||
other | IInteractable | The other Sprite to range check against |
리턴 | bool |
public inRangeCollide ( IInteractable other ) : bool | ||
other | IInteractable | The other Sprite to range check against |
리턴 | bool |
public move ( Direction dir, float elapsed, bool collide = true ) : bool | ||
dir | Direction | |
elapsed | float | |
collide | bool | |
리턴 | bool |
public move ( float angle, float elapsed, bool collide = true ) : bool | ||
angle | float | |
elapsed | float | |
collide | bool | |
리턴 | bool |
public setDirection ( Direction dir ) : void | ||
dir | Direction | Direction of this Character |
리턴 | void |