public override void Init() { base.Init(); aiController = GetComponent <AIController>(); movementController = GetComponent <AIMovementController>(); animController = GetComponent <AnimationController>(); inventoryController = GetComponent <AIInventoryController>(); hitboxController = GetComponentInChildren <HitboxController>(); limbsController = GetComponentInChildren <LimbsController>(); knockdownController = GetComponent <AIKnockDownController>(); aiManager = aiController.aiManager; }
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 void Init(AIStateController stateCon) { stateController = stateCon; fieldOfViewController = stateCon.GetComponentInChildren <FieldOfViewController>(); inventoryController = stateCon.GetComponent <AIInventoryController>(); movementController = stateCon.GetComponent <AIMovementController>(); animController = stateCon.GetComponent <AnimationController>(); lineOfSightObstaclesLayerMask = Resources.Load("LayerMasks/LayerMask_AI_Line Of Sight Obstacles") as ScriptableLayerMask; deltaTime = GetResource.DeltaTimer(); runtimeWeaponInHand = inventoryController.currentWeaponRuntime; inventoryController.currentWeaponRuntime.AttackCooldownEnd(); inventoryController.rangedWeaponRuntime.currentAmmoInMagazine = inventoryController.rangedWeaponRuntime.rangedData.maxMagazineAmmoAmount; }
public override void Init() { viewMeshFilter = GetComponent <MeshFilter>(); aiController = GetComponentInParent <AIController>(); playerTarget = FindObjectOfType <HealthControllerPlayer>(); inventoryController = aiController.GetComponent <AIInventoryController>(); alertController = aiController.GetComponent <AIAlertController>(); aiHealthController = aiController.GetComponent <HealthControllerAI>(); stateController = aiController.GetComponent <AIStateController>(); knockdownController = aiController.GetComponent <AIKnockDownController>(); viewMesh = new Mesh(); viewMesh.name = "View Mesh"; viewMeshFilter.mesh = viewMesh; if (drawFieldOfViewMesh.value) { DrawFieldOfView(); } }
public virtual void PickupWeaponPlayer() //Called when spawned with or picked up from the ground { animController = GetComponentInParent <AnimationController>(); DisableCollisionColliders(); playerInventoryController = GetComponentInParent <PlayerInventoryController>(); if (playerInventoryController == null) { aiInventoryController = GetComponentInParent <AIInventoryController>(); isPlayerWeapon = false; } else { playerWeaponController = playerInventoryController.weaponController; isPlayerWeapon = true; } for (int i = 0; i < knockdownWeaponColliders.Count; i++) { knockdownWeaponColliders[i].collisionCollider.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(); }
public override void Init() { base.Init(); inventoryController = GetComponentInParent <AIInventoryController>(); }