Esempio n. 1
0
 public override void CollideWith(ApolloSpacecraft ship)
 {
     Console.WriteLine("ExplodingAsteroid hit an ApolloSpacecraft");
 }
Esempio n. 2
0
        public void DubbleDispatchProblem()
        {
            SpaceShip theApolloSpacecraft2 = new ApolloSpacecraft();

            theExplodingAsteroid.CollideWith(theApolloSpacecraft2);
        }
Esempio n. 3
0
 public virtual void CollideWith(ApolloSpacecraft ship)
 {
     Console.WriteLine("Asteroid hit an ApolloSpacecraft");
 }