text shit cookin
This commit is contained in:
parent
a9ada001f7
commit
11b1017753
|
@ -94,5 +94,5 @@
|
|||
|
||||
<!--Place custom nodes like icons here (higher priority to override the HaxeFlixel icon)-->
|
||||
<icon path="art/icon.png"/>
|
||||
<haxedef name="SKIP_TO_PLAYSTATE" if="debug" />
|
||||
<!-- <haxedef name="SKIP_TO_PLAYSTATE" if="debug" /> -->
|
||||
</project>
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -61,6 +61,7 @@ class Alphabet extends FlxSpriteGroup
|
|||
{
|
||||
doSplitWords();
|
||||
|
||||
var xPos:Float = 0;
|
||||
for (character in splitWords)
|
||||
{
|
||||
// if (character.fastCodeAt() == " ")
|
||||
|
@ -74,10 +75,9 @@ class Alphabet extends FlxSpriteGroup
|
|||
|
||||
if (AlphaCharacter.alphabet.contains(character.toLowerCase()))
|
||||
{
|
||||
var xPos:Float = 0;
|
||||
if (lastSprite != null)
|
||||
{
|
||||
xPos = lastSprite.x + lastSprite.width - 40;
|
||||
xPos = lastSprite.x + lastSprite.width;
|
||||
}
|
||||
|
||||
if (lastWasSpace)
|
||||
|
@ -92,7 +92,9 @@ class Alphabet extends FlxSpriteGroup
|
|||
if (isBold)
|
||||
letter.createBold(character);
|
||||
else
|
||||
{
|
||||
letter.createLetter(character);
|
||||
}
|
||||
|
||||
add(letter);
|
||||
|
||||
|
@ -108,6 +110,8 @@ class Alphabet extends FlxSpriteGroup
|
|||
splitWords = _finalText.split("");
|
||||
}
|
||||
|
||||
public var personTalking:String = 'gf';
|
||||
|
||||
public function startTypedText():Void
|
||||
{
|
||||
_finalText = text;
|
||||
|
@ -118,6 +122,7 @@ class Alphabet extends FlxSpriteGroup
|
|||
var loopNum:Int = 0;
|
||||
|
||||
var xPos:Float = 0;
|
||||
var curRow:Int = 0;
|
||||
|
||||
new FlxTimer().start(0.05, function(tmr:FlxTimer)
|
||||
{
|
||||
|
@ -126,7 +131,8 @@ class Alphabet extends FlxSpriteGroup
|
|||
{
|
||||
yMulti += 1;
|
||||
xPosResetted = true;
|
||||
// xPos = 0;
|
||||
xPos = 0;
|
||||
curRow += 1;
|
||||
}
|
||||
|
||||
if (splitWords[loopNum] == " ")
|
||||
|
@ -134,7 +140,9 @@ class Alphabet extends FlxSpriteGroup
|
|||
lastWasSpace = true;
|
||||
}
|
||||
|
||||
if (AlphaCharacter.alphabet.contains(splitWords[loopNum].toLowerCase()))
|
||||
var isNumber:Bool = AlphaCharacter.numbers.contains(splitWords[loopNum]);
|
||||
var isSymbol:Bool = AlphaCharacter.symbols.contains(splitWords[loopNum]);
|
||||
if (AlphaCharacter.alphabet.contains(splitWords[loopNum].toLowerCase()) || isNumber || isSymbol)
|
||||
{
|
||||
if (lastSprite != null && !xPosResetted)
|
||||
{
|
||||
|
@ -157,16 +165,35 @@ class Alphabet extends FlxSpriteGroup
|
|||
|
||||
// var letter:AlphaCharacter = new AlphaCharacter(30 * loopNum, 0);
|
||||
var letter:AlphaCharacter = new AlphaCharacter(xPos, 55 * yMulti);
|
||||
letter.row = curRow;
|
||||
if (isBold)
|
||||
{
|
||||
letter.createBold(splitWords[loopNum]);
|
||||
}
|
||||
else
|
||||
{
|
||||
letter.createLetter(splitWords[loopNum]);
|
||||
if (isNumber)
|
||||
{
|
||||
letter.createNumber(splitWords[loopNum]);
|
||||
}
|
||||
else if (isSymbol)
|
||||
{
|
||||
letter.createSymbol(splitWords[loopNum]);
|
||||
}
|
||||
else
|
||||
{
|
||||
letter.createLetter(splitWords[loopNum]);
|
||||
}
|
||||
|
||||
letter.x += 90;
|
||||
}
|
||||
|
||||
if (FlxG.random.bool(40))
|
||||
{
|
||||
var daSound:String = "GF_";
|
||||
FlxG.sound.play('assets/sounds/' + daSound + FlxG.random.int(1, 4) + TitleState.soundExt, 0.4);
|
||||
}
|
||||
|
||||
add(letter);
|
||||
|
||||
lastSprite = letter;
|
||||
|
@ -174,7 +201,7 @@ class Alphabet extends FlxSpriteGroup
|
|||
|
||||
loopNum += 1;
|
||||
|
||||
tmr.time = FlxG.random.float(0.05, 0.12);
|
||||
tmr.time = FlxG.random.float(0.04, 0.09);
|
||||
}, splitWords.length);
|
||||
}
|
||||
|
||||
|
@ -188,8 +215,11 @@ class AlphaCharacter extends FlxSprite
|
|||
{
|
||||
public static var alphabet:String = "abcdefghijklmnopqrstuvwxyz";
|
||||
|
||||
var numbers:String = "1234567890";
|
||||
var symbols:String = "|~#$%()*+-:;<=>@[]^_";
|
||||
public static var numbers:String = "1234567890";
|
||||
|
||||
public static var symbols:String = "|~#$%()*+-:;<=>@[]^_.,'!?";
|
||||
|
||||
public var row:Int = 0;
|
||||
|
||||
public function new(x:Float, y:Float)
|
||||
{
|
||||
|
@ -218,5 +248,41 @@ class AlphaCharacter extends FlxSprite
|
|||
animation.addByPrefix(letter, letter + " " + letterCase, 24);
|
||||
animation.play(letter);
|
||||
updateHitbox();
|
||||
|
||||
FlxG.log.add('the row' + row);
|
||||
|
||||
y = (110 - height);
|
||||
y += row * 60;
|
||||
}
|
||||
|
||||
public function createNumber(letter:String):Void
|
||||
{
|
||||
animation.addByPrefix(letter, letter, 24);
|
||||
animation.play(letter);
|
||||
|
||||
updateHitbox();
|
||||
}
|
||||
|
||||
public function createSymbol(letter:String)
|
||||
{
|
||||
switch (letter)
|
||||
{
|
||||
case '.':
|
||||
animation.addByPrefix(letter, 'period', 24);
|
||||
animation.play(letter);
|
||||
y += 50;
|
||||
case "'":
|
||||
animation.addByPrefix(letter, 'apostraphie', 24);
|
||||
animation.play(letter);
|
||||
y -= 0;
|
||||
case "?":
|
||||
animation.addByPrefix(letter, 'question mark', 24);
|
||||
animation.play(letter);
|
||||
case "!":
|
||||
animation.addByPrefix(letter, 'exclamation point', 24);
|
||||
animation.play(letter);
|
||||
}
|
||||
|
||||
updateHitbox();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -84,7 +84,7 @@ class MainMenuState extends MusicBeatState
|
|||
}
|
||||
else
|
||||
{
|
||||
FlxFlicker.flicker(magenta, 0, 0.40);
|
||||
FlxFlicker.flicker(magenta, 0, 0.30);
|
||||
|
||||
menuItems.forEach(function(spr:FlxSprite)
|
||||
{
|
||||
|
|
|
@ -16,6 +16,7 @@ import flixel.graphics.atlas.FlxAtlas;
|
|||
import flixel.graphics.frames.FlxAtlasFrames;
|
||||
import flixel.group.FlxGroup.FlxTypedGroup;
|
||||
import flixel.math.FlxMath;
|
||||
import flixel.math.FlxPoint;
|
||||
import flixel.system.FlxSound;
|
||||
import flixel.text.FlxText;
|
||||
import flixel.tweens.FlxEase;
|
||||
|
@ -33,7 +34,7 @@ using StringTools;
|
|||
|
||||
class PlayState extends MusicBeatState
|
||||
{
|
||||
public static var curLevel:String = 'Bopeebo';
|
||||
public static var curLevel:String = 'Tutorial';
|
||||
public static var SONG:SwagSong;
|
||||
public static var isStoryMode:Bool = false;
|
||||
public static var storyPlaylist:Array<String> = [];
|
||||
|
@ -77,6 +78,8 @@ class PlayState extends MusicBeatState
|
|||
|
||||
var halloweenBG:FlxSprite;
|
||||
|
||||
var talking:Bool = true;
|
||||
|
||||
override public function create()
|
||||
{
|
||||
// var gameCam:FlxCamera = FlxG.camera;
|
||||
|
@ -97,6 +100,19 @@ class PlayState extends MusicBeatState
|
|||
|
||||
Conductor.changeBPM(SONG.bpm);
|
||||
|
||||
switch (SONG.song.toLowerCase())
|
||||
{
|
||||
case 'tutorial':
|
||||
dialogue = ["Hey you're pretty cute.", 'Use the arrow keys to keep up \nwith me singing.'];
|
||||
case 'bopeebo':
|
||||
dialogue = [
|
||||
'HEY!',
|
||||
"You think you can just sing\nwith my daughter like that?",
|
||||
"If you want to date her...",
|
||||
"You're going to have to go \nthrough ME first!"
|
||||
];
|
||||
}
|
||||
|
||||
if (SONG.song.toLowerCase() == 'spookeez' || SONG.song.toLowerCase() == 'monster' || SONG.song.toLowerCase() == 'south')
|
||||
{
|
||||
halloweenLevel = true;
|
||||
|
@ -147,15 +163,25 @@ class PlayState extends MusicBeatState
|
|||
dad = new Character(100, 100, SONG.player2);
|
||||
add(dad);
|
||||
|
||||
var camPos:FlxPoint = new FlxPoint(dad.getGraphicMidpoint().x, dad.getGraphicMidpoint().y);
|
||||
|
||||
switch (SONG.player2)
|
||||
{
|
||||
case 'gf':
|
||||
dad.setPosition(gf.x, gf.y);
|
||||
gf.visible = false;
|
||||
if (isStoryMode)
|
||||
{
|
||||
camPos.x += 600;
|
||||
tweenCamIn();
|
||||
}
|
||||
|
||||
case "spooky":
|
||||
dad.y += 200;
|
||||
case "monster":
|
||||
dad.y += 100;
|
||||
case 'dad':
|
||||
camPos.x += 400;
|
||||
}
|
||||
|
||||
boyfriend = new Boyfriend(770, 450);
|
||||
|
@ -166,7 +192,6 @@ class PlayState extends MusicBeatState
|
|||
doof.y = FlxG.height * 0.5;
|
||||
doof.scrollFactor.set();
|
||||
doof.finishThing = startCountdown;
|
||||
add(doof);
|
||||
|
||||
Conductor.songPosition = -5000;
|
||||
|
||||
|
@ -187,7 +212,8 @@ class PlayState extends MusicBeatState
|
|||
// add(strumLine);
|
||||
|
||||
camFollow = new FlxObject(0, 0, 1, 1);
|
||||
camFollow.setPosition(dad.getGraphicMidpoint().x, dad.getGraphicMidpoint().y);
|
||||
|
||||
camFollow.setPosition(camPos.x, camPos.y);
|
||||
add(camFollow);
|
||||
|
||||
FlxG.camera.follow(camFollow, LOCKON, 0.04);
|
||||
|
@ -220,11 +246,20 @@ class PlayState extends MusicBeatState
|
|||
healthHeads.antialiasing = true;
|
||||
add(healthHeads);
|
||||
|
||||
// healthBar.visible = healthHeads.visible = healthBarBG.visible = false;
|
||||
if (isStoryMode)
|
||||
{
|
||||
add(doof);
|
||||
}
|
||||
else
|
||||
startCountdown();
|
||||
|
||||
strumLineNotes.cameras = [camHUD];
|
||||
notes.cameras = [camHUD];
|
||||
healthBar.cameras = [camHUD];
|
||||
healthBarBG.cameras = [camHUD];
|
||||
healthHeads.cameras = [camHUD];
|
||||
doof.cameras = [camHUD];
|
||||
|
||||
// if (SONG.song == 'South')
|
||||
// FlxG.camera.alpha = 0.7;
|
||||
|
@ -239,6 +274,10 @@ class PlayState extends MusicBeatState
|
|||
|
||||
function startCountdown():Void
|
||||
{
|
||||
generateStaticArrows(0);
|
||||
generateStaticArrows(1);
|
||||
|
||||
talking = false;
|
||||
startedCountdown = true;
|
||||
Conductor.songPosition = 0;
|
||||
Conductor.songPosition -= Conductor.crochet * 5;
|
||||
|
@ -323,9 +362,6 @@ class PlayState extends MusicBeatState
|
|||
{
|
||||
// FlxG.log.add(ChartParser.parse());
|
||||
|
||||
generateStaticArrows(0);
|
||||
generateStaticArrows(1);
|
||||
|
||||
var songData = SONG;
|
||||
Conductor.changeBPM(songData.bpm);
|
||||
|
||||
|
@ -483,6 +519,11 @@ class PlayState extends MusicBeatState
|
|||
}
|
||||
}
|
||||
|
||||
function tweenCamIn():Void
|
||||
{
|
||||
FlxTween.tween(FlxG.camera, {zoom: 1.3}, (Conductor.stepCrochet * 4 / 1000), {ease: FlxEase.elasticInOut});
|
||||
}
|
||||
|
||||
override function openSubState(SubState:FlxSubState)
|
||||
{
|
||||
if (paused)
|
||||
|
@ -530,7 +571,7 @@ class PlayState extends MusicBeatState
|
|||
// trace("SONG POS: " + Conductor.songPosition);
|
||||
// FlxG.sound.music.pitch = 2;
|
||||
|
||||
if (FlxG.keys.justPressed.ENTER)
|
||||
if (FlxG.keys.justPressed.ENTER && startedCountdown)
|
||||
{
|
||||
persistentUpdate = false;
|
||||
persistentDraw = true;
|
||||
|
@ -605,7 +646,7 @@ class PlayState extends MusicBeatState
|
|||
|
||||
if (SONG.song.toLowerCase() == 'tutorial')
|
||||
{
|
||||
FlxTween.tween(FlxG.camera, {zoom: 1.3}, (Conductor.stepCrochet * 4 / 1000), {ease: FlxEase.elasticInOut});
|
||||
tweenCamIn();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -185,6 +185,7 @@ class StoryMenuState extends MusicBeatState
|
|||
PlayState.SONG = Song.loadFromJson(PlayState.storyPlaylist[0].toLowerCase());
|
||||
new FlxTimer().start(1, function(tmr:FlxTimer)
|
||||
{
|
||||
FlxG.sound.music.stop();
|
||||
FlxG.switchState(new PlayState());
|
||||
});
|
||||
}
|
||||
|
|
|
@ -32,7 +32,8 @@ class TitleState extends MusicBeatState
|
|||
['Shoutouts to tom fulp', 'lmao'], ["Ludum dare", "extraordinaire"], ['Cyberzone', 'coming soon'], ['love to thriftman', 'swag'],
|
||||
['ULTIMATE RHYTHM GAMING', 'probably'], ['DOPE ASS GAME', 'playstation magazine'], ['in loving memory of', 'henryeyes'], ['dancin', 'forever'],
|
||||
['Ritz dx', 'rest in peace'], ['rate five', 'do not blam'], ['rhythm gaming', 'ultimate'], ['game of the year', 'forever'],
|
||||
['you already know', 'we really out here'], ['rise and grind', 'love to luis'], ['like parappa', 'but cooler']];
|
||||
['you already know', 'we really out here'], ['rise and grind', 'love to luis'], ['like parappa', 'but cooler'],
|
||||
['album of the year', 'chuckie finster']];
|
||||
|
||||
var curWacky:Array<String> = [];
|
||||
|
||||
|
|
Loading…
Reference in New Issue