コード例 #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
ファイル: AI.cs プロジェクト: vinidamiani/LabPuc2020_Level
    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);
    }