mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
Card Sleeves
This commit is contained in:
@@ -2430,6 +2430,7 @@ public class Player extends GameEntity implements Comparable<Player> {
|
||||
controllerCreator = ctrlr;
|
||||
controller = ctrlr;
|
||||
updateAvatar();
|
||||
updateSleeve();
|
||||
view.updateIsAI(this);
|
||||
view.updateLobbyPlayerName(this);
|
||||
}
|
||||
@@ -2439,6 +2440,10 @@ public class Player extends GameEntity implements Comparable<Player> {
|
||||
view.updateAvatarCardImageKey(this);
|
||||
}
|
||||
|
||||
public void updateSleeve() {
|
||||
view.updateSleeveIndex(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Run a procedure using a different controller
|
||||
*/
|
||||
|
||||
@@ -85,6 +85,13 @@ public class PlayerView extends GameEntityView {
|
||||
set(TrackableProperty.AvatarCardImageKey, p.getLobbyPlayer().getAvatarCardImageKey());
|
||||
}
|
||||
|
||||
public int getSleeveIndex() {
|
||||
return get(TrackableProperty.SleeveIndex);
|
||||
}
|
||||
void updateSleeveIndex(Player p) {
|
||||
set(TrackableProperty.SleeveIndex, p.getLobbyPlayer().getSleeveIndex());
|
||||
}
|
||||
|
||||
public String getCurrentPlaneName() { return get(TrackableProperty.CurrentPlane); }
|
||||
void updateCurrentPlaneName( String plane ) {
|
||||
set(TrackableProperty.CurrentPlane, plane);
|
||||
|
||||
@@ -122,6 +122,7 @@ public enum TrackableProperty {
|
||||
LobbyPlayerName(TrackableTypes.StringType),
|
||||
AvatarIndex(TrackableTypes.IntegerType),
|
||||
AvatarCardImageKey(TrackableTypes.StringType),
|
||||
SleeveIndex(TrackableTypes.IntegerType),
|
||||
Opponents(TrackableTypes.PlayerViewCollectionType),
|
||||
Life(TrackableTypes.IntegerType),
|
||||
PoisonCounters(TrackableTypes.IntegerType),
|
||||
|
||||
Reference in New Issue
Block a user