Ejemplo n.º 1
0
    public void StartMonsterSurge()
    {
        int             monstersPerSpace  = App.Model.mythosModel.reference[App.Model.investigatorModel.investigators.Count].surge;
        GateColor       currentOmen       = App.Model.omenModel.GetCurrentGateColor();
        List <Location> matchingLocations = new List <Location>();

        foreach (Location l in App.Model.gateModel.activeGates)
        {
            if (l.gate == currentOmen)
            {
                matchingLocations.Add(l);
            }
        }

        App.Model.monsterSurgeMythosModel.StartSurge(matchingLocations);
        if (matchingLocations.Count == 0)
        {
            // spawn 1 gate
            List <Location> l = App.Model.gateModel.DrawGates(1);
            App.Model.monsterSurgeMythosModel.GateSpawned(l[0]);
            App.Controller.locationController.SpawnGate(l[0]);
            App.Controller.queueController.CreateCallBackQueue(GateSpawned); // Create Queue
            App.Model.eventModel.SpawnGateEvent(l[0]);                       // Populate Queue
            App.Controller.queueController.StartCallBackQueue();             // Start Queue
        }
        else
        {
            // spawn monsters
            SpawnNextMonster();
        }
    }
Ejemplo n.º 2
0
    public void StartAdvanceOmen()
    {
        App.Model.omenModel.AdvanceOmen();

        GateColor newColor      = App.Model.advanceOmenMythosModel.GetOmenColor(App.Model.omenModel.currentOmen);
        int       matchingGates = 0;

        foreach (Location l in App.Model.gateModel.activeGates)
        {
            if (l.gate == newColor)
            {
                matchingGates++;
            }
        }
        App.Model.advanceOmenMythosModel.StartAdvanceOmen(matchingGates);

        if (matchingGates == 0)
        {
            App.View.advanceOmenMythosView.Done();
        }
        else
        {
            // Advance Doom by matchingGates
            App.Model.doomModel.AdvanceDoom(matchingGates);
            App.Controller.queueController.CreateCallBackQueue(DoomAdvanced);               // Create Queue
            App.Model.eventModel.DoomAdvancedEvent(matchingGates);                          // Populate Queue
            GameManager.SingleInstance.App.Controller.queueController.StartCallBackQueue(); // Start Queue
        }
    }
Ejemplo n.º 3
0
 public Sprite GetOmenSpriteFromGateColor(GateColor gc)
 {
     if (gc == GateColor.Red)
     {
         return(redOmenSprite);
     }
     if (gc == GateColor.Green)
     {
         return(greenOmenSprite);
     }
     else
     {
         return(blueOmenSprite);
     }
 }
Ejemplo n.º 4
0
 public Color GetGateColor(GateColor gc)
 {
     return(gateColors[gc]);
 }