this is how you do

This commit is contained in:
2026-02-16 08:44:58 -08:00
parent 2b40cc8dd6
commit 87107f7bf3
4 changed files with 18 additions and 2 deletions

View File

@@ -4,7 +4,7 @@ pub struct Bot{
timelines:strafesnet_roblox_bot_file::v0::Block,
}
impl Bot{
pub fn new(data:Vec<u8>)->Result<Self,strafesnet_roblox_bot_file::v0::Error>{
pub fn new(data:&[u8])->Result<Self,strafesnet_roblox_bot_file::v0::Error>{
let timelines=strafesnet_roblox_bot_file::v0::read_all_to_block(std::io::Cursor::new(data))?;
Ok(Self{timelines})
}

View File

@@ -3,7 +3,7 @@ pub struct Graphics{
graphics:strafesnet_graphics::graphics::GraphicsState,
}
impl Graphics{
pub fn new(data:Vec<u8>)->Result<Self,()>{
pub fn new(data:&[u8])->Result<Self,()>{
Err(())
}
}

View File

@@ -2,6 +2,13 @@ pub struct GraphicsWorker{
graphics:strafesnet_roblox_bot_player::graphics::Graphics,
}
impl GraphicsWorker{
pub fn new(
graphics:strafesnet_roblox_bot_player::graphics::Graphics,
)->Self{
Self{
graphics,
}
}
// pub fn send(&mut self,ins:TimedInstruction<Instruction,SessionTime>){
// }
}

View File

@@ -22,6 +22,15 @@ pub struct PlayerWorker{
graphics_thread:crate::graphics::GraphicsWorker,
}
impl PlayerWorker{
pub fn new(
bot:strafesnet_roblox_bot_player::bot::Bot,
graphics_thread:crate::graphics::GraphicsWorker,
)->Self{
Self{
bot,
graphics_thread,
}
}
pub fn send(&mut self,ins:TimedInstruction<Instruction,SessionTime>){
}
}