コード例 #1
0
        public override void VisitWallDown(WallDown w)
        {
            Debug.WriteLine("FlippingBomb WallDown");
            Debug.WriteLine("Both tress finished to roots");

            CollisionPair colpair = CollisionPairManager.getCurrentColPair();

            colpair.setSubject(this, w);
            colpair.notifyObserver();
        }
コード例 #2
0
        public Wall createWall(Wall.WallType mWallType, GameObject.GameObjectName gameName, int index = 0, float x = 0.0f, float y = 0.0f, float width = 0.0f, float height = 0.0f)
        {
            Wall wall = null;

            switch (mWallType)
            {
            case Wall.WallType.WallTop:
                wall = new WallTop(gameName, index, Sprite.SpriteName.NullObject, x, y, width, height, Wall.WallType.WallTop);
                break;

            case Wall.WallType.WallDown:
                wall = new WallDown(gameName, index, Sprite.SpriteName.NullObject, x, y, width, height, Wall.WallType.WallDown);
                break;

            case Wall.WallType.WallLeft:
                wall = new WallLeft(gameName, index, Sprite.SpriteName.NullObject, x, y, width, height, Wall.WallType.WallLeft);
                break;

            case Wall.WallType.WallRight:
                wall = new WallRight(gameName, index, Sprite.SpriteName.NullObject, x, y, width, height, Wall.WallType.WallRight);
                break;

            case Wall.WallType.WallRoot:
                wall = new WallRoot(gameName, index, Sprite.SpriteName.NullObject, Wall.WallType.WallRoot);
                GameObjectNodeManager.add(wall, cPCSTree);
                break;

            case Wall.WallType.Uninitilized:
                Debug.WriteLine("Wall Type is Uninitilized");
                break;
            }

            this.cPCSTree.Insert(wall, this.cParent);

            wall.addSpriteToBatch(this.cSpriteBatch);
            wall.addCollisionToBatch(SpriteBatchManager.find(SpriteBatch.SpriteBatchName.Boxes));
            return(wall);
        }
コード例 #3
0
 public override void VisitWallDown(WallDown w)
 {
     //   Debug.WriteLine("BombRoot WallDown");
     CollisionPair.detectCollision(w, (GameObject)this.pChild);
 }
コード例 #4
0
 public virtual void VisitWallDown(WallDown w)
 {
 }