public override void Init() { movementController = GetComponent <PlayerMovementController>(); actionController = GetComponent <PlayerActionController>(); rotationController = GetComponent <PlayerRotationController>(); animationController = GetComponent <PlayerAnimationController>(); inventoryController = GetComponent <PlayerInventoryController>(); weaponController = GetComponent <PlayerWeaponController>(); healthController = GetComponent <HealthController>(); reloadController = GetComponent <PlayerReloadController>(); interactionController = GetComponent <InteractionSearcherController>(); executionController = GetComponent <PlayerExecutionController>(); limbsController = GetComponentInChildren <LimbsController>(); hitboxController = GetComponentInChildren <HitboxController>(); abilityController = GetComponent <AbilityController>(); tickPlayer.value = true; movementController.Init(); actionController.Init(); rotationController.Init(); animationController.Init(); weaponController.Init(); inventoryController.Init(); healthController.Init(); reloadController.Init(); interactionController.Init(); executionController.Init(); limbsController.Init(); hitboxController.Init(); abilityController.Init(); }
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(); }