nc:objects
====== Differences ====== This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
nc:objects [2012/03/07 00:11] jesper |
nc:objects [2012/03/08 23:57] (current) jesper |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | objects: | + | Obsolete... |
- | + | ||
- | === Connection === | + | |
- | Master class of each connection on the playing field. Extends whatever unity uses as a mesh object thingy, if thats possible | + | |
- | ==vars:== | + | |
- | * boolean active | + | |
- | * Connection Array IN | + | |
- | * Connection Array OUT | + | |
- | ==functions:== | + | |
- | * void trigger(Connection source) - trigger(this) on each of OUT, active = true | + | |
- | * void deactivate(Connection source) - deactivate(this) on each of OUT, active = false | + | |
- | + | ||
- | === Pulser === | + | |
- | extends Connection | + | |
- | ==functions:== | + | |
- | * override void trigger(Connection source) - super() and lose one pulse | + | |
- | + | ||
- | === Node === | + | |
- | extends Connection | + | |
- | ==vars:== | + | |
- | * int owner = 0|1|2 (0 = noone, 1 = me, 2 = opponent). | + | |
- | ==functions:== | + | |
- | * void trigger(Connection source, own) - trigger(source) and set owner to own, update score **(extended function! not overridden!)** | + | |
- | + | ||
- | === Splitter === | + | |
- | extends Connection | + | |
- | ==functions:== | + | |
- | * override void trigger(Connection source) - if all IN's are active, trigger(this) for all OUT's. | + | |
- | + | ||
- | === Joiner === | + | |
- | extends Connection | + | |
- | ==functions:== | + | |
- | * override void deactivate(Connection source) - if all IN's are not active, deactivate(this) for all OUT's. | + | |
- | + | ||
- | == Switcher == | + | |
- | extends Connection | + | |
- | Special object, when placed, should always be last on the line, and should always connect to a node. | + | |
- | vars: | + | |
- | * Node node | + | |
- | functions: | + | |
- | * override void trigger(Connection source) - node.trigger(this, 2); | + |