Commit Graph

6 Commits

Author SHA1 Message Date
Vassyli 2970bd09d7 Changed the scene parent<=>child relationship to connections.
The parent<=>child relationship of scenes was removed. Instead, this commit introduces the concept of a connection.

A connection is used to connect two scenes. Depending on which entity the connect-method is called, one is defined as the "outgoing" scene, the other as the ingoing scene:

```
$a->connect($b);
```

In this case, $a will be the outgoing part of the connection, $b the incoming.

Furthermore, in order to support action groups, this commit introduces SceneConnectionGroups which can be created in scenes and checked wether they exist or not. Using these, it is possible to specifiy to which part of the scenes are connected to each other.

```
$a->getConnectionGroup("scene-A/marketsquare")->connect($b);
```

In this case, $a will have the action to access $b under the ActionGroup of scene-A/marketsquare. On the other hand, $b, which doesn't have a connection group specified, will have the connection back to $a in the default group.

Connect also accepts the return value of getConnectionGroup as the argument, thus allowing the connection _to_ a certain part of $b as well:

```
$a->connect($b->getConnectionGroup("scene-B/back"));
```

The tests for scenes were updates in order to reflect this change.
2017-03-02 17:19:46 +01:00
Austen McDonald 6083e5c170 Add logger to Game, along with some basic log messages 2016-07-18 23:03:52 +00:00
Austen McDonald 91ac1ffd60 Skeleton of daenerys console application. 2016-06-04 12:01:54 -07:00
Basilius Sauter 6a72a43cda Model changes
Adds basic Scene model
Extends Character model with reusable properties (Using the two traits
Properties and PropertyManager).
2016-04-19 21:51:40 +02:00
Basilius Sauter f4a75607d7 Removed setsuites from phpunit 2016-04-16 09:17:56 +02:00
Basilius Sauter 5e06171bec Basic commit
Added meta data files (gitattribute to normalize line ending,
gitignore), as well as a simple Model and non-working tests.
2016-04-14 23:57:17 +02:00