//------------------------------------------------ private void BtnTravelC(object sender, EventArgs e) { if (movementNumber == 0) { OHvc = new oldHouseVC(); this.NavigationController.PushViewController(OHvc, true); OHvc.Player_Health = Player_Health; OHvc.Player_Speed = Player_Speed; OHvc.Player_Damage = Player_Damage; } else if (movementNumber == 1) { BHvc = new boatHouseVC(); this.NavigationController.PushViewController(BHvc, true); BHvc.Player_Health = Player_Health; BHvc.Player_Speed = Player_Speed; BHvc.Player_Damage = Player_Damage; } else if (movementNumber == 2) { Mvc = new mineVC(); this.NavigationController.PushViewController(Mvc, true); Mvc.Player_Health = Player_Health; Mvc.Player_Speed = Player_Speed; Mvc.Player_Damage = Player_Damage; } else if (movementNumber == 3) { FOrestvc = new forestVC(); this.NavigationController.PushViewController(FOrestvc, true); FOrestvc.Player_Health = Player_Health; FOrestvc.Player_Speed = Player_Speed; FOrestvc.Player_Damage = Player_Damage; } else if (movementNumber == 4) { Fvc = new fieldVC(); this.NavigationController.PushViewController(Fvc, true); Fvc.Player_Health = Player_Health; Fvc.Player_Speed = Player_Speed; Fvc.Player_Damage = Player_Damage; } else if (movementNumber == 5) { Lvc = new lakeVC(); this.NavigationController.PushViewController(Lvc, true); Lvc.Player_Health = Player_Health; Lvc.Player_Speed = Player_Speed; Lvc.Player_Damage = Player_Damage; } }
private void BtnTravelC(object sender, EventArgs e) { if (travel == true) { if (movementNumber == 0) { OHvc = new oldHouseVC(); this.NavigationController.PushViewController(OHvc, true); OHvc.Player_Health = _PlayerHealth.Text; OHvc.Player_Speed = _PlayerSpeed.Text; OHvc.Player_Damage = _PlayerDamage.Text; OHvc.HealthPotsString = _HealthPots.Text; if (shieldB == true) { OHvc.shieldB = true; OHvc.defendYN = true; } if (holy == true) { OHvc.holy = true; } if (spectral == true) { OHvc.spectral = true; } } else if (movementNumber == 1) { BHvc = new boatHouseVC(); this.NavigationController.PushViewController(BHvc, true); BHvc.Player_Health = _PlayerHealth.Text; BHvc.Player_Speed = _PlayerSpeed.Text; BHvc.Player_Damage = _PlayerDamage.Text; BHvc.HealthPotsString = _HealthPots.Text; if (shieldB == true) { BHvc.shieldB = true; BHvc.defendYN = true; } if (holy == true) { BHvc.holy = true; } if (spectral == true) { BHvc.spectral = true; } } else if (movementNumber == 2) { Mvc = new mineVC(); this.NavigationController.PushViewController(Mvc, true); Mvc.Player_Health = _PlayerHealth.Text; Mvc.Player_Speed = _PlayerSpeed.Text; Mvc.Player_Damage = _PlayerDamage.Text; Mvc.HealthPotsString = _HealthPots.Text; if (shieldB == true) { Mvc.shieldB = true; Mvc.defendYN = true; } if (holy == true) { Mvc.holy = true; } if (spectral == true) { Mvc.spectral = true; } } else if (movementNumber == 3) { FOrestvc = new forestVC(); this.NavigationController.PushViewController(FOrestvc, true); FOrestvc.Player_Health = _PlayerHealth.Text; FOrestvc.Player_Speed = _PlayerSpeed.Text; FOrestvc.Player_Damage = _PlayerDamage.Text; FOrestvc.HealthPotsString = _HealthPots.Text; if (shieldB == true) { FOrestvc.shieldB = true; FOrestvc.defendYN = true; } if (holy == true) { FOrestvc.holy = true; } if (spectral == true) { FOrestvc.spectral = true; } } else if (movementNumber == 4) { Fvc = new fieldVC(); this.NavigationController.PushViewController(Fvc, true); Fvc.Player_Health = _PlayerHealth.Text; Fvc.Player_Speed = _PlayerSpeed.Text; Fvc.Player_Damage = _PlayerDamage.Text; Fvc.HealthPotsString = _HealthPots.Text; if (shieldB == true) { Fvc.shieldB = true; Fvc.defendYN = true; } if (holy == true) { Fvc.holy = true; } if (spectral == true) { Fvc.spectral = true; } } else if (movementNumber == 5) { Lvc = new lakeVC(); this.NavigationController.PushViewController(Lvc, true); Lvc.Player_Health = _PlayerHealth.Text; Lvc.Player_Speed = _PlayerSpeed.Text; Lvc.Player_Damage = _PlayerDamage.Text; Lvc.HealthPotsString = _HealthPots.Text; if (shieldB == true) { Lvc.shieldB = true; Lvc.defendYN = true; } if (holy == true) { Lvc.holy = true; } if (spectral == true) { Lvc.spectral = true; } } } else { string healed = "enermy alive travel inposible try run!!"; _LblNarrater.Text = healed; } int PH = Int32.Parse(_PlayerHealth.Text); if (PH <= 0) { string healed = "you have died your corps shall join the damed in hanting this place"; _LblNarrater.Text = healed; _PlayerHealth.Text = "dead"; } }