Commit graph

4 commits

Author SHA1 Message Date
Erik Ogenvik
c21a3d8c7c Store instance property data separately.
In some cases you want to store property data for each instance. Often
you'll use member data on the entities themselves for this. But in some
cases you don't want to bloat the entity class with data for seldomly
used properties.
In these cases you can instead use the PropertyInstanceState class, and
keep a static instance of this per property.
2015-04-28 20:56:15 +02:00
Erik Ogenvik
3b1a2cb566 Make Domain an interface and provide two versions.
The "physical" world behaves like a standard world. The "void" world
however doesn't allow for neither movement nor sights.
2014-09-24 22:00:54 +02:00
Erik Ogenvik
2f3ab1da18 Let the Domain handle sights.
As any world can contain multiple domains, we let the domain handle the
sights calculations.
This is a change from how this previously was done, as previously
sight checks were only done for the top level World entity. This has
changes however, so that sights checks now are done for all entities.

When determining whether an entity can be seen, the system first checks
the size of the entity against the distance from the observer. If this
check fails, the system makes exceptions if the entity in case is
outfitted or wielded.
2014-09-15 21:11:36 +02:00
Erik Ogenvik
b171410b05 Let the domain be specified by a property.
This means that we only attach domains to entities that have the
"domain" property. The "land" entity type for example.
2014-09-15 21:11:35 +02:00