protected override void AwakeLive()
        {
#if (!DEBUG)
            this.tempModuleWrapper = this.InstantiateComponent <InvisibleWallsComponent>();
            this.tempModuleClone   = this.tempModuleWrapper.Component;
            this.playerIndicator   = this.tempModuleClone.transform.Find("PlayerIndicator");
            this.playerIndicator.SetParent(this.transform, false);
            this.playerIndicator.GetComponent <Renderer>().material = this.DotMaterial;
            this.GridParent = this.tempModuleClone.Background.transform;
            this.GridParent.SetParent(this.transform, false);
            var layout = this.tempModuleClone.transform.Find("Component_Maze");
            layout.SetParent(this.transform, false);

            // We need to prevent this object from being destroyed as well.
            this.tempModuleClone.transform.Find("WallSegmentPrefab").parent = null;

            this.buttons = this.tempModuleClone.Buttons;

            var keypadEventConnector = new KeypadEventConnector();
            keypadEventConnector.ButtonPressed += this.KeypadEventConnector_ButtonPressed;
            keypadEventConnector.Attach(this.buttons);

            this.mazeCells = new List <List <MazeCell> >(
                Enumerable.Range(0, 6).Select(x => new List <MazeCell>(
                                                  Enumerable.Range(0, 6).Select(y => new MazeCell(x, y))
                                                  ))
                );
#endif
        }
Пример #2
0
 public InvisibleWallsComponentSolver(BombCommander bombCommander, InvisibleWallsComponent bombComponent) :
     base(bombCommander, bombComponent)
 {
     _buttons = bombComponent.Buttons;
     modInfo  = ComponentSolverFactory.GetModuleInfo("InvisibleWallsComponentSolver", "!{0} move up down left right, !{0} move udlr [make a series of white icon moves]", "Maze");
 }
 public InvisibleWallsComponentSolver(BombCommander bombCommander, InvisibleWallsComponent bombComponent, IRCConnection ircConnection, CoroutineCanceller canceller) :
     base(bombCommander, bombComponent, ircConnection, canceller)
 {
     _buttons = bombComponent.Buttons;
     modInfo  = ComponentSolverFactory.GetModuleInfo("InvisibleWallsComponentSolver");
 }