private void Awake()
        {
            subComponentProcessor = GetComponentInChildren <SubComponentProcessor>();
            //manualInput = GetComponent<ManualInput>();
            //ledgeChecker = GetComponentInChildren<LedgeChecker>();
            animationProgress = GetComponent <AnimationProgress>();
            aiProgress        = GetComponentInChildren <AIProgress>();
            damageDetector    = GetComponentInChildren <DamageDetector>();
            boxCollider       = GetComponent <BoxCollider>();
            navMeshObstacle   = GetComponent <NavMeshObstacle>();
            instaKill         = GetComponentInChildren <InstaKill>();

            collisionSpheres       = GetComponentInChildren <CollisionSpheres>();
            collisionSpheres.owner = this;
            collisionSpheres.SetColliderSpheres();

            dataProcessor = this.gameObject.GetComponentInChildren <DataProcessor>();
            System.Type[] arr =
            {
                typeof(AirControl),
                typeof(SomeDataset)
            };
            dataProcessor.InitializeSets(arr);

            aiController = GetComponentInChildren <AIController>();
            if (aiController == null)
            {
                if (navMeshObstacle != null)
                {
                    navMeshObstacle.carving = true;
                }
            }

            RegisterCharacter();
        }
Exemple #2
0
        private void Awake()
        {
            subComponentProcessor = GetComponentInChildren <SubComponentProcessor>();

            // temp
            animationProgress = GetComponent <AnimationProgress>();
            aiProgress        = GetComponentInChildren <AIProgress>();
            boxCollider       = GetComponent <BoxCollider>();
            navMeshObstacle   = GetComponent <NavMeshObstacle>();

            aiController = GetComponentInChildren <AIController>();
            if (aiController == null)
            {
                if (navMeshObstacle != null)
                {
                    navMeshObstacle.carving = true;
                }
            }

            RegisterCharacter();
            InitCharacterStates(SkinnedMeshAnimator);
        }
 private void Awake()
 {
     subComponentProcessor = this.gameObject.GetComponentInParent <SubComponentProcessor>();
 }