Example #1
0
 public RecomputeLavaTemperatureUpdate(
     RendererUpdatable updatable
     )
     :   base(updatable)
 {
     Debug.Assert(updatable.GetType() == typeof(LavaRenderable));
 }
Example #2
0
        protected void ChangeToPhase(
            RendererPhase phase,
            string winningPlayer,
            RendererUpdatable winningUpdatable
            )
        {
            switch (phase)
            {
            case RendererPhase.Outro:
            {
                WinningScreenRenderable renderable = new WinningScreenRenderable(0, winningPlayer);
                //RobotRenderable winningRobot = winningUpdatable as RobotRenderable;
                //Debug.Assert(winningRobot != null);
                //winningRobot.ActivatePermanentState("win");
                renderable.LoadResources(this);
                updateRenderables.Add(renderable);
                overlays.Add(renderable);
                break;
            }

            case RendererPhase.Intro:
            {
                for (int i = 0; i < overlays.Count; ++i)
                {
                    if (overlays[i] is WinningScreenRenderable)
                    {
                        overlays.RemoveAt(i);
                        break;
                    }
                }
                break;
            }
            }
        }
Example #3
0
 public LavaPillarUpdate(
     RendererUpdatable updatable,
     PillarInfo pillarInfo
     )
     :   base(updatable)
 {
     Debug.Assert(updatable.GetType() == typeof(LavaRenderable));
     this.pillarInfo = pillarInfo;
 }
Example #4
0
        public void SetPhase(SimulationPhase phase, string winningPlayer, RendererUpdatable winningUpdatable)
        {
            Renderer.Renderer.RendererPhase rendererPhase;

            switch (phase)
            {
            case SimulationPhase.Intro: rendererPhase = ProjectMagma.Renderer.Renderer.RendererPhase.Intro; break;

            case SimulationPhase.Game: rendererPhase = ProjectMagma.Renderer.Renderer.RendererPhase.Game; break;

            case SimulationPhase.Outro: rendererPhase = ProjectMagma.Renderer.Renderer.RendererPhase.Outro; break;

            case SimulationPhase.Closed: rendererPhase = ProjectMagma.Renderer.Renderer.RendererPhase.Closed; break;

            default: throw new System.ArgumentException(string.Format("{0} is not a valid phase", phase));
            }

            this.phase = phase;
            currentUpdateQueue.AddUpdate(new ProjectMagma.Renderer.Renderer.ChangeToPhaseUpdate(rendererPhase, winningPlayer, winningUpdatable));
        }
Example #5
0
 public ChangeToPhaseUpdate(RendererPhase newPhase, string winningPlayer, RendererUpdatable winningUpdatable)
 {
     this.newPhase         = newPhase;
     this.winningPlayer    = winningPlayer;
     this.winningUpdatable = winningUpdatable;
 }