コード例 #1
0
ファイル: Map.cs プロジェクト: Benbow/ImagineCup2013
        public Map(int x, int y)
        {
            _width = x;
            _height = y;
            _leftSide = new DelimiterZone(0, 0, FirstGame.W / 2, _height, Ressources.invisible);
            _rightSide = new DelimiterZone(_width - FirstGame.W / 2, 0, FirstGame.W / 2, _height, Ressources.invisible);
            _upSide = new DelimiterZone(0, 0, _width, FirstGame.H / 2, Ressources.invisible);
            _downSide = new DelimiterZone(0, _height - FirstGame.H, _width, FirstGame.H, Ressources.invisible);

            StaticNeutralBlock.StaticNeutralList[1].IsCollidable = false;
            StaticNeutralBlock.StaticNeutralList[3].IsCollidable = false;
            StaticNeutralBlock.StaticNeutralList[4].IsCollidable = false;
        }
コード例 #2
0
ファイル: Player.cs プロジェクト: Benbow/ImagineCup2013
 public void takeElevators(MovableNeutralBlock blocks, DelimiterZone down, DelimiterZone up)
 {
     if (blocks.Activate)
     {
         if (!this._hitBox.Intersects(down.HitBox) || this._hitBox.Intersects(up.HitBox))
         {
             if (blocks.Reverse && blocks.IsAnimate)
             {
                 decale = false;
                 int i = (int) -blocks.Speed;
                 foreach (Blocks block in Blocks.BlockList)
                 {
                     block.DecreaseCoordBlockY(i);
                 }
                 foreach (Camera cam in Camera.CamerasBlockList)
                 {
                     cam.DecreaseSpotCoordBlockY(i);
                 }
                 foreach (MovableEnnemyBlock block in MovableEnnemyBlock.MovableEnnemyList)
                 {
                     block.DecreaseCoordBlockY(i);
                 }
             }
         }
         this._hitBox.Y = blocks.HitBox.Y - this.HitBox.Height;
     }
 }