コード例 #1
0
ファイル: WallGroup.cs プロジェクト: mrfleming/Space-Invaders
 //----------------------------------------------------------------------------------
 // Visitor - Methods
 //----------------------------------------------------------------------------------
 public override void Accept(CollVisitor other)
 {
     // Important : at this point we are in alien or missile
     // Alien for left right wall
     // Missile for top bottom wall
     other.VisitWallGroup(this);
 }
コード例 #2
0
ファイル: AlienGO.cs プロジェクト: mrfleming/Space-Invaders
 public override void Accept(CollVisitor other)
 {
     //We are in the Alien class
     //Call the the collsion reaction in the other GameObject/ CollVisitor
     other.VisitAlien(this);
 }
コード例 #3
0
 //----------------------------------------------------------------------------------
 // Abstract Methods
 //----------------------------------------------------------------------------------
 public override void Accept(CollVisitor other)
 {
     // Important: at this point we have an Alien
     // Call the appropriate collision reaction
     other.VisitShieldRoot(this);
 }
コード例 #4
0
        //----------------------------------------------------------------------------------
        // Abstract Methods
        //----------------------------------------------------------------------------------

        public abstract void Accept(CollVisitor other);
コード例 #5
0
        //----------------------------------------------------------------------------------
        // Abstract Methods - Visitor
        //----------------------------------------------------------------------------------

        public override void Accept(CollVisitor other)
        {
            //We are in the Missile Group class
            //Call the the collsion reaction in the other GameObject/ CollVisitor
            other.VisitMissileGroup(this);
        }
コード例 #6
0
ファイル: WallRight.cs プロジェクト: mrfleming/Space-Invaders
 //----------------------------------------------------------------------------------
 // Visitor - Methods
 //----------------------------------------------------------------------------------
 public override void Accept(CollVisitor other)
 {
     //Important : At this point we have an Alien / AlienCategory
     other.VisitWallRight(this);
 }
コード例 #7
0
        //----------------------------------------------------------------------------------
        // Visitor - Methods  (with the Ship and ShipRoot)
        //----------------------------------------------------------------------------------
        public override void Accept(CollVisitor other)
        {
            // Important : at this point we are in Ship

            other.VisitBumperGroup(this);
        }
コード例 #8
0
 //----------------------------------------------------------------------------------
 // Visitor Methods
 //----------------------------------------------------------------------------------
 public override void Accept(CollVisitor other)
 {
     throw new NotImplementedException();
 }
コード例 #9
0
 //----------------------------------------------------------------------------------
 // Visitor - Methods
 //----------------------------------------------------------------------------------
 public override void Accept(CollVisitor other)
 {
     //Important : At this point we have an Bumper / BumperCategory
     other.VisitBumperLeft(this);
 }