Sanokei / Two-Button-Arcade

A game maker for very simple 8 by 8 pixel games
MIT License
0 stars 0 forks source link

Broken dynamics #1

Closed Sanokei closed 1 year ago

Sanokei commented 1 year ago

I fixed the bug.

I wanted to add Game game to the script globals but it only accepts PixelGameObject which class Game is not.

I thought I could just inherit a base class PixelObject, but I forgot that inherited Monobehaviour will not work with the messaging system (e.g Awake, OnEnable, Start, Update, etc.)

To fix it I could have used dynamics but I wanted to control which classes could be added so I made a Interface IPixelObject that can be added.