Merge pull request #1647 from Spel0/botplay-light-strums
Botplay light player strums
This commit is contained in:
commit
6c28a104ca
@ -194,7 +194,7 @@ class PlayState extends MusicBeatState
|
||||
|
||||
var notesHitArray:Array<Date> = [];
|
||||
var currentFrames:Int = 0;
|
||||
var idleToBeat:Bool = true; // change if bf and dad would idle to the beat of the song
|
||||
var idleToBeat:Bool = false; // change if bf and dad would idle to the beat of the song
|
||||
var idleBeat:Int = 4; // how frequently bf and dad would play their idle animation(1 - every beat, 2 - every 2 beats and so on)
|
||||
|
||||
public var dialogue:Array<String> = ['dad:blah blah blah', 'bf:coolswag'];
|
||||
@ -3259,6 +3259,17 @@ class PlayState extends MusicBeatState
|
||||
spr.centerOffsets();
|
||||
}
|
||||
});
|
||||
if (PlayStateChangeables.botPlay)
|
||||
{
|
||||
playerStrums.forEach(function(spr:FlxSprite)
|
||||
{
|
||||
if (spr.animation.finished)
|
||||
{
|
||||
spr.animation.play('static');
|
||||
spr.centerOffsets();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if (!inCutscene && songStarted)
|
||||
@ -3928,6 +3939,24 @@ class PlayState extends MusicBeatState
|
||||
{
|
||||
goodNoteHit(daNote);
|
||||
boyfriend.holdTimer = daNote.sustainLength;
|
||||
if (FlxG.save.data.cpuStrums)
|
||||
{
|
||||
playerStrums.forEach(function(spr:FlxSprite)
|
||||
{
|
||||
if (Math.abs(daNote.noteData) == spr.ID)
|
||||
{
|
||||
spr.animation.play('confirm', true);
|
||||
}
|
||||
if (spr.animation.curAnim.name == 'confirm' && !curStage.startsWith('school'))
|
||||
{
|
||||
spr.centerOffsets();
|
||||
spr.offset.x -= 13;
|
||||
spr.offset.y -= 13;
|
||||
}
|
||||
else
|
||||
spr.centerOffsets();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -3939,22 +3968,25 @@ class PlayState extends MusicBeatState
|
||||
boyfriend.playAnim('idle');
|
||||
}
|
||||
|
||||
playerStrums.forEach(function(spr:FlxSprite)
|
||||
if (!PlayStateChangeables.botPlay)
|
||||
{
|
||||
if (keys[spr.ID] && spr.animation.curAnim.name != 'confirm')
|
||||
spr.animation.play('pressed', false);
|
||||
if (!keys[spr.ID])
|
||||
spr.animation.play('static', false);
|
||||
|
||||
if (spr.animation.curAnim.name == 'confirm' && !curStage.startsWith('school'))
|
||||
playerStrums.forEach(function(spr:FlxSprite)
|
||||
{
|
||||
spr.centerOffsets();
|
||||
spr.offset.x -= 13;
|
||||
spr.offset.y -= 13;
|
||||
}
|
||||
else
|
||||
spr.centerOffsets();
|
||||
});
|
||||
if (keys[spr.ID] && spr.animation.curAnim.name != 'confirm')
|
||||
spr.animation.play('pressed', false);
|
||||
if (!keys[spr.ID])
|
||||
spr.animation.play('static', false);
|
||||
|
||||
if (spr.animation.curAnim.name == 'confirm' && !curStage.startsWith('school'))
|
||||
{
|
||||
spr.centerOffsets();
|
||||
spr.offset.x -= 13;
|
||||
spr.offset.y -= 13;
|
||||
}
|
||||
else
|
||||
spr.centerOffsets();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public function findByTime(time:Float):Array<Dynamic>
|
||||
|
@ -88,7 +88,7 @@ class ResultsScreen extends FlxSubState
|
||||
var bads = PlayState.isStoryMode ? PlayState.campaignBads : PlayState.bads;
|
||||
var shits = PlayState.isStoryMode ? PlayState.campaignShits : PlayState.shits;
|
||||
|
||||
comboText = new FlxText(20,-75,0,'Judgements:\nSicks - ${PlayState.sicks}\nGoods - ${sicks}\nBads - ${bads}\n\nCombo Breaks: ${(PlayState.isStoryMode ? PlayState.campaignMisses : PlayState.misses)}\nHighest Combo: ${PlayState.highestCombo + 1}\nScore: ${PlayState.instance.songScore}\nAccuracy: ${HelperFunctions.truncateFloat(PlayState.instance.accuracy,2)}%\n\n${Ratings.GenerateLetterRank(PlayState.instance.accuracy)}\n\n${!PlayState.loadRep ? "F1 - View replay\nF2 - Replay song" : ""}
|
||||
comboText = new FlxText(20,-75,0,'Judgements:\nSicks - ${sicks}\nGoods - ${goods}\nBads - ${bads}\n\nCombo Breaks: ${(PlayState.isStoryMode ? PlayState.campaignMisses : PlayState.misses)}\nHighest Combo: ${PlayState.highestCombo + 1}\nScore: ${PlayState.instance.songScore}\nAccuracy: ${HelperFunctions.truncateFloat(PlayState.instance.accuracy,2)}%\n\n${Ratings.GenerateLetterRank(PlayState.instance.accuracy)}\n\n${!PlayState.loadRep ? "F1 - View replay\nF2 - Replay song" : ""}
|
||||
');
|
||||
comboText.size = 28;
|
||||
comboText.setBorderStyle(FlxTextBorderStyle.OUTLINE,FlxColor.BLACK,4,1);
|
||||
|
Loading…
x
Reference in New Issue
Block a user