Nocturna
    Preparing search index...

    Coin represents a collectible coin in the game.

    • Can play a sound when collected.
    • Supports rotation animation.
    • Implements the GameObject interface.

    Hierarchy (View Summary)

    Implements

    Index

    Constructors

    • Constructs a new Coin.

      Parameters

      • scene: Scene

        The Babylon.js scene.

      • mesh: Mesh

        The mesh for the coin (can be null, will be loaded by factory).

      • score: number = 10

        The score value for collecting the coin.

      Returns Coin

    Properties

    mesh: Mesh[] = []
    Type: string = "coin"

    Methods

    • Adds a sound effect to the coin.

      Parameters

      • name: string

        The sound name.

      • sound: StaticSound

        The StaticSound instance.

      Returns void

    • Plays a sound effect by name.

      Parameters

      • name: string

        The sound name.

      Returns void