forked from StrafesNET/roblox-bot-player
this is how you do
This commit is contained in:
@@ -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})
|
||||
}
|
||||
|
||||
@@ -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(())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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>){
|
||||
// }
|
||||
}
|
||||
|
||||
@@ -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>){
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user