player_logout.go 451 B

123456789101112131415161718192021222324
  1. package event
  2. type PlayerLogout struct {
  3. ActorId string // actor id
  4. PlayerId string // player id
  5. TargetPath string
  6. }
  7. func NewPlayerLogout(actorId string, playerId, targetPath string) PlayerLogout {
  8. event := PlayerLogout{
  9. ActorId: actorId,
  10. PlayerId: playerId,
  11. TargetPath: targetPath,
  12. }
  13. return event
  14. }
  15. func (PlayerLogout) Name() string {
  16. return PlayerLogoutKey
  17. }
  18. func (p PlayerLogout) UniqueId() string {
  19. return p.PlayerId
  20. }