increased dot icon size, moved snake falling to just tutorial

This commit is contained in:
OfficialCHenry 2022-04-21 14:01:44 -04:00
parent d79d00370b
commit 5d9d43e4a4
4 changed files with 19 additions and 16 deletions

View File

@ -30,7 +30,7 @@ import WeaponTypeRegistry from "./shattered_sword/Registry/WeaponTypeRegistry";
{name: "spawn", keys: ["q"]} //debug feature to test enemy spawning, press q to spawn enemy at current location {name: "spawn", keys: ["q"]} //debug feature to test enemy spawning, press q to spawn enemy at current location
], ],
useWebGL: false, // Tell the game we want to use webgl useWebGL: false, // Tell the game we want to use webgl
showDebug: true // Whether to show debug messages. You can change this to true if you want showDebug: false // Whether to show debug messages. You can change this to true if you want
} }

View File

@ -229,6 +229,7 @@ export default class EnemyAI extends StateMachineGoapAI implements BattlerAI {
super.update(deltaT); super.update(deltaT);
// This is the plan that is executed in the Active state, so whenever we don't have a plan, acquire a new one given the current statuses the enemy has // This is the plan that is executed in the Active state, so whenever we don't have a plan, acquire a new one given the current statuses the enemy has
/*
if (this.plan.isEmpty()) { if (this.plan.isEmpty()) {
//get a new plan //get a new plan
if(this.possibleActions === undefined){ if(this.possibleActions === undefined){
@ -240,7 +241,7 @@ export default class EnemyAI extends StateMachineGoapAI implements BattlerAI {
} }
this.plan = this.planner.plan(Statuses.REACHED_GOAL, this.possibleActions, this.currentStatus, null); this.plan = this.planner.plan(Statuses.REACHED_GOAL, this.possibleActions, this.currentStatus, null);
} }
*/
//TODO //TODO
if(this.burnTimer.isStopped() && this.burnCounter >0){ if(this.burnTimer.isStopped() && this.burnCounter >0){
@ -288,9 +289,9 @@ export default class EnemyAI extends StateMachineGoapAI implements BattlerAI {
else { else {
this.healthBar.color = Color.RED; this.healthBar.color = Color.RED;
} }
this.poisonStat.position = this.owner.collisionShape.center.clone().add(new Vec2(-((<AABB>this.owner.collisionShape).hw)*1.5+5, -((<AABB>this.owner.collisionShape).hh+15))); this.poisonStat.position = this.owner.collisionShape.center.clone().add(new Vec2(-((<AABB>this.owner.collisionShape).hw)*1.5+10, -((<AABB>this.owner.collisionShape).hh+15)));
this.burnStat.position = this.poisonStat.position.clone().add(new Vec2(10, 0)); this.burnStat.position = this.poisonStat.position.clone().add(new Vec2(15, 0));
this.bleedStat.position = this.poisonStat.position.clone().add(new Vec2(20, 0)); this.bleedStat.position = this.poisonStat.position.clone().add(new Vec2(30, 0));
this.poisonStat.visible = this.poisonCounter > 0; this.poisonStat.visible = this.poisonCounter > 0;
this.burnStat.visible = this.burnCounter > 0; this.burnStat.visible = this.burnCounter > 0;
this.bleedStat.visible = this.bleedCounter > 0; this.bleedStat.visible = this.bleedCounter > 0;

View File

@ -173,9 +173,9 @@ export default class PlayerController extends StateMachineAI implements BattlerA
//to test the buffs //to test the buffs
//this.addBuff( {type:BuffType.HEALTH, value:1} ); //this.addBuff( {type:BuffType.HEALTH, value:1} );
this.addBuff({type:BuffType.BURN, value:1, category:BuffCategory.DOT}); //this.addBuff({type:BuffType.BURN, value:1, category:BuffCategory.DOT});
this.addBuff({type:BuffType.BLEED, value:1, category:BuffCategory.DOT}); //this.addBuff({type:BuffType.BLEED, value:1, category:BuffCategory.DOT});
this.addBuff({type:BuffType.POISON, value:1, category:BuffCategory.DOT}); //this.addBuff({type:BuffType.POISON, value:1, category:BuffCategory.DOT});
} }

View File

@ -276,21 +276,21 @@ export default class GameLevel extends Scene {
} }
else{ else{
//this.buffButton1.text = "Increase "+this.buffs[0].type + " by "+this.buffs[0].value; //this.buffButton1.text = "Increase "+this.buffs[0].type + " by "+this.buffs[0].value;
this.buffLabel1.text = "Increase "+this.buffs[0].type + " by "+this.buffs[0].value; this.buffLabel1.text = "Increase "+this.buffs[0].type + "\n by \n"+this.buffs[0].value;
} }
if(this.buffs[1].string !== undefined){ if(this.buffs[1].string !== undefined){
this.buffLabel2.text = this.buffs[1].string; this.buffLabel2.text = this.buffs[1].string;
} }
else{ else{
this.buffLabel2.text = "Increase "+this.buffs[1].type + " by "+this.buffs[1].value; this.buffLabel2.text = "Increase "+this.buffs[1].type + "\n by \n"+this.buffs[1].value;
} }
if(this.buffs[2].string !== undefined){ if(this.buffs[2].string !== undefined){
this.buffLabel3.text = this.buffs[2].string; this.buffLabel3.text = this.buffs[2].string;
} }
else{ else{
this.buffLabel3.text = "Increase "+this.buffs[2].type + " by "+this.buffs[2].value; this.buffLabel3.text = "Increase "+this.buffs[2].type + "\n by \n"+this.buffs[2].value;
} }
//pause game here //pause game here
@ -404,7 +404,10 @@ export default class GameLevel extends Scene {
tilemap: "Main", tilemap: "Main",
//actions:actions, //actions:actions,
goal: Statuses.REACHED_GOAL, goal: Statuses.REACHED_GOAL,
actions: [new AttackAction(3, [Statuses.IN_RANGE], [Statuses.REACHED_GOAL]),
new Move(2, [], [Statuses.IN_RANGE], {inRange: 60})],
status : [Statuses.CAN_RETREAT, Statuses.CAN_BERSERK],
weapon : this.createWeapon("knife")
}); });
} }
@ -598,7 +601,6 @@ export default class GameLevel extends Scene {
//TODO - //TODO -
//determine button location //determine button location
this.buffButton1 = <Button>this.add.uiElement(UIElementType.BUTTON, "buffLayer", {position: new Vec2(Math.floor(this.viewport.getHalfSize().x*2/3-180/2), Math.floor(this.viewport.getHalfSize().y)),text:""}); this.buffButton1 = <Button>this.add.uiElement(UIElementType.BUTTON, "buffLayer", {position: new Vec2(Math.floor(this.viewport.getHalfSize().x*2/3-180/2), Math.floor(this.viewport.getHalfSize().y)),text:""});
this.buffLabel1 = <Label>this.add.uiElement(UIElementType.LABEL, "buffLayer", {position: new Vec2(Math.floor(this.viewport.getHalfSize().x*2/3-180/2), Math.floor(this.viewport.getHalfSize().y)-30),text:"a testing text lable \naaaaaaaaaaaaaaaaaaaaaaaaaaaa"})
this.buffButton1.size.set(180,200); this.buffButton1.size.set(180,200);
this.buffButton1.borderWidth = 5; this.buffButton1.borderWidth = 5;
this.buffButton1.borderColor = Color.RED; this.buffButton1.borderColor = Color.RED;
@ -776,13 +778,13 @@ export default class GameLevel extends Scene {
(<EnemyAI>enemy._ai).healthBar.color = Color.GREEN; (<EnemyAI>enemy._ai).healthBar.color = Color.GREEN;
(<EnemyAI>enemy._ai).poisonStat = this.add.sprite("poisoning", "primary"); (<EnemyAI>enemy._ai).poisonStat = this.add.sprite("poisoning", "primary");
(<EnemyAI>enemy._ai).poisonStat.position = enemy.collisionShape.center.clone().add(new Vec2((((<AABB>enemy.collisionShape).hw)*-1, -((<AABB>enemy.collisionShape).hh+5)))); (<EnemyAI>enemy._ai).poisonStat.position = enemy.collisionShape.center.clone().add(new Vec2((((<AABB>enemy.collisionShape).hw)*-1, -((<AABB>enemy.collisionShape).hh+5))));
(<EnemyAI>enemy._ai).poisonStat.scale.set(0.5, 0.5); (<EnemyAI>enemy._ai).poisonStat.scale.set(1, 1);
(<EnemyAI>enemy._ai).burnStat = this.add.sprite("burning", "primary"); (<EnemyAI>enemy._ai).burnStat = this.add.sprite("burning", "primary");
(<EnemyAI>enemy._ai).burnStat.position = (<EnemyAI>enemy._ai).poisonStat.position.clone().add(new Vec2(15, 0)); (<EnemyAI>enemy._ai).burnStat.position = (<EnemyAI>enemy._ai).poisonStat.position.clone().add(new Vec2(15, 0));
(<EnemyAI>enemy._ai).burnStat.scale.set(0.5, 0.5); (<EnemyAI>enemy._ai).burnStat.scale.set(1, 1);
(<EnemyAI>enemy._ai).bleedStat = this.add.sprite("bleeding", "primary"); (<EnemyAI>enemy._ai).bleedStat = this.add.sprite("bleeding", "primary");
(<EnemyAI>enemy._ai).bleedStat.position = (<EnemyAI>enemy._ai).poisonStat.position.clone().add(new Vec2(30, 0)); (<EnemyAI>enemy._ai).bleedStat.position = (<EnemyAI>enemy._ai).poisonStat.position.clone().add(new Vec2(30, 0));
(<EnemyAI>enemy._ai).bleedStat.scale.set(0.5, 0.5); (<EnemyAI>enemy._ai).bleedStat.scale.set(1, 1);
enemy.setGroup("Enemy"); enemy.setGroup("Enemy");
enemy.setTrigger("player", Player_Events.PLAYER_COLLIDE, null); enemy.setTrigger("player", Player_Events.PLAYER_COLLIDE, null);
let actionsDefault = [new AttackAction(3, [Statuses.IN_RANGE], [Statuses.REACHED_GOAL]), let actionsDefault = [new AttackAction(3, [Statuses.IN_RANGE], [Statuses.REACHED_GOAL]),