adjust visual height
This commit is contained in:
+2
-1
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user