public override void Init() { base.Init(); if (matricies == null) { // Set Matrix Set matricies = new EmitterMatricies(); matricies.Init(); } if (targetController == null) { targetController = new TargetController(); } if (emitterController == null) { emitterController = new EmitterController(); } if (reflectorController == null) { reflectorController = new ReflectorController(); } if (boxController == null) { boxController = new BoxController(); } InitScenePuzzle(); }
void HandleEmitterAction(float horiz, float vert, EmitterController emitter) { // Only change own emitter. if (emitter.team == team) { controller.ChangeActiveEmitter(emitter.gridRow, team); } DoMovement(horiz, vert); }
public void RegisterEmitter(EmitterController emitter, int row, PlayerTeam team) { if (emittersRed == null) { emittersRed = new EmitterController[3]; } if (emittersBlue == null) { emittersBlue = new EmitterController[3]; } if (team == PlayerTeam.Red) { emittersRed[row] = emitter; } else { emittersBlue[row] = emitter; } }