Skip to content

How should the API look? #2

@InukVT

Description

@InukVT

I'm thinking of making the API look a little like this:

@main
struct Game: GameWindow {
   var body: some Scene {
      GameContet()
   }
}

struct GameContent: GameScene {
   // Placeholder, this obviously doesn't support animation, but it's there to give a sense of image.
   let avatar = Sprite("avatar.jpeg")
   let tilemap = Tiles("map.tmx", "layerName")

   var body: some GameScene {
      Image(avatar)
      Tilemap(tilemap)
   }
}

Thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions