Committing MenuWrapper component and NpcInteractionEvent

This commit is contained in:
Collin Smith 2019-12-21 22:42:52 -08:00
parent 0018ebd500
commit 3860283e61
2 changed files with 32 additions and 0 deletions

View File

@ -0,0 +1,12 @@
package com.riiablo.engine.server.component;
import com.artemis.Component;
import com.artemis.annotations.PooledWeaver;
import com.artemis.annotations.Transient;
import com.riiablo.widget.NpcMenu;
@Transient
@PooledWeaver
public class MenuWrapper extends Component {
public NpcMenu menu;
}

View File

@ -0,0 +1,20 @@
package com.riiablo.engine.server.event;
import com.artemis.annotations.EntityId;
import net.mostlyoriginal.api.event.common.Event;
public class NpcInteractionEvent implements Event {
@EntityId
public int entityId;
@EntityId
public int npcId;
public static NpcInteractionEvent obatin(int entityId, int npcId) {
NpcInteractionEvent event = new NpcInteractionEvent();
event.entityId = entityId;
event.npcId = npcId;
return event;
}
}