public override void Init() { movementController = GetComponent <AIMovementController>(); animController = GetComponent <AnimationController>(); inventoryController = GetComponent <AIInventoryController>(); hitboxController = GetComponentInChildren <HitboxController>(); limbsController = GetComponentInChildren <LimbsController>(); troopController = GetComponent <AITroopController>(); healthController = GetComponent <HealthControllerAI>(); stateController = GetComponent <AIStateController>(); knockDownNotificationCollider.enabled = false; }
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(); }