more week 7 stuff
This commit is contained in:
@@ -10,4 +10,5 @@
|
||||
<anim name="singRIGHTmiss" anim="BF NOTE RIGHT MISS" fps="24" loop="false" x="-30" y="21"/>
|
||||
<anim name="singDOWNmiss" anim="BF NOTE DOWN MISS" fps="24" loop="false" x="-11" y="-19"/>
|
||||
<anim name="hey" anim="BF HEY" fps="24" loop="false" x="7" y="4"/>
|
||||
<anim name="scared" anim="BF idle shaking" fps="24" loop="true" x="-4" y="0"/>
|
||||
</character>
|
||||
@@ -0,0 +1,19 @@
|
||||
var dir = 2;
|
||||
|
||||
function onDance(event) {
|
||||
event.cancel();
|
||||
|
||||
playAnim("idle" + Std.string(dir), true, "DANCE");
|
||||
}
|
||||
|
||||
function onPlaySingAnim(event) {
|
||||
dir = FlxG.random.int(0, 1) + (event.direction == 0 ? 1 : 3);
|
||||
event.cancel();
|
||||
|
||||
playAnim("shoot" + Std.string(dir), true);
|
||||
}
|
||||
|
||||
function update(elapsed) {
|
||||
if (animation.curAnim == null || (animation.curAnim.name.substr(0, 5) == "shoot" && animation.curAnim.finished))
|
||||
dance();
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
<!DOCTYPE codename-engine-character>
|
||||
<character isPlayer="false" flipX="false" icon="pico" x="140" y="-125">
|
||||
<!-- Left Animations -->
|
||||
<anim name="shoot1" anim="Pico shoot 1" fps="24" loop="false" indices="0,1,2,3" />
|
||||
<anim name="idle1" anim="Pico shoot 1" fps="24" loop="false" indices="4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24" />
|
||||
|
||||
<anim name="shoot2" anim="Pico shoot 2" fps="24" loop="false" indices="0,1,2,3" x="-1" y="-128" />
|
||||
<anim name="idle2" anim="Pico shoot 2" fps="24" loop="false" indices="4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24" x="-1" y="-128" />
|
||||
|
||||
<!-- Right Animations-->
|
||||
<anim name="shoot3" anim="Pico shoot 3" fps="24" loop="false" indices="0,1,2,3" x="412" y="-64" />
|
||||
<anim name="idle3" anim="Pico shoot 3" fps="24" loop="false" indices="4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24" x="412" y="-64" />
|
||||
|
||||
<anim name="shoot4" anim="Pico shoot 4" fps="24" loop="false" indices="0,1,2,3" x="439" y="-19" />
|
||||
<anim name="idle4" anim="Pico shoot 4" fps="24" loop="false" indices="4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24" x="439" y="-19" />
|
||||
</character>
|
||||
Reference in New Issue
Block a user