3D isometric renderer: chunked meshes with noise-displaced walls, lit shader with flickering torches, billboard sprites, rotatable/tiltable ortho camera, ray picking
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
91bb91b6ee
commit
220d9543cc
6 files changed
+180
-589
No files matched your search
-16
@@ -1683,22 +1683,6 @@ impl Game {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn ent_at(&self, wx: f32, wy: f32, player_only: bool) -> Option<usize> {
|
||||
let mut best = None;
|
||||
let mut bd = 0.45f32;
|
||||
for (j, e) in self.ents.iter().enumerate() {
|
||||
if !e.alive || e.held || (player_only && e.hero) {
|
||||
continue;
|
||||
}
|
||||
let d = (e.x - wx).powi(2) + (e.y - 0.25 - wy).powi(2);
|
||||
if d < bd {
|
||||
bd = d;
|
||||
best = Some(j);
|
||||
}
|
||||
}
|
||||
best
|
||||
}
|
||||
|
||||
pub fn pickup(&mut self, target: Option<usize>) -> bool {
|
||||
if self.hand.len() >= 8 {
|
||||
self.hint(8, "Deine Hand ist voll (max. 8). Rechtsklick lässt Einheiten fallen.");
|
||||
|
||||
Reference in new issue
Block a user