예제 #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;
            }
        }
예제 #2
0
        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;
            }
        }