pub fn interaction_animation(&self, target: &puzzleverse_core::Point) -> Option<(&puzzleverse_core::CharacterAnimation, chrono::Duration)> {
    self
      .platforms
      .get(target.platform as usize)
      .map(|s| s.terrain.get(&(target.x, target.y)))
      .flatten()
      .map(|ground| match ground {
        Ground::Pieces { interaction, .. } => {
          interaction.as_ref().map(|info| (&info.animation, chrono::Duration::milliseconds(info.duration.into())))
        }
        _ => None,
      })
      .flatten()
  }
/// Determine what animation should be used to indicate a player is interacting with an item at this location
Determine what animation should be used to indicate a player is interacting with an item at this location
Determine what animation should be used to indicate a player is interacting with an item at this location
pub fn interaction_animation(&self, target: &puzzleverse_core::Point) -> Option<(&puzzleverse_core::CharacterAnimation, chrono::Duration)> {
    self
      .platforms
      .get(target.platform as usize)
      .map(|s| s.terrain.get(&(target.x, target.y)))
      .flatten()
      .map(|ground| match ground {
        Ground::Pieces { interaction, .. } => {
          interaction.as_ref().map(|info| (&info.animation, chrono::Duration::milliseconds(info.duration.into())))
        }
        _ => None,
      })
      .flatten()
  }
pub fn interaction_animation ( & self , target : & puzzleverse_core :: Point ) -> Option < ( & puzzleverse_core :: CharacterAnimation , chrono :: Duration ) > { self . platforms . get ( target . platform as usize ) . map ( | s | s . terrain . get ( & ( target . x , target . y ) ) ) . flatten ( ) . map ( | ground | match ground { Ground :: Pieces { interaction , .. } => { interaction . as_ref ( ) . map ( | info | ( & info . animation , chrono :: Duration :: milliseconds ( info . duration . into ( ) ) ) ) } _ => None , } ) . flatten ( ) }
Determine what animation should be used to indicate a player is interacting with an item at this location
Determine what animation should be used to indicate a player is interacting with an item at this location
&self
target
&puzzleverse_core::Point
&self
target
&puzzleverse_core::Point