2019-06-11 18:31:28 +00:00
|
|
|
Loader.addImages([
|
|
|
|
{ id:"act2_hong", src:"sprites/act2/battle_hong.png" }
|
|
|
|
]);
|
|
|
|
|
|
|
|
function Act2_Hong(){
|
|
|
|
|
|
|
|
var self = this;
|
|
|
|
|
|
|
|
// SPRITE CONFIG!
|
|
|
|
var spriteConfig = {
|
|
|
|
image: Library.images.act2_hong,
|
|
|
|
grid:{
|
2019-07-17 16:16:02 +00:00
|
|
|
width: 6,
|
|
|
|
height: 6
|
2019-06-11 18:31:28 +00:00
|
|
|
},
|
|
|
|
frame:{
|
2019-07-17 16:16:02 +00:00
|
|
|
width: 400,
|
2019-06-11 18:31:28 +00:00
|
|
|
height: 400
|
|
|
|
},
|
|
|
|
anchor:{
|
2019-07-17 16:16:02 +00:00
|
|
|
x: 78,
|
|
|
|
y: 200
|
2019-06-11 18:31:28 +00:00
|
|
|
},
|
|
|
|
frameNames:[
|
2019-07-17 16:16:02 +00:00
|
|
|
|
2019-06-11 18:31:28 +00:00
|
|
|
"body_ignore*",
|
|
|
|
"body_ignore_sweat*",
|
|
|
|
"body_attacked*",
|
2019-07-17 16:16:02 +00:00
|
|
|
"body_attacked_2*",
|
|
|
|
"body_attacked_3*",
|
|
|
|
"body_facepalm*",
|
|
|
|
|
|
|
|
"body_facepalm_2*",
|
|
|
|
"body_facepalm_3*",
|
|
|
|
"body_smile",
|
|
|
|
"mouth_smile",
|
|
|
|
"mouth_smile_talk",
|
|
|
|
"body_yell",
|
|
|
|
|
|
|
|
"mouth_yell",
|
|
|
|
"mouth_yell_talk",
|
|
|
|
"body_cross",
|
|
|
|
"mouth_cross_talk",
|
2019-07-22 19:47:57 +00:00
|
|
|
"mouth_cross",
|
2019-06-11 18:31:28 +00:00
|
|
|
"body_defeated*",
|
2019-07-17 16:16:02 +00:00
|
|
|
|
|
|
|
"body_listen*",
|
|
|
|
"body_look*",
|
|
|
|
"mouth_blank", // BLANK!
|
|
|
|
"eyes_blank", // BLANK!
|
|
|
|
"eyes_asdf",
|
|
|
|
"eyes_omfg",
|
|
|
|
|
|
|
|
"body_hold*",
|
|
|
|
"body_drink*",
|
|
|
|
"body_forward",
|
|
|
|
"mouth_forward",
|
|
|
|
"mouth_forward_talk",
|
|
|
|
"body_back",
|
|
|
|
|
|
|
|
"mouth_back",
|
|
|
|
"mouth_back_talk",
|
|
|
|
"body_final",
|
|
|
|
"mouth_final",
|
|
|
|
"mouth_final_talk",
|
|
|
|
|
2019-06-11 18:31:28 +00:00
|
|
|
],
|
2019-07-17 16:16:02 +00:00
|
|
|
x: 65 + 10,
|
|
|
|
y: 470 + 2
|
2019-06-11 18:31:28 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
// ANIM LOOPS
|
|
|
|
var animLoops = [];
|
|
|
|
|
|
|
|
// Inherit from Character!
|
|
|
|
Character.apply(self, [spriteConfig, animLoops]);
|
|
|
|
|
|
|
|
// Go To Frames!
|
|
|
|
self.gotoFrames({
|
|
|
|
body: "ignore",
|
|
|
|
mouth: "blank",
|
|
|
|
eyes: "blank",
|
2019-07-17 16:16:02 +00:00
|
|
|
}, 0); // zero bounce
|
2019-06-11 18:31:28 +00:00
|
|
|
var _subscriptions = [];
|
|
|
|
_subscriptions.push( subscribe("hong", self.gotoFrames) );
|
|
|
|
_subscriptions.push( subscribe("attack_hong", self.showAttackedIcon) );
|
|
|
|
|
|
|
|
// Draw
|
|
|
|
self.characterSpeakerID = "h";
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
// Kill!
|
|
|
|
self.kill = function(){
|
|
|
|
_subscriptions.forEach(unsubscribe);
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|