adjust visual height

This commit is contained in:
2025-01-12 20:05:29 +09:00
parent 8e861929cb
commit ea23aa3174
4 changed files with 8 additions and 6 deletions
+1
View File
@@ -11,6 +11,7 @@ export default class Entity {
radius = 0
health = 1
maxHealth = 1
height = 40
abilities = [
Ability.rangedAttack,
Ability.straightShot,
+2 -1
View File
@@ -139,6 +139,7 @@ function laneScenario() {
const entity1 = new Entity({
id: '1',
health: 100,
height: 100,
maxHealth: 100,
position: new Vector2(500, 150),
radius: 50,
@@ -150,6 +151,7 @@ function laneScenario() {
const entity2 = new Entity({
id: '2',
health: 100,
height: 100,
maxHealth: 100,
position: new Vector2(1600, 1800),
radius: 50,
@@ -211,7 +213,6 @@ function laneScenario() {
const direction = goal.clone().sub(entity.position).normalize().multiplyScalar(75)
const subGoal = entity.position.clone().add(direction)
// console.log(subGoal)
entity.attackAction(subGoal.x, subGoal.y)
if (entity.health <= 0) {
+1 -1
View File
@@ -9,7 +9,7 @@ export default class Projectile {
radius = 5
owner = null
onCollide = null
visualHeight = 50
height = 50
#position = new Vector2()
#dest = null