コード例 #1
0
        public void Update(GameObjects gameObjects)
        {
            switch (vragen)
            {
            case Acties.vraag:
                quest.Update(gameObjects);
                if (quest.Vraag1)
                {
                    vragen = Acties.main;
                    gameObjects.cluster1 = true;
                }
                break;

            case Acties.main:
                foreach (GUIElement element in harbour)
                {
                    element.Update(gameObjects);
                }
                if (acties == Acties.Upgrade)
                {
                    acties = Acties.main;
                    Upgradelvl(gameObjects);
                }
                if (acties == Acties.error)
                {
                    error.Update(gameObjects);
                }
                break;

            default:
                break;
            }
        }
コード例 #2
0
 public void Update(GameObjects gameObjects)
 {
     foreach (GUIElement element in farm)
     {
         element.Update(gameObjects);
     }
     if (acties == Acties.Upgrade)
     {
         acties = Acties.main;
         Upgradelvl(gameObjects);
     }
     if (acties == Acties.error)
     {
         error.Update(gameObjects);
     }
     gameObjects.amountTiles = totalTiles;
 }
コード例 #3
0
ファイル: DrawResto.cs プロジェクト: thomasvanhavere/MASTopia
        public void Update(GameObjects gameObjects)
        {
            switch (vragen)
            {
            case Acties.vraag:
                quest.Update(gameObjects);
                if (quest.Vraag1)
                {
                    vragen = Acties.main;
                    gameObjects.cluster3 = true;
                }
                break;

            case Acties.main:
                foreach (GUIElement element in resto)
                {
                    element.Update(gameObjects);
                    if (element.AssetName == "Resto/bar-speed")
                    {
                        if (food.Count != 0)
                        {
                            element.drawParial((int)(food.ElementAt(0).endTick - gameObjects.gameTime.TotalGameTime.TotalSeconds), (int)food.ElementAt(0).Time);
                        }
                    }
                    if (element.AssetName == "Resto/bar-upgrade")
                    {
                        element.drawParial((RestoLevel + 1), 16);
                    }
                    if (acties == Acties.error)
                    {
                        error.Update(gameObjects);
                    }
                }
                obj = gameObjects;
                break;

            default:
                break;
            }
        }
コード例 #4
0
        public void Update(GameObjects gameObjects)
        {
            switch (vragen)
            {
            case Acties.vraag:
                quest.Update(gameObjects);
                if (quest.Vraag1)
                {
                    vragen = Acties.main;
                    screen = Screens.Screen1;
                    gameObjects.cluster2 = true;
                }
                break;

            case Acties.main:
                switch (screen)
                {
                case Screens.Screen1:

                    foreach (GUIElement element in MarketScreen1)
                    {
                        element.Update(gameObjects);
                    }
                    break;

                case Screens.Screen2:
                    foreach (GUIElement element in MarketScreen2)
                    {
                        element.Update(gameObjects);
                    }
                    foreach (GUIElement element in Buttons)
                    {
                        element.Update(gameObjects);
                    }
                    break;

                case Screens.Screen3:
                    foreach (GUIElement element in MarketScreen3)
                    {
                        element.Update(gameObjects);
                        if (element.AssetName == "Market/bar")
                        {
                            element.drawParial(gameObjects.TotalRecource, storage);
                            totalrecourc = gameObjects.TotalRecource;
                        }
                        if (element.AssetName == "Market/bar-next")
                        {
                            element.drawParial(Marketlvl + 1, 16);
                        }
                    }
                    if (acties == Acties.upgrade)
                    {
                        Upgradelvl(gameObjects);
                    }
                    if (acties == Acties.error)
                    {
                        error.Update(gameObjects);
                    }
                    break;

                default:
                    break;
                }
                if (screen == Screens.Screen1 || screen == Screens.Screen2 || screen == Screens.Screen3)
                {
                    if (gameObjects.touchInput.swippedLeft)
                    {
                        if (screen == Screens.Screen1)
                        {
                            screen = Screens.Screen2;
                        }
                        else if (screen == Screens.Screen2)
                        {
                            screen = Screens.Screen3;
                        }
                    }
                    if (gameObjects.touchInput.swippedRight)
                    {
                        if (screen == Screens.Screen3)
                        {
                            screen = Screens.Screen2;
                        }
                        else if (screen == Screens.Screen2)
                        {
                            screen = Screens.Screen1;
                        }
                    }
                }
                break;

            default:
                break;
            }
        }
コード例 #5
0
        public void Update(GameObjects gameObjects)
        {
            switch (vragen)
            {
            case Acties.vraag:
                quest.Update(gameObjects);
                if (quest.Vraag1)
                {
                    vragen = Acties.main;
                    gameObjects.cluster4 = true;
                }
                break;

            case Acties.main:
                maxBio  = (80 * gameObjects.amountTiles);
                maxChem = (70 * gameObjects.amountTiles);
                foreach (GUIElement element in waste)
                {
                    element.Update(gameObjects);
                    if (element.AssetName == "WastePlant/bar-bio")
                    {
                        element.drawParial(gameObjects.waste, maxBio);
                    }
                    if (element.AssetName == "WastePlant/bar-chem")
                    {
                        element.drawParial(gameObjects.Chemwaste, (70 * gameObjects.amountTiles));
                    }
                    if (element.AssetName == "WastePlant/bar-cap")
                    {
                        element.drawParial(gameObjects.Chemwaste + gameObjects.waste, (maxBio + maxChem));
                    }
                    if (element.AssetName == "WastePlant/bar-nextcap")
                    {
                        element.drawParial(gameObjects.Chemwaste + gameObjects.waste, (maxBio + 160 + maxChem + 160));
                    }
                    if (element.AssetName == "WastePlant/bar-ratio")
                    {
                        element.drawParial(gameObjects.Chemwaste, gameObjects.waste);
                    }
                    if (element.AssetName == "WastePlant/bar-nextratio")
                    {
                        element.drawParial(gameObjects.Chemwaste, gameObjects.waste);
                    }

                    if (element.AssetName == "WastePlant/bar-speed")
                    {
                        element.drawParial(wastelevel + 1, 16);
                    }
                    if (element.AssetName == "WastePlant/bar-nextspeed")
                    {
                        element.drawParial(wastelevel + 2, 16);
                    }
                }
                if (acties == Acties.Upgrade)
                {
                    acties = Acties.main;
                    Upgradelvl(gameObjects);
                }
                if (acties == Acties.error)
                {
                    error.Update(gameObjects);
                }
                Chemwaste = gameObjects.Chemwaste;
                Biowaste  = gameObjects.waste;
                break;

            default:
                break;
            }
        }