예제 #1
0
		public void Make( ChainModel target, Game game, int chainLimit ){
			ModelBlock[][] model = target.Model;
			int x = 0, y = game.GetFloorHeight(), dir = 1, chain = 0, bottom = y;
			target.Bottom = y;
			Pattern p;
			IDCount = 0;
			
			//目標形を用意する。
			SetPattern( model, p = Tail, chain, x, y, dir );
			while( true ){
				x 		+= p.NextX * dir;
				dir 	*= p.NextDir;
				chain 	+= p.Chain;
				y 		+= p.NextY;
				var j	= (dir > 0 || JointLeft == null) ? Joint : JointLeft;
				int nx = x + dir * (j.Width - 1);
				if( chain >= chainLimit ) break;
				if( (dir < 0 && nx <= Wall) || (dir > 0 && Game.Width - 1 <= nx) ){
						SetPattern( model, p = j, chain, x, y, dir );
				}else 	SetPattern( model, p = Body, chain, x, y, dir );
			}
			
			SetPattern( model, p = Head, chain, x, y, dir );
			chain 	+= p.Chain;
			SetupModel( model, game, target.Bottom );
			
			target.ChainLimit 	= chain;
		}
예제 #2
0
		public void Setup( ChainModel m ){
			m.BingoScore 	= BingoScore; 
			m.LizhiScore	= LizhiScore;
			m.CeilScore		= CeilScore;
			m.BrokenScore	= BrokenScore;
			m.MaxChainScore	= MaxChainScore;
			m.ChainScore	= ChainScore;
			m.GroundHScore	= GroundHScore;
			m.GroundNGScore	= GroundNGScore;
			m.GroundScore 	= GroundScore;
			m.BrokenLimit	= BrokenLimit;
		}
예제 #3
0
		protected override void FinishRest(){
			base.FinishRest();
			Model = new ChainModel( Target, Setting.Factory, Setting.ChainLimit, Setting.HaiteiMode, Setting.ModelSetting );
		}