Coder Social home page Coder Social logo

Comments (5)

mkafrin avatar mkafrin commented on June 18, 2024

Will need to add the ability to broadcast to server to create or destroy a zone on everyone's client.

from polyzone.

mkafrin avatar mkafrin commented on June 18, 2024

Alternative implemented in 24931b1

from polyzone.

mkafrin avatar mkafrin commented on June 18, 2024

Re-opening for following question:

Can this be made better for ComboZones? Maybe someone wants an event tied to a particular zone inside a ComboZone, instead of the whole thing. Can addEvent on ComboZones take an optional zoneName param and then it will call isPointInsideExhaustive() and loop through the returned zones to see if one of the zones' name matches the zoneName param.

from polyzone.

mkafrin avatar mkafrin commented on June 18, 2024

Should this use events all the way instead of callbacks? Meaning instead of passing a callback to addEvent and an event with that name being created on the zone, instead a generically named event (or named based on the zone somehow) is created and called from server-side, then in the event-handler, if the player is in the zone, it then triggers the event with the eventName passed to addEvent.

For example, the event you create on the zone can be like "__PolyZone__:{eventName}" and then if the player is in the zone, it triggers the "eventName" event.

from polyzone.

mkafrin avatar mkafrin commented on June 18, 2024

Implemented in 1c0c3fc and 7063fd5

from polyzone.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.