git://code.worthe-it.co.za
/
bug-basher.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Added hitboxes and something for the bugs to run into
[bug-basher.git]
/
src
/
entities
/
home.rs
1
use geometry::*;
2
use hitbox::*;
3
4
#[derive(Debug, Clone)]
5
pub struct Home {
6
pub pos: Vec2d
7
}
8
9
impl Home {
10
pub fn new(x: f64, y: f64) -> Home {
11
Home {
12
pos: Vec2d {
13
x: x,
14
y: y
15
}
16
}
17
}
18
}
19
20
impl CircleHitbox for Home {
21
fn pos(&self) -> Vec2d {
22
self.pos
23
}
24
fn radius(&self) -> f64 {
25
100.
26
}
27
}