Beispiel #1
0
		protected override void OnCreate (Bundle bundle)
		{
			dice1 = new Dice(1, 1, 6);
			dice2 = new Dice(2, 1, 6);
			audio = new PlayAudio (this);
		
			base.OnCreate (bundle);

			game = LbManager.GetGame(Intent.GetIntExtra ("Battle", -1), Intent.GetIntExtra("Scenario", -1));

			// set our layout to be the home screen
			SetContentView(Resource.Layout.General);		

			imgBack = FindViewById<ImageView> (Resource.Id.titleSubLbBack);
			imgLb = FindViewById<ImageView> (Resource.Id.titleSubLb);

			// title
			txtBattleName = FindViewById<TextView>(Resource.Id.titleSubBattleName);
			txtScenarioName = FindViewById<TextView>(Resource.Id.titleSubScenarioName);
			
			imgGeneral2Die1 = FindViewById<ImageView> (Resource.Id.imgGeneral2Die1);
			imgGeneral2Die2 = FindViewById<ImageView> (Resource.Id.imgGeneral2Die2);
			btnGeneral2DiceRoll = FindViewById<Button>(Resource.Id.btnGeneral2DiceRoll);

			imgGeneral1Die1 = FindViewById<ImageView> (Resource.Id.imgGeneral1Die1);
			btnGeneral1DiceRoll = FindViewById<Button>(Resource.Id.btnGeneral1DiceRoll);
		}
		protected override void OnCreate (Bundle bundle)
		{
			dice = new Dice(5, 1, 6);
			fc = new FireCombat();
			odds = fc.DefaultOdds;
			audio = new PlayAudio (this);
		
			base.OnCreate (bundle);

			game = LbManager.GetGame(Intent.GetIntExtra ("Battle", -1), Intent.GetIntExtra("Scenario", -1));

			// set our layout to be the home screen
			SetContentView(Resource.Layout.FireCombat);		

			imgBack = FindViewById<ImageView> (Resource.Id.titleSubLbBack);
			imgLb = FindViewById<ImageView> (Resource.Id.titleSubLb);

			// title
			txtBattleName = FindViewById<TextView>(Resource.Id.titleSubBattleName);
			txtScenarioName = FindViewById<TextView>(Resource.Id.titleSubScenarioName);
			
			// attacker
			btnAttackerValuePrev = FindViewById<Button>(Resource.Id.btnFireAttackerPrev);
			btnAttackerValueNext = FindViewById<Button>(Resource.Id.btnFireAttackerNext);
			editAttackerValue = FindViewById<EditText>(Resource.Id.textFireAttackerValue);
			btnAttackerMod13 = FindViewById<ToggleButton>(Resource.Id.btnFireAttacker13);
			btnAttackerMod12 = FindViewById<ToggleButton>(Resource.Id.btnFireAttacker12);
			btnAttackerMod32 = FindViewById<ToggleButton>(Resource.Id.btnFireAttacker32);
			btnAttackerModCann = FindViewById<ToggleButton>(Resource.Id.btnFireAttackerCann);
			
			// defender
			btnDefenderValuePrev = FindViewById<Button>(Resource.Id.btnFireDefenderPrev);
			btnDefenderValueNext = FindViewById<Button>(Resource.Id.btnFireDefenderNext);
			editDefenderValue = FindViewById<EditText>(Resource.Id.textFireDefenderValue);
			
			btnDefenderIncrPrev = FindViewById<Button>(Resource.Id.btnFireDefenderIncrPrev);
			btnDefenderIncrNext = FindViewById<Button>(Resource.Id.btnFireDefenderIncrNext);
			editDefenderIncr = FindViewById<EditText>(Resource.Id.textFireDefenderIncr);
			
			editAttackerValue.Text = "1";
			editDefenderValue.Text = "1";
			editDefenderIncr.Text = "1";
			
			spinFireOdds = FindViewById<Spinner> (Resource.Id.spinFireOdds);
			
			imgFireDie1 = FindViewById<ImageView> (Resource.Id.imgFireDie1);
			imgFireDie2 = FindViewById<ImageView> (Resource.Id.imgFireDie2);
			imgFireDie3 = FindViewById<ImageView> (Resource.Id.imgFireDie3);
			imgFireDie4 = FindViewById<ImageView> (Resource.Id.imgFireDie4);
			imgFireDie5 = FindViewById<ImageView> (Resource.Id.imgFireDie5);
			btnFireDiceRoll = FindViewById<Button>(Resource.Id.btnFireDiceRoll);
			
			// results
			txtFireResults = FindViewById<TextView>(Resource.Id.txtFireResults);
			//txtFireResults.SetText(txtFireResults.Text, TextView.BufferType.Editable);
			imgFireLeaderLossSide = FindViewById<ImageView>(Resource.Id.imgFireLeaderLossSide);
			txtFireLeaderLoss = FindViewById<TextView>(Resource.Id.txtFireLeaderLoss);
			//txtFireLeaderLoss.SetText(txtFireLeaderLoss.Text, TextView.BufferType.Editable);
			imgFireLeaderLoss = FindViewById<ImageView>(Resource.Id.imgFireLeaderLoss);
		}
Beispiel #3
0
		protected override void OnCreate (Bundle bundle)
		{
			base.OnCreate (bundle);

			game = LbManager.GetGame(Intent.GetIntExtra ("Battle", -1), Intent.GetIntExtra("Scenario", -1));

			// set our layout to be the home screen
			SetContentView(Resource.Layout.Battle);		

			imgBack = FindViewById<ImageView> (Resource.Id.titleSubLbBack);
			imgLb = FindViewById<ImageView> (Resource.Id.titleSubLb);

			// title
			txtBattleName = FindViewById<TextView>(Resource.Id.titleSubBattleName);
			txtScenarioName = FindViewById<TextView>(Resource.Id.titleSubScenarioName);

			// current turn
			txtTurn = FindViewById<TextView>(Resource.Id.textTurn);
			btnTurnPrev = FindViewById<Button>(Resource.Id.btnTurnPrev);
			btnTurnNext = FindViewById<Button>(Resource.Id.btnTurnNext);

			// current phase
			txtPhase = FindViewById<TextView>(Resource.Id.textPhase);
			btnPhasePrev = FindViewById<Button>(Resource.Id.btnPhasePrev);
			btnPhaseNext = FindViewById<Button>(Resource.Id.btnPhaseNext);

			btnReset = FindViewById<Button>(Resource.Id.btnReset);

			btnFire = FindViewById<ImageButton>(Resource.Id.btnFire);
			btnMelee = FindViewById<ImageButton>(Resource.Id.btnMelee);
			btnMorale = FindViewById<ImageButton>(Resource.Id.btnMorale);
			btnGeneral = FindViewById<ImageButton>(Resource.Id.btnGeneral);
		}
Beispiel #4
0
		protected override void OnCreate (Bundle bundle)
		{
			dice = new Dice(2, 1, 6);
			morale = new Morale();
			audio = new PlayAudio (this);
		
			base.OnCreate (bundle);

			game = LbManager.GetGame(Intent.GetIntExtra ("Battle", -1), Intent.GetIntExtra("Scenario", -1));

			// set our layout to be the home screen
			SetContentView(Resource.Layout.Morale);		

			imgBack = FindViewById<ImageView> (Resource.Id.titleSubLbBack);
			imgLb = FindViewById<ImageView> (Resource.Id.titleSubLb);

			// title
			txtBattleName = FindViewById<TextView>(Resource.Id.titleSubBattleName);
			txtScenarioName = FindViewById<TextView>(Resource.Id.titleSubScenarioName);
			
			btnMoralePrev = FindViewById<Button>(Resource.Id.btnMoralePrev);
			btnMoraleNext = FindViewById<Button>(Resource.Id.btnMoraleNext);
			editMoraleValue = FindViewById<EditText>(Resource.Id.editMoraleValue);
			
			editMoraleValue.Text = "11";
			
			imgMoraleDie1 = FindViewById<ImageView> (Resource.Id.imgMoraleDie1);
			imgMoraleDie2 = FindViewById<ImageView> (Resource.Id.imgMoraleDie2);
			btnMoraleDiceRoll = FindViewById<Button>(Resource.Id.btnMoraleDiceRoll);
			
			btnMoraleMinus6 = FindViewById<Button>(Resource.Id.btnMoraleMinus6);
			btnMoraleMinus3 = FindViewById<Button>(Resource.Id.btnMoraleMinus3);
			btnMoraleMinus1 = FindViewById<Button>(Resource.Id.btnMoraleMinus1);
			btnMoralePlus1 = FindViewById<Button>(Resource.Id.btnMoralePlus1);
			btnMoralePlus3 = FindViewById<Button>(Resource.Id.btnMoralePlus3);
			btnMoralePlus6 = FindViewById<Button>(Resource.Id.btnMoralePlus6);
			
			txtMoraleResults = FindViewById<TextView>(Resource.Id.txtMoraleResults);
		}
Beispiel #5
0
		protected override void OnCreate (Bundle bundle)
		{
			dice = new Dice(5, 1, 6);
			mc = new MeleeCombat();
			odds = mc.DefaultOdds;
			audio = new PlayAudio (this);
		
			base.OnCreate (bundle);

			game = LbManager.GetGame(Intent.GetIntExtra ("Battle", -1), Intent.GetIntExtra("Scenario", -1));

			// set our layout to be the home screen
			SetContentView(Resource.Layout.Melee);		

			imgBack = FindViewById<ImageView> (Resource.Id.titleSubLbBack);
			imgLb = FindViewById<ImageView> (Resource.Id.titleSubLb);

			// title
			txtBattleName = FindViewById<TextView>(Resource.Id.titleSubBattleName);
			txtScenarioName = FindViewById<TextView>(Resource.Id.titleSubScenarioName);
			
			btnMeleeAttackerPrev	 = FindViewById<Button>(Resource.Id.btnMeleeAttackerPrev	);
			btnMeleeAttackerNext		 = FindViewById<Button>(Resource.Id.btnMeleeAttackerNext	);
			editMeleeAttackerValue	 = FindViewById<EditText>(Resource.Id.editMeleeAttackerValue);
			btnMeleeAttackerAdd		 = FindViewById<Button>(Resource.Id.btnMeleeAttackerAdd		);
			btnMeleeAttackerReset	 = FindViewById<Button>(Resource.Id.btnMeleeAttackerReset	);
			
			btnMeleeDefenderPrev	 = FindViewById<Button>(Resource.Id.btnMeleeDefenderPrev	);
			btnMeleeAttackerNext		 = FindViewById<Button>(Resource.Id.btnMeleeAttackerNext	);
			editMeleeDefenderValue	 = FindViewById<EditText>(Resource.Id.editMeleeDefenderValue);
			btnMeleeDefenderAdd		 = FindViewById<Button>(Resource.Id.btnMeleeDefenderAdd		);
			btnMeleeDefenderReset	 = FindViewById<Button>(Resource.Id.btnMeleeDefenderReset	);
			
			spinMeleeOdds = FindViewById<Spinner> (Resource.Id.spinMeleeOdds);
			
			imgMeleeDie1 = FindViewById<ImageView> (Resource.Id.imgMeleeDie1);
			imgMeleeDie2 = FindViewById<ImageView> (Resource.Id.imgMeleeDie2);
			imgMeleeDie3 = FindViewById<ImageView> (Resource.Id.imgMeleeDie3);
			imgMeleeDie4 = FindViewById<ImageView> (Resource.Id.imgMeleeDie4);
			imgMeleeDie5 = FindViewById<ImageView> (Resource.Id.imgMeleeDie5);
			btnMeleeDiceRoll = FindViewById<Button>(Resource.Id.btnMeleeDiceRoll);
			
			txtMeleeResults = FindViewById<TextView>(Resource.Id.txtMeleeResults);
			imgMeleeLeaderLossSide = FindViewById<ImageView>(Resource.Id.imgMeleeLeaderLossSide);
			txtMeleeLeaderLoss = FindViewById<TextView>(Resource.Id.txtMeleeLeaderLoss);
			imgMeleeLeaderLoss = FindViewById<ImageView>(Resource.Id.imgMeleeLeaderLoss);
			
			btnMeleeIncrPrev	 = FindViewById<Button>(Resource.Id.btnMeleeIncrPrev	);
			btnMeleeIncrNext	 = FindViewById<Button>(Resource.Id.btnMeleeIncrNext	);
			editMeleeIncrValue	 = FindViewById<EditText>(Resource.Id.editMeleeIncrValue);
								
			btnMeleeLossPrev	 = FindViewById<Button>(Resource.Id.btnMeleeLossPrev	);
			btnMeleeLossNext	 = FindViewById<Button>(Resource.Id.btnMeleeLossNext	);
			editMeleeLossValue	 = FindViewById<EditText>(Resource.Id.editMeleeLossValue);
			
			btnMeleeValuePrev	 = FindViewById<Button>(Resource.Id.btnMeleeValuePrev	);
			btnMeleeValueNext	 = FindViewById<Button>(Resource.Id.btnMeleeValueNext	);
			editMeleeValueValue	 = FindViewById<EditText>(Resource.Id.editMeleeValueValue);
			
			btnMeleeLancePrev	 = FindViewById<Button>(Resource.Id.btnMeleeLancePrev	);
			btnMeleeLanceNext	 = FindViewById<Button>(Resource.Id.btnMeleeLanceNext	);
			editMeleeLanceValue	 = FindViewById<EditText>(Resource.Id.editMeleeLanceValue);
			
			btnMeleeTotalPrev	 = FindViewById<Button>(Resource.Id.btnMeleeTotalPrev	);
			btnMeleeTotalNext	 = FindViewById<Button>(Resource.Id.btnMeleeTotalNext	);
			editMeleeTotalValue	 = FindViewById<EditText>(Resource.Id.editMeleeTotalValue);
			
			btnMeleeMods13  = FindViewById<ToggleButton>(Resource.Id.btnMeleeMods13 );
			btnMeleeMods12  = FindViewById<ToggleButton>(Resource.Id.btnMeleeMods12 );
			btnMeleeMods32  = FindViewById<ToggleButton>(Resource.Id.btnMeleeMods32 );
			btnMeleeMods2   = FindViewById<ToggleButton>(Resource.Id.btnMeleeMods2  );
			btnMeleeModsLnc = FindViewById<ToggleButton>(Resource.Id.btnMeleeModsLnc);
			
			editMeleeAttackerValue.Text = "1";
			editMeleeDefenderValue.Text = "1";
			editMeleeIncrValue.Text = "1";
			editMeleeLossValue.Text = "1";
			editMeleeValueValue.Text = "1";
			editMeleeLanceValue.Text = "1";
			editMeleeTotalValue.Text = "1";
		}
Beispiel #6
0
		public static void SaveGame(Game game)
		{
			LbRepositoryXML.SaveLb(game.Saved);
		}