limo stage done
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<!DOCTYPE codename-engine-character>
|
||||
<character isPlayer="true" flipX="true" x="0" y="350">
|
||||
<character isPlayer="true" flipX="true" x="0" y="350" icon="bf">
|
||||
<anim name="idle" anim="BF idle dance" fps="24" loop="false" x="-5" y="0"/>
|
||||
<anim name="singUP" anim="BF NOTE UP0" fps="24" loop="false" x="-29" y="27"/>
|
||||
<anim name="singLEFT" anim="BF NOTE LEFT0" fps="24" loop="false" x="12" y="-6"/>
|
||||
|
||||
@@ -1,23 +1,5 @@
|
||||
<!DOCTYPE codename-engine-character>
|
||||
<character isPlayer="false" flipX="false" isGF="true">
|
||||
<anim name="danceLeft" anim="GF Dancing Beat" fps="24" loop="false" x="0" y="-9" indices="30,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14" />
|
||||
<anim name="danceRight" anim="GF Dancing Beat" fps="24" loop="false" x="0" y="-9" indices="15,16,17,18,19,20,21,22,23,24,25,26,27,28,29" />
|
||||
</character>
|
||||
|
||||
<!-- if (!animation.curAnim.name.startsWith('hair'))
|
||||
{
|
||||
danced = !danced;
|
||||
|
||||
if (danced)
|
||||
playAnim('danceRight');
|
||||
else
|
||||
playAnim('danceLeft');
|
||||
} -->
|
||||
|
||||
<!--
|
||||
switch (curCharacter)
|
||||
{
|
||||
case 'gf':
|
||||
if (animation.curAnim.name == 'hairFall' && animation.curAnim.finished)
|
||||
playAnim('danceRight');
|
||||
} -->
|
||||
<anim name="danceLeft" anim="GF Dancing Beat Hair blowing CAR" fps="24" loop="false" x="0" y="-9" indices="30,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14" />
|
||||
<anim name="danceRight" anim="GF Dancing Beat Hair blowing CAR" fps="24" loop="false" x="0" y="-9" indices="15,16,17,18,19,20,21,22,23,24,25,26,27,28,29" />
|
||||
</character>
|
||||
@@ -12,7 +12,9 @@
|
||||
<anim name="scared" anim="GF FEAR" fps="24" loop="true" x="-2" y="-17" />
|
||||
</character>
|
||||
|
||||
<!-- if (!animation.curAnim.name.startsWith('hair'))
|
||||
<!--
|
||||
// TODO:
|
||||
if (!animation.curAnim.name.startsWith('hair'))
|
||||
{
|
||||
danced = !danced;
|
||||
|
||||
|
||||
+11
-12
@@ -1,6 +1,17 @@
|
||||
function create() {
|
||||
resetFastCar();
|
||||
}
|
||||
function update(elapsed:Float) {
|
||||
if (!fastCarCanDrive && fastCar.x > 2000) {
|
||||
resetFastCar();
|
||||
fastCarCanDrive = true;
|
||||
}
|
||||
}
|
||||
function beatHit(curBeat:Int) {
|
||||
if (FlxG.random.bool(10) && fastCarCanDrive)
|
||||
fastCarDrive();
|
||||
}
|
||||
|
||||
|
||||
function resetFastCar() {
|
||||
fastCar.x = -12600;
|
||||
@@ -8,22 +19,10 @@ function resetFastCar() {
|
||||
fastCar.velocity.x = 0;
|
||||
fastCarCanDrive = true;
|
||||
}
|
||||
|
||||
function update(elapsed:Float) {
|
||||
if (!fastCarCanDrive && fastCar.x > 2000) {
|
||||
resetFastCar();
|
||||
fastCarCanDrive = true;
|
||||
}
|
||||
}
|
||||
function fastCarDrive()
|
||||
{
|
||||
FlxG.sound.play(Paths.soundRandom('carPass', 0, 1), 0.7);
|
||||
|
||||
fastCar.velocity.x = (FlxG.random.int(170, 220) / FlxG.elapsed) * 3;
|
||||
fastCarCanDrive = false;
|
||||
}
|
||||
|
||||
function beatHit(curBeat:Int) {
|
||||
if (FlxG.random.bool(10) && fastCarCanDrive)
|
||||
fastCarDrive();
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
<stage zoom="0.9" name="limo" folder="stages/limo/">
|
||||
<!-- BG LIMOS !-->
|
||||
<sprite name="skyBG" x="-120" y="-50" sprite="limoSunset" scroll="0.1"/>
|
||||
<sprite name="bgLimo" x="-200" y="480" sprite="bgLimo" scroll="0.4"/>
|
||||
<sprite name="bgLimo" x="-200" y="480" sprite="bgLimo" scroll="0.4" />
|
||||
|
||||
<!-- DANCERS !-->
|
||||
<sprite name="dancer1" x="130" y="80" sprite="limoDancer" scroll="0.4">
|
||||
@@ -30,13 +30,10 @@
|
||||
<sprite name="fastCar" x="-300" y="160" sprite="fastCarLol" />
|
||||
|
||||
<!-- MORE LIMO STUFF !-->
|
||||
<girlfriend />
|
||||
<sprite name="limo" x="-120" y="550" sprite="limoDrive" />
|
||||
<boyfriend x="1030" y="-120" camxoffset="-300"/>
|
||||
<sprite name="overlayShit" x="-500" y="480" sprite="limoOverlay" scroll="0">
|
||||
<property name="alpha" type="float" value="0.5" />
|
||||
<property name="blend" type="string" value="multiply" />
|
||||
</sprite>
|
||||
<girlfriend />
|
||||
<sprite name="limo" x="-120" y="550" sprite="limoDrive" anim="drive">
|
||||
<anim name="drive" anim="Limo stage"/>
|
||||
</sprite>
|
||||
<boyfriend x="1030" y="-120" />
|
||||
</stage>
|
||||
@@ -0,0 +1,10 @@
|
||||
<!DOCTYPE codename-engine-stage>
|
||||
<stage zoom="0.9" name="mall" folder="stages/mall/">
|
||||
<!-- BG LIMOS !-->
|
||||
<sprite name="skyBG" x="-120" y="-50" sprite="limoSunset" scroll="0.1"/>
|
||||
<sprite name="bgLimo" x="-200" y="480" sprite="bgLimo" scroll="0.4" />
|
||||
|
||||
<girlfriend />
|
||||
<dad />
|
||||
<boyfriend />
|
||||
</stage>
|
||||
+1
-1
@@ -1 +1 @@
|
||||
234
|
||||
238
|
||||
@@ -126,7 +126,8 @@ class ChartingState extends MusicBeatState
|
||||
player2: 'dad',
|
||||
speed: 1,
|
||||
validScore: false,
|
||||
stage: 'stage'
|
||||
stage: 'stage',
|
||||
gf: 'gf'
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -184,9 +184,9 @@ class PlayState extends MusicBeatState
|
||||
DiscordClient.changePresence(detailsText, SONG.song + " (" + storyDifficultyText + ")", iconRPC);
|
||||
#end
|
||||
|
||||
|
||||
// TODO: Chart GF version
|
||||
gf = new Character(400, 130, "gf");
|
||||
var gfVersion = SONG.gf;
|
||||
if (gfVersion == null) gfVersion = "gf";
|
||||
gf = new Character(400, 130, gfVersion);
|
||||
gf.scrollFactor.set(0.95, 0.95);
|
||||
|
||||
dad = new Character(100, 100, SONG.player2);
|
||||
|
||||
+33
-24
@@ -50,11 +50,14 @@ class Stage extends FlxBasic implements IBeatReceiver {
|
||||
case "sprite" | "spr" | "sparrow":
|
||||
var spr = new StageSprite();
|
||||
spr.antialiasing = true;
|
||||
|
||||
var addDefAnim = true;
|
||||
if (!node.has.sprite || !node.has.name || !node.has.x || !node.has.y) continue;
|
||||
|
||||
if (Assets.exists(Paths.file('images/$spritesParentFolder${node.att.sprite}.xml', TEXT))) {
|
||||
spr.frames = Paths.getSparrowAtlas('$spritesParentFolder${node.att.sprite}');
|
||||
} else {
|
||||
addDefAnim = false;
|
||||
spr.loadGraphic(Paths.image('$spritesParentFolder${node.att.sprite}'));
|
||||
}
|
||||
var x:Null<Float> = Std.parseFloat(node.att.x);
|
||||
@@ -72,46 +75,32 @@ class Stage extends FlxBasic implements IBeatReceiver {
|
||||
if (node.has.updateHitbox && node.att.updateHitbox == "true") spr.updateHitbox();
|
||||
|
||||
for(anim in node.nodes.anim) {
|
||||
addDefAnim = false;
|
||||
if (anim.has.name) spr.beatAnims.push(anim.att.name);
|
||||
XMLUtil.addXMLAnimation(spr, anim);
|
||||
}
|
||||
if (node.has.beatAnim && node.att.beatAnim.trim() != "") spr.beatAnims = [for(e in node.att.beatAnim.split(",")) e.trim()];
|
||||
|
||||
if (node.has.anim) {
|
||||
spr.animation.play(node.att.anim);
|
||||
} else if (addDefAnim) {
|
||||
spr.animation.addByPrefix("anim", "", 24, true);
|
||||
spr.animation.play("anim");
|
||||
}
|
||||
|
||||
stageSprites.set(node.att.name, spr);
|
||||
PlayState.instance.add(spr);
|
||||
spr;
|
||||
case "boyfriend" | "bf":
|
||||
if (node.has.x) {
|
||||
var x:Null<Float> = Std.parseFloat(node.att.x);
|
||||
if (x != null) PlayState.instance.boyfriend.x = x;
|
||||
}
|
||||
if (node.has.y) {
|
||||
var y:Null<Float> = Std.parseFloat(node.att.y);
|
||||
if (y != null) PlayState.instance.boyfriend.y = y;
|
||||
}
|
||||
doCharNodeShit(PlayState.instance.boyfriend, node);
|
||||
PlayState.instance.add(PlayState.instance.boyfriend);
|
||||
PlayState.instance.boyfriend;
|
||||
case "girlfriend" | "gf":
|
||||
if (node.has.x) {
|
||||
var x:Null<Float> = Std.parseFloat(node.att.x);
|
||||
if (x != null) PlayState.instance.gf.x = x;
|
||||
}
|
||||
if (node.has.y) {
|
||||
var y:Null<Float> = Std.parseFloat(node.att.y);
|
||||
if (y != null) PlayState.instance.gf.y = y;
|
||||
}
|
||||
doCharNodeShit(PlayState.instance.gf, node);
|
||||
PlayState.instance.add(PlayState.instance.gf);
|
||||
PlayState.instance.gf;
|
||||
case "dad" | "opponent":
|
||||
if (node.has.x) {
|
||||
var x:Null<Float> = Std.parseFloat(node.att.x);
|
||||
if (x != null) PlayState.instance.dad.x = x;
|
||||
}
|
||||
if (node.has.y) {
|
||||
var y:Null<Float> = Std.parseFloat(node.att.y);
|
||||
if (y != null) PlayState.instance.dad.y = y;
|
||||
}
|
||||
doCharNodeShit(PlayState.instance.dad, node);
|
||||
PlayState.instance.add(PlayState.instance.dad);
|
||||
PlayState.instance.dad;
|
||||
default: null;
|
||||
@@ -129,6 +118,26 @@ class Stage extends FlxBasic implements IBeatReceiver {
|
||||
}
|
||||
PlayState.instance.scripts.add(stageScript);
|
||||
}
|
||||
|
||||
|
||||
private static function doCharNodeShit(char:Character, node:Access) {
|
||||
if (node.has.x) {
|
||||
var x:Null<Float> = Std.parseFloat(node.att.x);
|
||||
if (x != null) char.x = x;
|
||||
}
|
||||
if (node.has.y) {
|
||||
var y:Null<Float> = Std.parseFloat(node.att.y);
|
||||
if (y != null) char.y = y;
|
||||
}
|
||||
if (node.has.camxoffset) {
|
||||
var x:Null<Float> = Std.parseFloat(node.att.camxoffset);
|
||||
if (x != null) char.cameraOffset.x += x;
|
||||
}
|
||||
if (node.has.camyoffset) {
|
||||
var y:Null<Float> = Std.parseFloat(node.att.camyoffset);
|
||||
if (y != null) char.cameraOffset.y += y;
|
||||
}
|
||||
}
|
||||
|
||||
public function beatHit(curBeat:Int) {}
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ typedef SwagSong =
|
||||
|
||||
var player1:String;
|
||||
var player2:String;
|
||||
var gf:String;
|
||||
var validScore:Bool;
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ class XMLUtil {
|
||||
|
||||
var value:Dynamic = switch(property.att.type.toLowerCase()) {
|
||||
case "float" | "number": Std.parseFloat(property.att.value);
|
||||
case "int" | "integer": Std.parseInt(property.att.value);
|
||||
case "int" | "integer" | "color": Std.parseInt(property.att.value);
|
||||
case "string" | "str" | "text": property.att.value;
|
||||
case "bool" | "boolean": property.att.value.toLowerCase() == "true";
|
||||
default: return TYPE_INCORRECT;
|
||||
|
||||
Reference in New Issue
Block a user