// Start is called before the first frame update void Start() { human = GetComponent <HumanController>(); weapons = GetComponent <AsteriaWeapons.WeaponManager>(); if (!human) { Destroy(this); return; } human.ik = this; human.IKGunHands = IKGunHands; animator = GetComponent <Animator>(); if (!animator) { Destroy(this); return; } BodyParts = new HumanoidBodyParts(animator); }
/// <summary> /// Get all the required components /// </summary> void GetComponentsRequired() { health = character.GetComponent <AsteriaHealth.HealthManager>(); weapons = character.GetComponent <AsteriaWeapons.WeaponManager>(); if (!health) { Debug.LogWarning("There is no health manager on the character. No health will be drawn"); Destroy(healthSection); } if (!weapons) { Debug.LogWarning("There is no weapons manager on the character. No ammo or weapons will be drawn"); Destroy(ammoSection); Destroy(aimingSection); } if (!characterInput.LimitSprint) { Debug.LogWarning("The characters stamina is not limited. The limit will not be displayed"); Destroy(staminaSection); } }