Skip to content

How to make a component detect change? #4

@WarlockD

Description

@WarlockD

Lets say I have three components, position, scale, rotation that updates a matrix component to trasforms a sprite. Is there a way I can detect that position/scale/rotation component has changed in the system?

The idea being that I only have to update the transform component if its changed. then if the transform component has changed, update the verticies then.

The only way I can figure out is to wrap my vector class in a struct that flips a flag when the value is changed and then reset when it goes though the system.

Any ideas?

PS - Humm. You know, when I think of it, I think I am looking for a message system. Is there any examples of that?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions