Comments
parent
53446bf5d2
commit
b8d4d31d58
|
@ -35,6 +35,8 @@ impl Ship {
|
||||||
self.hull <= 0.0
|
self.hull <= 0.0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Called whenever a projectile hits this ship.
|
||||||
|
/// Returns true if that projectile should be destroyed and false otherwise.
|
||||||
pub fn handle_projectile_collision(&mut self, ct: &content::Content, p: &Projectile) -> bool {
|
pub fn handle_projectile_collision(&mut self, ct: &content::Content, p: &Projectile) -> bool {
|
||||||
let f = ct.get_faction(self.faction);
|
let f = ct.get_faction(self.faction);
|
||||||
let r = f.relationships.get(&p.faction).unwrap();
|
let r = f.relationships.get(&p.faction).unwrap();
|
||||||
|
|
Loading…
Reference in New Issue