コード例 #1
0
        void spawnEntity()
        {
            double x = _rand.NextDouble() * (this.Width - 100);
            double y = _rand.NextDouble() * (this.Height - 100);

            if (_rand.NextDouble() * 10 > 5)
            {
                Mechant mechant = new Mechant(this.graphicDevice);
                mechant.Load(x, y);

                this._sprites.Add(mechant);
            }
            else
            {
                Gentil gentil = new Gentil(this.graphicDevice);
                gentil.Load(x, y);

                this._sprites.Add(gentil);
            }
        }
コード例 #2
0
ファイル: MainPage.xaml.cs プロジェクト: T4g1/3eme
        void spawnEntity()
        {
            double x = _rand.NextDouble() * (this.Width - 100);
            double y = _rand.NextDouble() * (this.Height - 100);

            if (_rand.NextDouble() * 10 > 5)
            {
                Mechant mechant = new Mechant(this.graphicDevice);
                mechant.Load(x, y);

                this._sprites.Add(mechant);
            }
            else
            {

                Gentil gentil = new Gentil(this.graphicDevice);
                gentil.Load(x, y);

                this._sprites.Add(gentil);
            }
        }