SiliconGhetto Engine API
    Preparing search index...

    Interface SpawnOpts

    Options for spawning a new entity.

    interface SpawnOpts {
        x?: number;
        y?: number;
        sprite?: SpriteOpts;
        collision?: { w: number; h: number };
        tag?: string;
        texture?: string;
    }
    Index

    Properties

    x?: number

    Initial X position in world units

    y?: number

    Initial Y position in world units

    sprite?: SpriteOpts

    Sprite appearance

    collision?: { w: number; h: number }

    Collision box dimensions for physics

    tag?: string

    Tag string for entity lookup via findByTag()

    texture?: string

    ID of a loaded texture to use as the sprite