Skip to content

Commit

Permalink
Remove manual movement / attack in release
Browse files Browse the repository at this point in the history
  • Loading branch information
benfrankel committed Jul 27, 2024
1 parent 8c03c42 commit 7c685a0
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/game/actor/player.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ pub fn player(key: impl Into<String>) -> impl EntityCommand {
(actor, game_root.players, camera_root.primary)
};

world.entity_mut(entity)
world
.entity_mut(entity)
.add(actor)
.insert((
IsPlayer,
Expand All @@ -60,10 +61,6 @@ pub fn player(key: impl Into<String>) -> impl EntityCommand {
HitboxDamage(15.0),
HitboxKnockback(5.0),
))
// TODO: This is for testing movement until it's card-controlled.
.add(movement_action)
// TODO: This is for testing attack until it's card-controlled.
.add(attack_action)
.set_parent(parent)
.with_children(|children| {
children
Expand All @@ -73,6 +70,13 @@ pub fn player(key: impl Into<String>) -> impl EntityCommand {
.insert(Transform::from_translation(vec3(0.0, -0.5, 2.0)));
});

// Allow manual movement / attack input in dev builds.
#[cfg(feature = "dev")]
world
.entity_mut(entity)
.add(movement_action)
.add(attack_action);

r!(world.entity_mut(camera).get_mut::<SmoothFollow>()).target = entity;
}
}

0 comments on commit 7c685a0

Please sign in to comment.