new stuff

This commit is contained in:
Yoshman29
2022-12-31 04:11:50 +01:00
parent 8b6717eeb9
commit c953825216
6 changed files with 30 additions and 6 deletions
+4 -4
View File
@@ -3,10 +3,10 @@
<!-- tankman actually have player offsets !-->
<character isPlayer="true" flipX="true" x="0" y="180" camx="0">
<anim name="idle" anim="Tankman Idle Dance instance 100" fps="24" loop="false" x="0" y="0" />
<anim name="singRIGHT" anim="Tankman Right Note instance 1000" fps="24" loop="true" x="-1" y="-7" />
<anim name="singDOWN" anim="Tankman DOWN note instance 1000" fps="24" loop="true" x="98" y="-90" />
<anim name="singUP" anim="Tankman UP note instance 1000" fps="24" loop="true" x="24" y="56" />
<anim name="singLEFT" anim="Tankman Note Left instance 1000" fps="24" loop="true" x="100" y="-14" />
<anim name="singRIGHT" anim="Tankman Right Note instance 1000" fps="24" loop="false" x="-1" y="-7" />
<anim name="singDOWN" anim="Tankman DOWN note instance 1000" fps="24" loop="false" x="98" y="-90" />
<anim name="singUP" anim="Tankman UP note instance 1000" fps="24" loop="false" x="24" y="56" />
<anim name="singLEFT" anim="Tankman Note Left instance 1000" fps="24" loop="false" x="100" y="-14" />
<!-- Heh! Pretty Good! -->
<anim name="singDOWN-alt" anim="PRETTY GOOD tankman instance 100" fps="24" loop="false" x="98" y="-90" />
+1 -1
View File
@@ -1 +1 @@
1873
1874
+3
View File
@@ -246,6 +246,9 @@ class Character extends FlxSprite implements IBeatReceiver implements IOffsetCom
dance();
case DANCE:
dance();
case LOCK:
if (animation.curAnim == null)
dance();
default:
if (animation.curAnim == null || animation.curAnim.finished)
dance();
+4
View File
@@ -47,6 +47,8 @@ class Script extends FlxBasic implements IFlxDestroyable {
"FlxTypeText" => flixel.addons.text.FlxTypeText,
"FlxText" => flixel.text.FlxText,
"FlxTimer" => flixel.util.FlxTimer,
"FlxPoint" => CoolUtil.getMacroAbstractClass("flixel.math.FlxPoint"),
"FlxAxes" => CoolUtil.getMacroAbstractClass("flixel.util.FlxAxes"),
// Engine related stuff
"engine" => {
@@ -57,6 +59,8 @@ class Script extends FlxBasic implements IFlxDestroyable {
"ModSubState" => funkin.scripting.ModSubState,
"PlayState" => funkin.game.PlayState,
"GameOverSubstate" => funkin.game.GameOverSubstate,
"HealthIcon" => funkin.game.HealthIcon,
"HudCamera" => funkin.game.HudCamera,
"Note" => funkin.game.Note,
"Strum" => funkin.game.Strum,
"Character" => funkin.game.Character,
@@ -42,22 +42,32 @@ class PlayAnimEvent extends CancellableEvent {
@:enum
abstract PlayAnimContext(String) {
/**
No context was given for the animation
No context was given for the animation.
The character won't dance until the animation is finished
**/
var NONE = null;
/**
Whenever a note is hit and a sing animation will be played.
The character will only dance after their holdTime is reached.
**/
var SING = "SING";
/**
Whenever a dance animation is played.
The character's dancing wont be blocked.
**/
var DANCE = "DANCE";
/**
Whenever a note is missed and a miss animation will be played.
Only for scripting, since it has the same effects as SING.
**/
var MISS = "MISS";
/**
Locks the character's animation.
Prevents the character from dancing, even if the animation ended.
**/
var LOCK = "LOCK";
}
+7
View File
@@ -351,4 +351,11 @@ class CoolUtil
spr.antialiasing = FlxSprite.defaultAntialiasing;
spr.rotOffset.set();
}
/**
* Gets the macro class created by hscript-improved for an abstract / enum
*/
public static function getMacroAbstractClass(className:String) {
return Type.resolveClass('${className}_HSC');
}
}