Esempio n. 1
0
        protected virtual void OnValidate()
        {
            if (_hittableObject == null)
            {
                _hittableObject = GetComponentInChildren <HittableObject>(true);
            }

            if (_battleUnit == null)
            {
                _battleUnit = GetComponentInChildren <BattleUnit>(true);
            }
        }
        private void OnValidate()
        {
            if (_weaponController == null)
            {
                _weaponController = GetComponentInChildren <NullWeaponController>();
            }

            if (_hittableObject == null)
            {
                _hittableObject = GetComponentInChildren <HittableObject>();
            }

            if (_teamController == null)
            {
                _teamController = GetComponentInChildren <TeamController>();
            }
        }