Esempio n. 1
0
        public override void Update(double dt)
        {
            realpos = realpos + direction;
            pos     = (Vector2)realpos;
            Dingo dog = World.GetDog(pos);

            if (dog != null)
            {
                dog.Kill();
                Kill();
                return;
            }
            if (!World.Passable(pos))
            {
                Kill();
                return;
            }
        }
        public override void Update(double dt)
        {
            realpos = realpos + direction;
            pos     = (Vector2)realpos;
            Dingo dog = World.GetDog(pos);

            if (dog != null)
            {
                dog.Kill();
                World.AddDynamicEntity(new Explosion("*", pos.x, pos.y));
                Kill();
                return;
            }
            if (!World.Passable(pos))
            {
                World.AddDynamicEntity(new Explosion("*", pos.x, pos.y));
                Kill();
                return;
            }
        }