public override void Init(Breast host) { base.Init(host); breastCollider = host.tr_breastBody.GetComponent <Collider>(); breastColliderSize = ((SphereCollider)breastCollider).radius; layerMaskPlayer = 1 << LayerMask.NameToLayer(LAYER_PLAYER); layerMaskBreast = 1 << LayerMask.NameToLayer(LAYER_BREAST); // Ignores the collision between player and breast Physics.IgnoreCollision(breastCollider, host.tr_player.GetComponent <Collider>()); }
private static void SaveCancerRiskFactors() { Breast bcancer = new Breast(); CancerRiskFactors breast = new Breast() { MensturationHistory = new MensturationHistory() { AgeOfFirstPeriod = "", AgePeriodStopped = "", Confident = "", LMP = "", StillHavingPeriods = "" }, PhysicalData = new PhysicalData() { Weight = "", Feet = "", Inches = "" }, }; CancerRiskFactors colorectal = new Colorectal() { MensturationHistory = new MensturationFactors() { AgePeriodStopped = "", StillHavingPeriods = "" }, PhysicalData = new PhysicalData() { Weight = "", Feet = "", Inches = "" }, }; SessionManager.Instance.SetActivePatient("99911041507", 7); PhysicalExamination physical = new PhysicalExamination(SessionManager.Instance.GetActivePatient()); // physical.weightPounds = "75"; //HraModelChangedEventArgs args = new HraModelChangedEventArgs(null); //args.updatedMembers.Add(physical.GetMemberByName("weightPounds")); // Edit And save //physical.BackgroundPersistWork(args); physical.weightPounds = "80"; physical.BackgroundPersistWork(new HraModelChangedEventArgs(null)); }
public void Init(CharacterInfo info, BattleManager battleManager) { this.info = info; this.battleManager = battleManager; ch_transform = transform; ch_rigidbody = GetComponent <Rigidbody>(); playerIndex = info.playerIndex; // Add sub components & init stat = AddExistingSubComponent <CharacterStat>(); motor = CreateSubComponent <CharacterMotor>(); battler = CreateSubComponent <Battler>(); breast = CreateSubComponent <Breast>(); // TODO: use character init param class to do this if (info.willCreateController) { controller = CreateSubComponent <PlayerController>(); } }
public void doDamage(float amount) { DrainPlayer = PlayerController.isDraining; DrownPlayer = WaterDamage.isDrowning; rb.isKinematic = true; rb.useGravity = false; if (!DrainPlayer) { if (!DrownPlayer || fallDamage) { audioSrc2.volume = Random.Range(0.8f, 1.0f); audioSrc2.pitch = Random.Range(0.8f, 1.0f); audioSrc2.PlayOneShot(hurt); ScreenFlashEnabled = true; } } flashScreen = hurtScreen; HPMessage.GetComponent <Text>().enabled = true; HPMessage.GetComponent <RectTransform>().anchoredPosition = HPOrgPos; FlameBreastEnabled = Breast.FlameBreast; if (FlameBreastEnabled && stamina > 1) { PlayCtrl.RemovePlayerStamina(amount); } else { health -= amount; } HPMessage.text = "-" + Mathf.CeilToInt(amount); if (health <= 0) { breastState = GetComponent <Breast>(); breastState.ResetBreastState(); WatDMG = Head.GetComponent <WaterDamage>(); WatDMG.ResetDrown(); hurtScreen.color = new Color(hurtScreen.color.r, hurtScreen.color.g, hurtScreen.color.b, 1); fadeScr = ScreenFade.GetComponent <FadeScreen>(); fadeScr.SetAlpha(1); fadeScr.FadeOutScreen(); audioSrc2.volume = Random.Range(0.8f, 1.0f); audioSrc2.pitch = Random.Range(0.8f, 1.0f); audioSrc2.PlayOneShot(death); Message.GetComponent <Text>().enabled = true; playerTransform.position = lastPosition; playerTransform.rotation = lastRotation; Message.text = "You Died..."; Message.GetComponent <RectTransform>().anchoredPosition = MSGOrgPos; StartCoroutine(FadeTextToZeroAlpha(3f, Message)); flashScreen.enabled = false; MovementSet.ResetStam(); health = 100; setUIText(); } StartCoroutine(FadeTextToZeroAlpha(3f, HPMessage)); }
private static void SaveCancerRiskFactors() { Breast bcancer = new Breast(); CancerRiskFactors breast = new Breast() { MensturationHistory = new MensturationHistory() { AgeOfFirstPeriod="", AgePeriodStopped="", Confident="", LMP="", StillHavingPeriods="" }, PhysicalData = new PhysicalData() { Weight="", Feet= "", Inches="" }, }; CancerRiskFactors colorectal = new Colorectal() { MensturationHistory = new MensturationFactors() { AgePeriodStopped = "", StillHavingPeriods = "" }, PhysicalData = new PhysicalData() { Weight = "", Feet = "", Inches = "" }, }; SessionManager.Instance.SetActivePatient("99911041507",7); PhysicalExamination physical = new PhysicalExamination(SessionManager.Instance.GetActivePatient()); // physical.weightPounds = "75"; //HraModelChangedEventArgs args = new HraModelChangedEventArgs(null); //args.updatedMembers.Add(physical.GetMemberByName("weightPounds")); // Edit And save //physical.BackgroundPersistWork(args); physical.weightPounds = "80"; physical.BackgroundPersistWork(new HraModelChangedEventArgs(null)); }