pub struct WasmScene { /* private fields */ }
Implementations§
Source§impl WasmScene
impl WasmScene
pub fn new(name: String, map: WasmMap, pawn: Option<WasmPawn>) -> WasmScene
pub fn name(&self) -> String
pub fn load_pawn(&mut self, texture_id: u32)
pub fn load_pawn_at(&mut self, pawn: WasmPawn)
pub fn move_to( &mut self, target: &WasmCoordinates, ) -> Result<WasmCoordinates, JsValue>
pub fn step_to( &mut self, direction: WasmDirection, ) -> Result<WasmCoordinates, JsValue>
pub fn steps_to(&self, target: &WasmCoordinates) -> Result<Array, JsValue>
pub async fn walk_to( &mut self, target: WasmCoordinates, ) -> Result<WasmCoordinates, JsValue>
pub fn get_map(&self) -> WasmMap
pub fn get_pawn(&self) -> Option<WasmPawn>
Trait Implementations§
Source§impl FromWasmAbi for WasmScene
impl FromWasmAbi for WasmScene
Source§impl IntoWasmAbi for WasmScene
impl IntoWasmAbi for WasmScene
Source§impl LongRefFromWasmAbi for WasmScene
impl LongRefFromWasmAbi for WasmScene
Source§impl OptionFromWasmAbi for WasmScene
impl OptionFromWasmAbi for WasmScene
Source§impl OptionIntoWasmAbi for WasmScene
impl OptionIntoWasmAbi for WasmScene
Source§impl RefFromWasmAbi for WasmScene
impl RefFromWasmAbi for WasmScene
Source§impl RefMutFromWasmAbi for WasmScene
impl RefMutFromWasmAbi for WasmScene
Source§impl TryFromJsValue for WasmScene
impl TryFromJsValue for WasmScene
Source§impl VectorFromWasmAbi for WasmScene
impl VectorFromWasmAbi for WasmScene
Source§impl VectorIntoWasmAbi for WasmScene
impl VectorIntoWasmAbi for WasmScene
Source§impl WasmWrapper<Scene> for WasmScene
impl WasmWrapper<Scene> for WasmScene
impl SupportsConstructor for WasmScene
impl SupportsInstanceProperty for WasmScene
impl SupportsStaticProperty for WasmScene
Auto Trait Implementations§
impl Freeze for WasmScene
impl RefUnwindSafe for WasmScene
impl Send for WasmScene
impl Sync for WasmScene
impl Unpin for WasmScene
impl UnwindSafe for WasmScene
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::Abi
Source§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi
, except that it may throw and never
return in the case of Err
.