Component class

This represents a Component for your game.

Components can be bullets flying on the screen, a spaceship or your player's fighter. Anything that either renders or updates can be added to the list on BaseGame. It will deal with calling those methods for you. Components also have other methods that can help you out if you want to overwrite them.





hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited


destroy() bool
Whether this should be destroyed or not. [...]
isHud() bool
Whether this component is HUD object or not. [...]
loaded() bool
Whether this component has been loaded yet. If not loaded, BaseGame will not try to render it. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
onDestroy() → void
Called right before the component is destroyed and removed from the game
onMount() → void
Called when the component has been added and preperad by the game instance. [...]
priority() int
Render priority of this component. This allows you to control the order in which your components are rendered. [...]
render(Canvas c) → void
Renders this component on the provided Canvas c.
resize(Size size) → void
This is a hook called by BaseGame to let this component know that the screen (or flame draw area) has been update. [...]
toString() String
A string representation of this object. [...]
update(double t) → void
This method is called periodically by the game engine to request that your component updates itself. [...]


operator ==(Object other) bool
The equality operator. [...]