Skip to content

Commit

Permalink
aa turret v2
Browse files Browse the repository at this point in the history
  • Loading branch information
Shay-Robostrike1 committed Mar 1, 2025
1 parent 4084879 commit e900087
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions assets/js/adventureGame/GameLevelStarWars.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class GameLevelStarWars {

// Player data for snowspeeder
const sprite_src_snowspeeder = path + "/images/gamify/snowspeeder_sprite2.png"; // be sure to include the path
const SNOWSPEEDER_SCALE_FACTOR = 6;
const SNOWSPEEDER_SCALE_FACTOR = 5;
const sprite_data_snowspeeder = {
id: 'Snowspeeder',
greeting: "Hi I am snowspeeder, the desert wanderer. I am trying to take donwn the empire's AT-ATs!",
Expand All @@ -32,13 +32,9 @@ class GameLevelStarWars {
pixels: {height: 293, width: 358},
orientation: {rows: 1, columns: 1 },
down: {row: 0, start: 0, columns: 1, rotate: -Math.PI/2 },
downRight: {row: 0, start: 0, columns: 1, rotate: -3*Math.PI/4 },
downLeft: {row: 0, start: 0, columns: 1, rotate: -Math.PI/4 },
left: {row: 0, start: 0, columns: 1 },
right: {row: 0, start: 0, columns: 1, rotate: Math.PI },
up: {row: 0, start: 0, columns: 1, rotate: Math.PI/2 },
upLeft: {row: 0, start: 0, columns: 1, rotate: Math.PI/4 },
upRight: {row: 0, start: 0, columns: 1, rotate: 3*Math.PI/4 },
hitbox: { widthPercentage: 0.45, heightPercentage: 0.2 },
keypress: { up: 87, left: 65, down: 83, right: 68 }, // W, A, S, D
reaction: function() {
Expand All @@ -47,17 +43,17 @@ class GameLevelStarWars {
};

// NPC Data for Turret Anti-Air
const sprite_src_turret = path + "/images/gamify/turret_aa.png"; // be sure to include the path
const sprite_src_turret = path + "/images/gamify/aa_spritesheet1.png"; // be sure to include the path
const TURRET_SCALE_FACTOR = 3;
const sprite_data_turret = {
id: 'Turret-Anti-Air',
greeting: "I am the Anti-Air Turret. I am here to take down the snowspeeder!",
src: sprite_src_turret,
SCALE_FACTOR: TURRET_SCALE_FACTOR, // Adjust this based on your scaling needs
ANIMATION_RATE: 100,
pixels: {width: 562, height: 444},
pixels: {width: 1056, height: 236},
INIT_POSITION: { x: width - (height/TURRET_SCALE_FACTOR), y: height - .82*(height/TURRET_SCALE_FACTOR) },
orientation: {rows: 1, columns: 1 },
orientation: {rows: 1, columns: 3 },
down: {row: 0, start: 0, columns: 1 }, // This is the stationary npc, down is default
hitbox: { widthPercentage: 0.1, heightPercentage: 0.1 },
};
Expand Down

0 comments on commit e900087

Please # to comment.