Git Product home page Git Product logo

Comments (4)

kicholen avatar kicholen commented on April 28, 2024

I don't know if this is necessary. You could create entity with settings component (filled with data from server/file) before calling initialization on systems than getting it from pool on Initialize.

from entitas.

trumpets avatar trumpets commented on April 28, 2024

That's how I do it currently as well. But I could see how it would be useful :)

from entitas.

npruehs avatar npruehs commented on April 28, 2024

Ah interesting, yeah I like that. Thinking about that, settings are no different than entities with components... Actually, I recall Blizzard do it like that in Hearthstone. Thanks for the pointer!

from entitas.

sschmid avatar sschmid commented on April 28, 2024

Yes, settings is just data and should be stored in components. If really only needed in the system you could also pass it in as a constructor argument for the system (wouldn't recommend that though)

pool.CreateSystem(new GameBoardSystem(spawnChances));

Good example @npruehs with the 91% probability. In deed that should not be hardcoded and should be accessed sth like this:

if (Random.value < _pool.blockerProbability.value) {
    _pool.CreateBlocker(column, row);
}

from entitas.

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.