コード例 #1
0
        public override void Init()
        {
            aiManager       = FindObjectOfType <AIManager>();
            limbsController = GetComponentInChildren <LimbsController>();

            animHook = GetComponentInChildren <AnimatorHookAI>();
            if (animHook == null)
            {
                animHook = GetComponentInChildren <Animator>().gameObject.AddComponent <AnimatorHookAI>();
            }

            hitboxController      = GetComponentInChildren <HitboxController>();
            aiTroopController     = GetComponent <AITroopController>();
            animController        = GetComponent <AnimationController>();
            movementController    = GetComponent <AIMovementController>();
            inventoryController   = GetComponent <AIInventoryController>();
            healthController      = GetComponent <HealthController>();
            searchController      = GetComponent <AISearchAlertController>();
            aiAlertController     = GetComponent <AIAlertController>();
            fieldOfViewController = GetComponentInChildren <FieldOfViewController>();
            notificationHandler   = GetComponentInChildren <AINotificationHandler>();
            aiStateController     = GetComponent <AIStateController>();

            UpdateTransformLayer(); //Assign Correct Layer to Game Object

            //Init Assigned Components
            limbsController.Init();
            hitboxController.Init();
            aiTroopController.Init();
            animController.Init();
            animHook.Init();
            movementController.Init();
            inventoryController.Init();
            healthController.Init();
            searchController.Init();
            aiAlertController.Init();
            fieldOfViewController.Init();
            aiStateController.Init();
            notificationHandler.Init();
        }
コード例 #2
0
 public override void Init()
 {
     searchNotificationMask = Resources.Load("LayerMasks/LayerMask_Enemy Notifications") as ScriptableLayerMask;
     searchAlertController  = GetComponent <AISearchAlertController>();
     fieldOfViewController  = GetComponentInChildren <FieldOfViewController>();
 }
コード例 #3
0
 private void GetController()
 {
     searchAlertController = GetComponentInParent <AISearchAlertController>();
 }