char editor progress (YOSH PLEASE HELP)

This commit is contained in:
WizardMantis441
2023-01-29 20:36:31 -06:00
parent e6fc95d585
commit 224d43b384
2 changed files with 36 additions and 10 deletions
+1 -1
View File
@@ -1 +1 @@
2204
2206
@@ -27,6 +27,13 @@ class CharacterEditor extends WindowContent {
public var menuBar:MenuBar;
/**
* SILHOUETTES
*/
public var silhouetteDad:Character;
public var silhouetteGf:Character;
public var silhouetteBf:Character;
/**
* ANIMATION TAB
*/
@@ -65,15 +72,24 @@ class CharacterEditor extends WindowContent {
// stage
var bg = new FlxSprite(-600, -200).loadAnimatedGraphic(Paths.image('stages/default/stageback'));
bg.scrollFactor.set(0.9, 0.9);
var stageFront = new FlxSprite(-600, 600).loadAnimatedGraphic(Paths.image('stages/default/stagefront'));
silhouetteDad = new Character(100, 100, "dad", false);
silhouetteGf = new Character(400, 130, "gf", false);
silhouetteGf.scrollFactor.set(0.95, 0.95);
silhouetteBf = new Character(770, 100, "bf", true);
for (e in [silhouetteDad, silhouetteGf, silhouetteBf]) {
e.color = 0xFF000000;
e.visible = false;
e.alpha = 0.25;
}
for (e in [bg, stageFront, silhouetteDad, silhouetteGf, silhouetteBf]) {
e.antialiasing = true;
add(e);
}
char = new Character(100, 100, curCharacter, false, false);
for(e in [bg, stageFront])
e.antialiasing = true;
add(bg);
add(stageFront);
add(char);
title = 'Character Editor - ${char.curCharacter}.xml';
@@ -143,13 +159,16 @@ class CharacterEditor extends WindowContent {
callback: resetCamZoom
},
{
name: "Show a Boyfriend Silhouette"
name: "Toggle Boyfriend Silhouette",
callback: toggleSilBF
},
{
name: "Show a Dad Silhouette"
name: "Toggle Dad Silhouette",
callback: toggleSilDad
},
{
name: "Show a Girlfriend Silhouette"
name: "Toggle Girlfriend Silhouette",
callback: toggleSilGF
}
]
},
@@ -317,4 +336,11 @@ class CharacterEditor extends WindowContent {
public function resetCamZoom() {
windowCamera.zoom = 1;
}
/**
* Silhouettes
*/
public function toggleSilBF() silhouetteBf.visible = !silhouetteBf.visible;
public function toggleSilDad() silhouetteDad.visible = !silhouetteDad.visible;
public function toggleSilGF() silhouetteGf.visible = !silhouetteGf.visible;
}