Beispiel #1
0
 public int RemoveGoodie(Goodie goodieToRemove)
 {
     if (ToolsGoodiesSeeds.ContainsKey(goodieToRemove.GetItemName()))
     {
         ToolsGoodiesSeeds [goodieToRemove.GetItemName()]--;
         return(ToolsGoodiesSeeds [goodieToRemove.GetItemName()]);
     }
     else
     {
         return(0);
     }
 }
Beispiel #2
0
        private void ErzeugeDieWelt()
        {
            this.WeltErzeugen.Hide();
            this.ScorchGore.Hide();
            this.DerZornDerSanften.Hide();
            this.Copyright.Hide();
            this.SpielerNamenZeigen();
            this.SchussEingabefeld.Left = this.Width / 2 - this.SchussEingabefeld.Width / 2;
            this.ausgangsZustand        = new Bitmap(this.Width, this.Height, PixelFormat.Format24bppRgb);
            this.BackgroundImage        = this.levelBild;
            LevelBeschreibung levelBeschreibung;

            if (this.aktuelleLevelNummer == 0)
            {
                /* berg-steilheit und rauhheit und höhenprofil mit zufallszahlen bestimmen */
                levelBeschreibung = new LevelBeschreibung
                {
                    BergZufallszahl     = MultiplayerCloud.BergZufallszahl,
                    BergMinHoeheProzent = this.MindesthoeheProzent.Value,
                    BergMaxHoeheProzent = this.HoechstHoeheProzent.Value,
                    BergRauhheitProzent = this.RauheitsfaktorProzent.Value
                };
            }
            else
            {
                levelBeschreibung = LevelSequenzierer.ErzeugeLevelBeschreibung(this.aktuelleLevelNummer);
                this.LevelNamenZeigen(levelBeschreibung);
            }

            using (var zeichenFlaeche = Graphics.FromImage(this.levelBild))
            {
                LevelZeichner.Zeichne(this, this.levelBild, levelBeschreibung, zeichenFlaeche);

                /* nur zum test für fallenlassen / fallschirm! */
                if (this.aktuelleLevelNummer == 0)
                {
                    var goodie = new Goodie(this, this.levelBild, this.Goodies, GoodieWirkung.Chrom_Dreifachschuss)
                    {
                        X = 166
                    };

                    goodie.FallenLassen(zeichenFlaeche);
                }
            }

            this.Refresh();
            this.spielPhase = SpielPhase.SpielerFallenRundeBeginnt;
            this.AusgangszustandSichern();
            this.spielerEins.Positionieren(levelBeschreibung.SpielerPosition1, this.StandardSpielerEinsX);
            this.SpielerFallen(this.spielerEins);
            this.spielerZwei.Positionieren(levelBeschreibung.SpielerPosition2, this.StandardSpielerZweiX);
            this.SpielerFallen(this.spielerZwei);
        }
Beispiel #3
0
    public int AddGoodie(GameObject goodieToAddObject)
    {
        Goodie goodieToAdd = goodieToAddObject.GetComponent <Goodie>();

        if (ToolsGoodiesSeeds == null || goodieToAddObject == null || goodieToAdd == null)
        {
            Debug.Log("of mans first disobediance and the fruit");
        }
        if (ToolsGoodiesSeeds.ContainsKey(goodieToAdd.GetItemName()))
        {
            ToolsGoodiesSeeds[goodieToAdd.GetItemName()]++;
        }
        else
        {
            ToolsGoodiesSeeds [goodieToAdd.GetItemName()] = 1;
        }
        //ToolsGoodiesSeeds.AddItem (goodieToAdd.name);
        tgs_list.Add(goodieToAdd);
        return(ToolsGoodiesSeeds [goodieToAdd.GetItemName()]);
    }
Beispiel #4
0
 public void ApplyGoodie(Goodie g)
 {
     fertilizer_points += g.fertilizerPoints;
     moisture_points   += g.moisturePoints;
 }