Merge branch 'master' of https://github.com/KadeDev/Kade-Engine
Before Width: | Height: | Size: 193 KiB |
BIN
assets/preload/images/icons/icon-bf-old.png
Normal file
After Width: | Height: | Size: 5.7 KiB |
BIN
assets/preload/images/icons/icon-bf-pixel.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
assets/preload/images/icons/icon-bf.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
assets/preload/images/icons/icon-dad.png
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
assets/preload/images/icons/icon-face.png
Normal file
After Width: | Height: | Size: 3.5 KiB |
BIN
assets/preload/images/icons/icon-gf.png
Normal file
After Width: | Height: | Size: 10 KiB |
BIN
assets/preload/images/icons/icon-mom.png
Normal file
After Width: | Height: | Size: 9.3 KiB |
BIN
assets/preload/images/icons/icon-monster.png
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
assets/preload/images/icons/icon-parents.png
Normal file
After Width: | Height: | Size: 32 KiB |
BIN
assets/preload/images/icons/icon-pico.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
assets/preload/images/icons/icon-senpai.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
assets/preload/images/icons/icon-sm.png
Normal file
After Width: | Height: | Size: 7.4 KiB |
BIN
assets/preload/images/icons/icon-spirit.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
assets/preload/images/icons/icon-spooky.png
Normal file
After Width: | Height: | Size: 7.0 KiB |
BIN
assets/preload/images/icons/icon-tankman.png
Normal file
After Width: | Height: | Size: 3.0 KiB |
Before Width: | Height: | Size: 7.0 KiB |
@ -2108,13 +2108,13 @@ class ChartingState extends MusicBeatState
|
||||
{
|
||||
if (check_mustHitSection.checked)
|
||||
{
|
||||
leftIcon.animation.play(_song.player1);
|
||||
rightIcon.animation.play(_song.player2);
|
||||
leftIcon.changeIcon(_song.player1);
|
||||
rightIcon.changeIcon(_song.player2);
|
||||
}
|
||||
else
|
||||
{
|
||||
leftIcon.animation.play(_song.player2);
|
||||
rightIcon.animation.play(_song.player1);
|
||||
leftIcon.changeIcon(_song.player2);
|
||||
rightIcon.changeIcon(_song.player1);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3,59 +3,58 @@ package;
|
||||
import flixel.FlxG;
|
||||
import flixel.FlxSprite;
|
||||
|
||||
using StringTools;
|
||||
|
||||
class HealthIcon extends FlxSprite
|
||||
{
|
||||
public var char:String = 'bf';
|
||||
public var isPlayer:Bool = false;
|
||||
public var isOldIcon:Bool = false;
|
||||
|
||||
/**
|
||||
* Used for FreeplayState! If you use it elsewhere, prob gonna annoying
|
||||
*/
|
||||
public var sprTracker:FlxSprite;
|
||||
|
||||
public function new(char:String = 'bf', isPlayer:Bool = false)
|
||||
public function new(?char:String = "bf", ?isPlayer:Bool = false)
|
||||
{
|
||||
super();
|
||||
|
||||
if(FlxG.save.data.antialiasing)
|
||||
this.char = char;
|
||||
this.isPlayer = isPlayer;
|
||||
|
||||
isPlayer = isOldIcon = false;
|
||||
|
||||
if (FlxG.save.data.antialiasing)
|
||||
{
|
||||
switch(char)
|
||||
{
|
||||
antialiasing = true;
|
||||
case 'bf-pixel' | 'senpai' | 'senpai-angry' | 'spirit' | 'gf-pixel':
|
||||
antialiasing = false;
|
||||
default:
|
||||
antialiasing = true;
|
||||
}
|
||||
if (char == 'sm')
|
||||
{
|
||||
loadGraphic(Paths.image("stepmania-icon"));
|
||||
return;
|
||||
}
|
||||
loadGraphic(Paths.image('iconGrid'), true, 150, 150);
|
||||
animation.add('bf', [0, 1], 0, false, isPlayer);
|
||||
animation.add('bf-car', [0, 1], 0, false, isPlayer);
|
||||
animation.add('bf-christmas', [0, 1], 0, false, isPlayer);
|
||||
animation.add('bf-pixel', [21, 21], 0, false, isPlayer);
|
||||
animation.add('spooky', [2, 3], 0, false, isPlayer);
|
||||
animation.add('pico', [4, 5], 0, false, isPlayer);
|
||||
animation.add('mom', [6, 7], 0, false, isPlayer);
|
||||
animation.add('mom-car', [6, 7], 0, false, isPlayer);
|
||||
animation.add('tankman', [8, 9], 0, false, isPlayer);
|
||||
animation.add('face', [10, 11], 0, false, isPlayer);
|
||||
animation.add('dad', [12, 13], 0, false, isPlayer);
|
||||
animation.add('senpai', [22, 22], 0, false, isPlayer);
|
||||
animation.add('senpai-angry', [22, 22], 0, false, isPlayer);
|
||||
animation.add('spirit', [23, 23], 0, false, isPlayer);
|
||||
animation.add('bf-old', [14, 15], 0, false, isPlayer);
|
||||
animation.add('gf', [16], 0, false, isPlayer);
|
||||
animation.add('gf-christmas', [16], 0, false, isPlayer);
|
||||
animation.add('gf-pixel', [16], 0, false, isPlayer);
|
||||
animation.add('parents-christmas', [17, 18], 0, false, isPlayer);
|
||||
animation.add('monster', [19, 20], 0, false, isPlayer);
|
||||
animation.add('monster-christmas', [19, 20], 0, false, isPlayer);
|
||||
animation.play(char);
|
||||
|
||||
switch(char)
|
||||
{
|
||||
case 'bf-pixel' | 'senpai' | 'senpai-angry' | 'spirit' | 'gf-pixel':
|
||||
antialiasing = false;
|
||||
}
|
||||
|
||||
changeIcon(char);
|
||||
scrollFactor.set();
|
||||
}
|
||||
|
||||
public function swapOldIcon()
|
||||
{
|
||||
(isOldIcon = !isOldIcon) ? changeIcon("bf-old") : changeIcon(char);
|
||||
}
|
||||
|
||||
public function changeIcon(char:String)
|
||||
{
|
||||
if (char != 'bf-pixel' && char != 'bf-old')
|
||||
char = char.split("-")[0];
|
||||
|
||||
loadGraphic(Paths.image('icons/icon-' + char), true, 150, 150);
|
||||
animation.add(char, [0, 1], 0, false, isPlayer);
|
||||
animation.play(char);
|
||||
}
|
||||
|
||||
override function update(elapsed:Float)
|
||||
{
|
||||
super.update(elapsed);
|
||||
|
@ -241,7 +241,7 @@ class ModchartState
|
||||
PlayState.instance.removeObject(PlayState.dad);
|
||||
PlayState.dad = new Character(olddadx, olddady, id);
|
||||
PlayState.instance.addObject(PlayState.dad);
|
||||
PlayState.instance.iconP2.animation.play(id);
|
||||
PlayState.instance.iconP2.changeIcon(id);
|
||||
}
|
||||
|
||||
function changeBoyfriendCharacter(id:String)
|
||||
@ -250,7 +250,7 @@ class ModchartState
|
||||
PlayState.instance.removeObject(PlayState.boyfriend);
|
||||
PlayState.boyfriend = new Boyfriend(oldboyfriendx, oldboyfriendy, id);
|
||||
PlayState.instance.addObject(PlayState.boyfriend);
|
||||
PlayState.instance.iconP1.animation.play(id);
|
||||
PlayState.instance.iconP1.changeIcon(id);
|
||||
}
|
||||
|
||||
function makeAnimatedLuaSprite(spritePath:String,names:Array<String>,prefixes:Array<String>,startAnim:String, id:String)
|
||||
|
@ -2394,12 +2394,7 @@ class PlayState extends MusicBeatState
|
||||
}
|
||||
|
||||
if (FlxG.keys.justPressed.NINE)
|
||||
{
|
||||
if (iconP1.animation.curAnim.name == 'bf-old')
|
||||
iconP1.animation.play(SONG.player1);
|
||||
else
|
||||
iconP1.animation.play('bf-old');
|
||||
}
|
||||
iconP1.swapOldIcon();
|
||||
|
||||
switch (curStage)
|
||||
{
|
||||
|