increased dot icon size, moved snake falling to just tutorial
This commit is contained in:
		
							parent
							
								
									d79d00370b
								
							
						
					
					
						commit
						5d9d43e4a4
					
				| 
						 | 
				
			
			@ -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 
 | 
			
		||||
        ],
 | 
			
		||||
        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
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -229,6 +229,7 @@ export default class EnemyAI extends StateMachineGoapAI implements BattlerAI {
 | 
			
		|||
        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
 | 
			
		||||
        /*
 | 
			
		||||
        if (this.plan.isEmpty()) {
 | 
			
		||||
            //get a new plan
 | 
			
		||||
            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);
 | 
			
		||||
        }
 | 
			
		||||
        
 | 
			
		||||
        */
 | 
			
		||||
        
 | 
			
		||||
        //TODO 
 | 
			
		||||
        if(this.burnTimer.isStopped() && this.burnCounter >0){
 | 
			
		||||
| 
						 | 
				
			
			@ -288,9 +289,9 @@ export default class EnemyAI extends StateMachineGoapAI implements BattlerAI {
 | 
			
		|||
        else {
 | 
			
		||||
            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.burnStat.position = this.poisonStat.position.clone().add(new Vec2(10, 0));
 | 
			
		||||
        this.bleedStat.position = this.poisonStat.position.clone().add(new Vec2(20, 0));
 | 
			
		||||
        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(15, 0));
 | 
			
		||||
        this.bleedStat.position = this.poisonStat.position.clone().add(new Vec2(30, 0));
 | 
			
		||||
        this.poisonStat.visible = this.poisonCounter > 0;
 | 
			
		||||
        this.burnStat.visible = this.burnCounter > 0;
 | 
			
		||||
        this.bleedStat.visible = this.bleedCounter > 0;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -173,9 +173,9 @@ export default class PlayerController extends StateMachineAI implements BattlerA
 | 
			
		|||
 | 
			
		||||
        //to test the buffs
 | 
			
		||||
        //this.addBuff( {type:BuffType.HEALTH, value:1} );
 | 
			
		||||
        this.addBuff({type:BuffType.BURN, 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.BURN, 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});
 | 
			
		||||
        
 | 
			
		||||
        
 | 
			
		||||
    }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -276,21 +276,21 @@ export default class GameLevel extends Scene {
 | 
			
		|||
                        }
 | 
			
		||||
                        else{
 | 
			
		||||
                            //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){
 | 
			
		||||
                            this.buffLabel2.text = this.buffs[1].string;
 | 
			
		||||
                        }
 | 
			
		||||
                        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){
 | 
			
		||||
                            this.buffLabel3.text = this.buffs[2].string;
 | 
			
		||||
                        }
 | 
			
		||||
                        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 
 | 
			
		||||
| 
						 | 
				
			
			@ -404,7 +404,10 @@ export default class GameLevel extends Scene {
 | 
			
		|||
                                tilemap: "Main",
 | 
			
		||||
                                //actions:actions,
 | 
			
		||||
                                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 - 
 | 
			
		||||
        //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.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.borderWidth = 5;
 | 
			
		||||
        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).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.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.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.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.setTrigger("player", Player_Events.PLAYER_COLLIDE, null);
 | 
			
		||||
        let actionsDefault = [new AttackAction(3, [Statuses.IN_RANGE], [Statuses.REACHED_GOAL]),
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user