|
|
@ -65,6 +65,18 @@ void Editor::Update(float fElapsedTime){ |
|
|
|
if (game->GetMouse(1).bPressed) { |
|
|
|
if (game->GetMouse(1).bPressed) { |
|
|
|
t.enemyId = EnemyID::NONE; |
|
|
|
t.enemyId = EnemyID::NONE; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (game->GetKey(DOWN).bHeld) { |
|
|
|
|
|
|
|
t.facingDir = FacingDirection::SOUTH; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (game->GetKey(RIGHT).bHeld) { |
|
|
|
|
|
|
|
t.facingDir = FacingDirection::EAST; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (game->GetKey(UP).bHeld) { |
|
|
|
|
|
|
|
t.facingDir = FacingDirection::NORTH; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (game->GetKey(LEFT).bHeld) { |
|
|
|
|
|
|
|
t.facingDir = FacingDirection::WEST; |
|
|
|
|
|
|
|
} |
|
|
|
game->FillRectDecal(squarePos, GRID_SIZE, { 0,0,255,64 }); |
|
|
|
game->FillRectDecal(squarePos, GRID_SIZE, { 0,0,255,64 }); |
|
|
|
} |
|
|
|
} |
|
|
|
//game->DrawRectDecal(squarePos,GRID_SIZE,{64,64,64});
|
|
|
|
//game->DrawRectDecal(squarePos,GRID_SIZE,{64,64,64});
|
|
|
@ -79,6 +91,9 @@ void Editor::Update(float fElapsedTime){ |
|
|
|
} |
|
|
|
} |
|
|
|
else { |
|
|
|
else { |
|
|
|
game->DrawDecal(squarePos, game->circle, { 1,1 }, game->GetData(t.enemyId).col); |
|
|
|
game->DrawDecal(squarePos, game->circle, { 1,1 }, game->GetData(t.enemyId).col); |
|
|
|
|
|
|
|
if (t.enemyId >= START) { |
|
|
|
|
|
|
|
game->DrawRotatedDecal(squarePos + vf2d{16, 16}, game->arrow, PI / 2 * (int)t.facingDir, { 16,16 }, { 1,1 }, WHITE); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
game->DrawLineDecal(squarePos,{squarePos.x+ (float)GRID_SIZE.x,squarePos.y},t.wallN?WHITE:Pixel{64,64,64}); |
|
|
|
game->DrawLineDecal(squarePos,{squarePos.x+ (float)GRID_SIZE.x,squarePos.y},t.wallN?WHITE:Pixel{64,64,64}); |
|
|
|