fn render_text(&self) -> Result<(), JsValue> {
        self.fg_ctx.begin_path();
        self.fg_ctx.set_fill_style(&JsValue::from_str("#111111"));
        self.fg_ctx
            .set_font(&format!("{}px sans-serif", self.ui_text_size));
        self.fg_ctx.fill_text(
            &format!("❤️ : {}", self.hp.curr_hp()),
            10.0,
            self.ui_text_size + 5.0,
        )?;
        self.fg_ctx
            .fill_text(&format!("$  : {}", self.cash), 10.0, self.tower_size - 5.0)?;
        self.fg_ctx.close_path();
        Ok(())
    }
/// Render text found in the top bar
Render text found in the top bar
Render text found in the top bar
fn render_text(&self) -> Result<(), JsValue> {
        self.fg_ctx.begin_path();
        self.fg_ctx.set_fill_style(&JsValue::from_str("#111111"));
        self.fg_ctx
            .set_font(&format!("{}px sans-serif", self.ui_text_size));
        self.fg_ctx.fill_text(
            &format!("❤️ : {}", self.hp.curr_hp()),
            10.0,
            self.ui_text_size + 5.0,
        )?;
        self.fg_ctx
            .fill_text(&format!("$  : {}", self.cash), 10.0, self.tower_size - 5.0)?;
        self.fg_ctx.close_path();
        Ok(())
    }
fn render_text ( & self ) -> Result < ( ) , JsValue > { self . fg_ctx . begin_path ( ) ; self . fg_ctx . set_fill_style ( & JsValue :: from_str ( " " ) ) ; self . fg_ctx . set_font ( & format ! ( " " self ui_text_size ) ) ; self . fg_ctx . fill_text ( & format ! ( " e .hp. ur _hp()), 10.0 , self . ui_text_size + 5.0 , ) ? ; self . fg_ctx . fill_text ( & format ! ( " " self cash ) , 10.0 , self . tower_size - 5.0 ) ? ; self . fg_ctx . close_path ( ) ; Ok ( ( ) ) }
Render text found in the top bar
Render text found in the top bar
&self
&self