Skip to content

Please generate differently named interfaces for EventTarget.Self and EventTarget.Any #810

Closed
@FNGgames

Description

@FNGgames

Hi,

I am coming across this more and more, and I'm really struggling to work around it. I have situations where I need both the bound event and the unbound event from a component at the same time.

// cant use this because it generates 
// 2x ThingListenerComponent,  2x IThingListener and 2x GameThingEventSystem
[Game, Event(EventTarget.Self), Event(EventTarget.Any)]
public class ThingComponent : IComponent 
{
    public float value;
}

Using an attack component as an example: I want to have the attack notify the entity's view that an attack has occured so i can switch its animation state, but i also want to have a blood effect controller sitting around and listening for any attacks so it can spawn in particles, and I want this to be global, not hanging off each entit's view. Can you detect when both of these attributes have been added and add the words Self and Any to the listener components and interfaces and whatnot?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions