This commit is contained in:
Yoshman29
2022-11-05 04:00:28 +01:00
parent 1d7f163919
commit 51784fa0d1
36 changed files with 53 additions and 21 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
<!DOCTYPE codename-engine-character>
<character sprite="senpai" isPlayer="false" flipX="false" x="150" y="360" antialiasing="false" scale="6" icon="senpai">
<character sprite="senpai" isPlayer="false" flipX="false" x="150" y="360" antialiasing="false" scale="6" icon="senpai" camx="100">
<anim name="idle" anim="Angry Senpai Idle" fps="24" loop="false" x="0" y="0" />
<!-- Offsets are actually multiplied by scale -->
+1 -1
View File
@@ -1,5 +1,5 @@
<!DOCTYPE codename-engine-character>
<character isPlayer="false" flipX="false" x="150" y="360" antialiasing="false" scale="6">
<character isPlayer="false" flipX="false" x="150" y="360" antialiasing="false" scale="6" camx="100">
<anim name="idle" anim="Senpai Idle" fps="24" loop="false" x="0" y="0" />
<!-- Offsets are actually multiplied by scale -->
+1
View File
@@ -1,6 +1,7 @@
function create() {
importScript("data/scripts/pixel");
pixelNotesForBF = false;
enablePixelUI = false;
}
function updatePost(elapsed) {
+16
View File
@@ -1,5 +1,6 @@
public var pixelNotesForBF = true;
public var pixelNotesForDad = true;
public var enablePixelUI = true;
var daPixelZoom = 6;
@@ -21,6 +22,7 @@ function onNoteCreation(event) {
note.scale.set(daPixelZoom, daPixelZoom);
note.updateHitbox();
}
function onStrumCreation(event) {
if (event.player == 1 && !pixelNotesForBF) return;
if (event.player == 0 && !pixelNotesForDad) return;
@@ -35,4 +37,18 @@ function onStrumCreation(event) {
strum.scale.set(daPixelZoom, daPixelZoom);
strum.updateHitbox();
}
function onCountdown(event) {
if (!enablePixelUI) return;
if (event.soundPath != null) event.soundPath = 'pixel/' + event.soundPath;
event.antialiasing = false;
event.scale = 6;
event.spritePath = switch(event.swagCounter) {
case 0: null;
case 1: 'stages/school/ui/ready';
case 2: 'stages/school/ui/set';
case 3: 'stages/school/ui/go';
};
}
+2
View File
@@ -1,3 +1,5 @@
function create() {
importScript("data/scripts/pixel");
trace(treeLeaves.width);
trace(bgSky.width);
}
+23 -5
View File
@@ -1,7 +1,25 @@
<!DOCTYPE codename-engine-stage>
<stage zoom="1.05" name="spooky" folder="stages/school/">
<sprite name="bgSky" x="0" y="0" antialiasing="false" scale="6" sprite="weebSky" scroll="0.1"/>
<sprite name="bgStreet" x="-200" y="0" antialiasing="false" scale="6" sprite="weebStreet" scroll="0.95" />
<sprite name="fgTrees" x="-30" y="130" antialiasing="false" scale="6" sprite="weebTreesBack" scroll="0.9" />
<sprite name="bgTrees" x="-30" y="130" antialiasing="false" scale="6" sprite="weebTreesBack" scroll="0.9" />
<stage zoom="1" name="spooky" folder="stages/school/" >
<sprite name="bgSky" x="0" y="0" sprite="weebSky"
antialiasing="false" scale="6" scroll="0.1" updateHitbox="true"/>
<sprite name="bgSchool" x="-200" y="0" sprite="weebSchool"
antialiasing="false" scale="6" scrollx="0.6" scrolly="0.9" updateHitbox="true"/>
<sprite name="bgStreet" x="-200" y="0" sprite="weebStreet"
antialiasing="false" scale="6" scroll="0.95" updateHitbox="true"/>
<sprite name="fgTrees" x="-30" y="130" sprite="weebTreesBack"
antialiasing="false" scale="4.8" scroll="0.9" updateHitbox="true"/>
<sprite name="bgTrees" x="-1180" y="-1600" sprite="weebTrees"
antialiasing="false" scale="8.4" scroll="0.85" updateHitbox="true"/>
<sprite name="treeLeaves" x="-200" y="-40" sprite="petals"
antialiasing="false" scale="6" scroll="0.85" updateHitbox="true"/>
<sprite name="bgGirls" x="-100" y="190" sprite="bgFreaks" scroll="0.9" scale="6" antialiasing="false" updateHitbox="true">
<anim name="danceLeft" anim="BG girls group" indices="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14" fps="24" loop="false"/>
<anim name="danceRight" anim="BG girls group" indices="15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30" fps="24" loop="false"/>
</sprite>
</stage>

Before

Width:  |  Height:  |  Size: 418 B

After

Width:  |  Height:  |  Size: 418 B

Before

Width:  |  Height:  |  Size: 417 B

After

Width:  |  Height:  |  Size: 417 B

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

Before

Width:  |  Height:  |  Size: 396 B

After

Width:  |  Height:  |  Size: 396 B

Before

Width:  |  Height:  |  Size: 189 B

After

Width:  |  Height:  |  Size: 189 B

Before

Width:  |  Height:  |  Size: 169 B

After

Width:  |  Height:  |  Size: 169 B

Before

Width:  |  Height:  |  Size: 220 B

After

Width:  |  Height:  |  Size: 220 B

Before

Width:  |  Height:  |  Size: 204 B

After

Width:  |  Height:  |  Size: 204 B

Before

Width:  |  Height:  |  Size: 181 B

After

Width:  |  Height:  |  Size: 181 B

Before

Width:  |  Height:  |  Size: 203 B

After

Width:  |  Height:  |  Size: 203 B

Before

Width:  |  Height:  |  Size: 214 B

After

Width:  |  Height:  |  Size: 214 B

Before

Width:  |  Height:  |  Size: 197 B

After

Width:  |  Height:  |  Size: 197 B

Before

Width:  |  Height:  |  Size: 187 B

After

Width:  |  Height:  |  Size: 187 B

Before

Width:  |  Height:  |  Size: 176 B

After

Width:  |  Height:  |  Size: 176 B

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

Before

Width:  |  Height:  |  Size: 628 B

After

Width:  |  Height:  |  Size: 628 B

Before

Width:  |  Height:  |  Size: 553 B

After

Width:  |  Height:  |  Size: 553 B

+1 -1
View File
@@ -1 +1 @@
1118
1124
+2
View File
@@ -355,6 +355,7 @@ class PlayState extends MusicBeatState
boyfriend.dance();
var event:CountdownEvent = scripts.event("onCountdown", new CountdownEvent(
swagCounter,
introSprites[swagCounter],
introSounds[swagCounter],
1, 0.6, true));
@@ -370,6 +371,7 @@ class PlayState extends MusicBeatState
sprite = new FlxSprite().loadGraphic(spr);
sprite.scrollFactor.set();
sprite.scale.set(event.scale, event.scale);
sprite.updateHitbox();
sprite.screenCenter();
add(sprite);
+4 -12
View File
@@ -51,15 +51,10 @@ class Stage extends FlxBasic implements IBeatReceiver {
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}'));
}
spr.loadAnimatedGraphic(Paths.image('$spritesParentFolder${node.att.sprite}'));
var x:Null<Float> = Std.parseFloat(node.att.x);
var y:Null<Float> = Std.parseFloat(node.att.y);
if (x != null) spr.x = x;
@@ -77,6 +72,7 @@ class Stage extends FlxBasic implements IBeatReceiver {
if (scroll != null) spr.scrollFactor.y = scroll;
}
}
if (node.has.antialiasing) spr.antialiasing = node.att.antialiasing == "true";
if (node.has.scale) {
var scale:Null<Float> = Std.parseFloat(node.att.scale);
if (scale != null) spr.scale.set(scale, scale);
@@ -84,7 +80,6 @@ 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);
}
@@ -92,9 +87,6 @@ class Stage extends FlxBasic implements IBeatReceiver {
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);
@@ -44,8 +44,9 @@ class CountdownEvent extends CancellableEvent {
*/
public var sound:FlxSound;
public function new(spritePath:String, soundPath:String, scale:Float = 1, volume:Float = 1, antialiasing:Bool = true) {
public function new(swagCounter:Int, spritePath:String, soundPath:String, scale:Float = 1, volume:Float = 1, antialiasing:Bool = true) {
super();
this.swagCounter = swagCounter;
this.volume = volume;
this.soundPath = soundPath;
this.spritePath = spritePath;