Пример #1
0
        public Sheep(RenderContext rc, float3 position, float3 rotation, float3 scaleFactor,  SceneRenderer sc, Game game)
            : base(rc, position, rotation, scaleFactor, sc)
        {
            _distance = position.Length;
            if (_distance > 60)
            {
                _score = 120;
            }
            if (_distance > 40)
            {
                _score = 80;
            }
            else
            {
                _score = 50;
            }
            Speed = (5 / _distance) * game.Level;
            Radius = 4f;
            _game = game;
            Pos = position;
            _alpha = (float)Math.Tan(Pos.z/Pos.x);
            Tag = "Sheep";
            _level = 1;
            //zufällige Wellenbewegung

            if (position.x % 2 == 0)
            {
                TheWave = SinWave;
            }
            else
            {
                TheWave = CosWave;
            }
        }
Пример #2
0
 public Tomato(RenderContext rc, float3 position, float3 rotation, float3 scaleFactor,SceneRenderer sc, RigidBody tomatoRigidBody, Game game, DynamicWorld world)
     : base(rc, position, rotation, scaleFactor, sc)
 {
     TomatoRb = tomatoRigidBody;
     Radius = 2f;
     Tag = "Tomato";
     timer = 2.0f;
     _game = game;
     _world = world;
 }
Пример #3
0
 public Weapon(DynamicWorld world, Game game)
 {
     _click = true;
     _world = world;
     _sphereCollider = _world.AddSphereShape(1);
     _game = game;
     _srTomato = _game.SceneLoader.LoadTomato();
     Magazin = 10;
     imgData = game.RC.LoadImage("Assets/TomateOberflächenfarbe.jpg");
     RC = game.RC;
 }
 public void StartGame()
 {
     Debug.WriteLine("StartGame");
     Game = new Game(this,Rc);
 }