// Use this for initialization private void Awake() { _character = GetComponent <F3DCharacter>(); _weaponController = GetComponent <F3DWeaponController>(); _freezable = GetComponent <Freezeable>(); _rb2D = GetComponent <Rigidbody2D>(); _audio = GetComponent <F3DCharacterAudio>(); }
// Use this for initialization void Awake() { _rBody = GetComponent <Rigidbody2D>(); _controller = GetComponent <F3DCharacterController>(); _weaponController = GetComponent <F3DWeaponController>(); _colliders = gameObject.GetComponentsInChildren <Collider2D>(); heathBarImage = heathBarSlider.GetComponentInChildren <Image>(); currentHealth = maxHealth; _initialPosition = gameObject.transform.position; _initialRotation = gameObject.transform.rotation; }
private void EquipPlayerWithWeapon(GameObject player, WeaponIdentifier weaponIdentifier) { F3DWeaponController playerWeaponController = player.GetComponent <F3DWeaponController>(); playerWeaponController.AddEquippedWeapon(weaponIdentifier); }
private void Awake() { WeaponController = GetComponent <F3DWeaponController>(); }