mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-23 08:11:33 +11:00
only hero and squid can pick up items
This commit is contained in:
parent
07c5afb990
commit
df2f45797b
|
@ -453,7 +453,9 @@ fn resolve_spikes(switable: &Switchable) -> OverlapResolution {
|
||||||
fn resolve_overlap(me: &Entity, other: &Entity) -> OverlapResolution {
|
fn resolve_overlap(me: &Entity, other: &Entity) -> OverlapResolution {
|
||||||
match (&me.entity, &other.entity) {
|
match (&me.entity, &other.entity) {
|
||||||
(EntityType::Hero(_), EntityType::Stairs) => OverlapResolution::Win,
|
(EntityType::Hero(_), EntityType::Stairs) => OverlapResolution::Win,
|
||||||
(_, EntityType::Item(_)) => OverlapResolution::Pickup,
|
(EntityType::Hero(_) | EntityType::Enemy(Enemy::Squid(_)), EntityType::Item(_)) => {
|
||||||
|
OverlapResolution::Pickup
|
||||||
|
}
|
||||||
(EntityType::MovableBlock, EntityType::Spikes(_)) => OverlapResolution::CoExist,
|
(EntityType::MovableBlock, EntityType::Spikes(_)) => OverlapResolution::CoExist,
|
||||||
(_, EntityType::Spikes(switch)) => resolve_spikes(switch),
|
(_, EntityType::Spikes(switch)) => resolve_spikes(switch),
|
||||||
(_, EntityType::Switch(switch)) => OverlapResolution::ToggleSystem(switch.system),
|
(_, EntityType::Switch(switch)) => OverlapResolution::ToggleSystem(switch.system),
|
||||||
|
|
Loading…
Reference in a new issue