예제 #1
0
    public void initialize_components(AICombatHandler aiCombatHandler, SOAIController soController)
    {
        // Initialize controller components
        this.aiCombatHandler = aiCombatHandler;
        this.soController    = soController;

        this.agent          = this.GetComponent <NavMeshAgent> ();
        this.agentTransform = this.agent.transform;
    }
예제 #2
0
    public void initialize_components()
    {
        // Get AI components
        this.aiController    = this.GetComponent <AIController> ();
        this.aiAnimator      = this.GetComponentInChildren <AIAnimator> ();
        this.aiCombatHandler = this.GetComponent <AICombatHandler> ();
        this.health          = this.GetComponent <Health> ();

        // Initialize AI components
        this.aiController.initialize_components(this.aiCombatHandler, this.soController);
        this.aiAnimator.initialize_components(this);
        this.aiCombatHandler.initialize_components(this.aiController.agentTransform, this.soTargetter, this);
        this.health.initialize_components(this.soHealth, this);
    }