Skip to content

Commit

Permalink
Merge pull request #94 from LordBlackhawk/feature/move-camera-interface
Browse files Browse the repository at this point in the history
expose the move_camera interface to the user
  • Loading branch information
UltraMachine authored Nov 30, 2023
2 parents 40ee6d5 + e95e56b commit 2719b98
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/bot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use crate::{
game_info::GameInfo,
game_state::Effect,
game_state::{Alliance, GameState},
geometry::Point2,
geometry::{Point2, Point3},
ids::{AbilityId, EffectId, UnitTypeId, UpgradeId},
player::Race,
ramp::{Ramp, Ramps},
Expand Down Expand Up @@ -713,6 +713,10 @@ impl Bot {
})
.unwrap_or(0.0)
}
/// Move player camera to specified position.
pub fn move_camera(&mut self, pos: Point3) {
self.actions.push(Action::CameraMove(pos));
}
/// Sends message to in-game chat.
pub fn chat(&mut self, message: &str) {
self.actions.push(Action::Chat(message.to_string(), false));
Expand Down

0 comments on commit 2719b98

Please sign in to comment.