Flash object for a player sitting at a trick-taking card game. This is a placeholder for
something nicer, so only the interface is documented in detail.
protected var _background:Bitmap
protected var _caption:Text
protected var _captionColor:uint
protected var _captionOutlineColor:uint
protected var _headShot:HeadShotContainer
protected var _height:int
protected var _id:int
protected var _timer:TimerMovie
protected var _turn:Boolean
protected var _warningColor:uint
public function PlayerSprite(table:Table, id:int, width:int, height:int, timer:TurnTimer, timerMovie:Class, timerPos:Point, background:Class, textColor:uint, outlineColor:uint, warningColor:uint, captionColor:uint, captionOutlineColor:uint) Create a new player.
Parameters
| table:Table — the table for the game the player is playing
|
| |
| id:int — the id of the player this sprite represents
|
| |
| width:int — the turn timer model object
|
| |
| height:int — the embedded movie for the turn timer
|
| |
| timer:TurnTimer — the position of the timer relative to the center of the player sprite
|
| |
| timerMovie:Class — the embedded background object
|
| |
| timerPos:Point — the color of the text of the player's name
|
| |
| background:Class — the color of the outline of the text
|
| |
| textColor:uint — the width of the background image
|
| |
| outlineColor:uint — the height of the background image
|
| |
| warningColor:uint — the color of the caption text when it is a warning
|
| |
| captionColor:uint — the color of the caption text normally
|
| |
| captionOutlineColor:uint — the color of the outline of the caption text
|
public function setHeadShot(headShot:DisplayObject):void Set the player head shot.
Parameters
public function setTurn(turn:Boolean):void Update to reflect the turn status.
Parameters
| turn:Boolean — indicates whether it is this player's turn |
public function showCaption(str:String, warning:Boolean = false):void Display a warning for this player.
TODO: make protected and listen for warning events in subclasses.
Parameters
| str:String |
| |
| warning:Boolean (default = false) |
protected function turnTimerListener(event:TurnTimerEvent):voidParameters
protected static const DROP_SHADOW_MAX_ALPHA:Number = 0.5