mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2025-06-21 18:23:12 +00:00
character select hint text
This commit is contained in:
parent
5f60be6d75
commit
bc86f1f459
|
@ -9,6 +9,7 @@ import flixel.group.FlxGroup.FlxTypedGroup;
|
||||||
import flixel.group.FlxSpriteGroup.FlxTypedSpriteGroup;
|
import flixel.group.FlxSpriteGroup.FlxTypedSpriteGroup;
|
||||||
import flixel.input.touch.FlxTouch;
|
import flixel.input.touch.FlxTouch;
|
||||||
import flixel.math.FlxAngle;
|
import flixel.math.FlxAngle;
|
||||||
|
import flixel.math.FlxMath;
|
||||||
import flixel.math.FlxPoint;
|
import flixel.math.FlxPoint;
|
||||||
import flixel.system.debug.watch.Tracker.TrackerProfile;
|
import flixel.system.debug.watch.Tracker.TrackerProfile;
|
||||||
import flixel.text.FlxText;
|
import flixel.text.FlxText;
|
||||||
|
@ -180,6 +181,8 @@ class FreeplayState extends MusicBeatSubState
|
||||||
var ostName:FlxText;
|
var ostName:FlxText;
|
||||||
var albumRoll:AlbumRoll;
|
var albumRoll:AlbumRoll;
|
||||||
|
|
||||||
|
var charSelectHint:FlxText;
|
||||||
|
|
||||||
var letterSort:LetterSort;
|
var letterSort:LetterSort;
|
||||||
var exitMovers:ExitMoverData = new Map();
|
var exitMovers:ExitMoverData = new Map();
|
||||||
|
|
||||||
|
@ -279,6 +282,7 @@ class FreeplayState extends MusicBeatSubState
|
||||||
txtCompletion = new AtlasText(1185, 87, '69', AtlasFont.FREEPLAY_CLEAR);
|
txtCompletion = new AtlasText(1185, 87, '69', AtlasFont.FREEPLAY_CLEAR);
|
||||||
|
|
||||||
ostName = new FlxText(8, 8, FlxG.width - 8 - 8, 'OFFICIAL OST', 48);
|
ostName = new FlxText(8, 8, FlxG.width - 8 - 8, 'OFFICIAL OST', 48);
|
||||||
|
charSelectHint = new FlxText(-40, 18, FlxG.width - 8 - 8, 'Press [ LOL ] to change characters', 32);
|
||||||
|
|
||||||
bgDad = new FlxSprite(backingCard.pinkBack.width * 0.74, 0).loadGraphic(styleData == null ? 'freeplay/freeplayBGdad' : styleData.getBgAssetGraphic());
|
bgDad = new FlxSprite(backingCard.pinkBack.width * 0.74, 0).loadGraphic(styleData == null ? 'freeplay/freeplayBGdad' : styleData.getBgAssetGraphic());
|
||||||
}
|
}
|
||||||
|
@ -498,7 +502,14 @@ class FreeplayState extends MusicBeatSubState
|
||||||
ostName.alignment = RIGHT;
|
ostName.alignment = RIGHT;
|
||||||
ostName.visible = false;
|
ostName.visible = false;
|
||||||
|
|
||||||
exitMovers.set([overhangStuff, fnfFreeplay, ostName],
|
charSelectHint.alignment = CENTER;
|
||||||
|
charSelectHint.font = "5by7";
|
||||||
|
charSelectHint.color = 0xFF5F5F5F;
|
||||||
|
charSelectHint.text = 'Press [ ${controls.getDialogueNameFromControl(FREEPLAY_CHAR_SELECT, true)} ] to change characters';
|
||||||
|
charSelectHint.y -= 100;
|
||||||
|
FlxTween.tween(charSelectHint, {y: charSelectHint.y + 100}, 0.8, {ease: FlxEase.quartOut});
|
||||||
|
|
||||||
|
exitMovers.set([overhangStuff, fnfFreeplay, ostName, charSelectHint],
|
||||||
{
|
{
|
||||||
y: -overhangStuff.height,
|
y: -overhangStuff.height,
|
||||||
x: 0,
|
x: 0,
|
||||||
|
@ -506,7 +517,7 @@ class FreeplayState extends MusicBeatSubState
|
||||||
wait: 0
|
wait: 0
|
||||||
});
|
});
|
||||||
|
|
||||||
exitMoversCharSel.set([overhangStuff, fnfFreeplay, ostName],
|
exitMoversCharSel.set([overhangStuff, fnfFreeplay, ostName, charSelectHint],
|
||||||
{
|
{
|
||||||
y: -300,
|
y: -300,
|
||||||
speed: 0.8,
|
speed: 0.8,
|
||||||
|
@ -604,6 +615,11 @@ class FreeplayState extends MusicBeatSubState
|
||||||
add(fnfFreeplay);
|
add(fnfFreeplay);
|
||||||
add(ostName);
|
add(ostName);
|
||||||
|
|
||||||
|
if (PlayerRegistry.instance.hasNewCharacter() == true)
|
||||||
|
{
|
||||||
|
add(charSelectHint);
|
||||||
|
}
|
||||||
|
|
||||||
// be careful not to "add()" things in here unless it's to a group that's already added to the state
|
// be careful not to "add()" things in here unless it's to a group that's already added to the state
|
||||||
// otherwise it won't be properly attatched to funnyCamera (relavent code should be at the bottom of create())
|
// otherwise it won't be properly attatched to funnyCamera (relavent code should be at the bottom of create())
|
||||||
var onDJIntroDone = function() {
|
var onDJIntroDone = function() {
|
||||||
|
@ -1348,10 +1364,19 @@ class FreeplayState extends MusicBeatSubState
|
||||||
|
|
||||||
var originalPos:FlxPoint = new FlxPoint();
|
var originalPos:FlxPoint = new FlxPoint();
|
||||||
|
|
||||||
|
var hintTimer:Float = 0;
|
||||||
|
|
||||||
override function update(elapsed:Float):Void
|
override function update(elapsed:Float):Void
|
||||||
{
|
{
|
||||||
super.update(elapsed);
|
super.update(elapsed);
|
||||||
|
|
||||||
|
if (charSelectHint != null)
|
||||||
|
{
|
||||||
|
hintTimer += elapsed * 2;
|
||||||
|
var targetAmt:Float = (Math.sin(hintTimer) + 1) / 2;
|
||||||
|
charSelectHint.alpha = FlxMath.lerp(0.3, 0.9, targetAmt);
|
||||||
|
}
|
||||||
|
|
||||||
#if FEATURE_DEBUG_FUNCTIONS
|
#if FEATURE_DEBUG_FUNCTIONS
|
||||||
if (FlxG.keys.justPressed.P)
|
if (FlxG.keys.justPressed.P)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue