//-----------------------------------------------------------------------------------------------------------------------------------------------------
    //Function for deciding who the AI should target. Sondra or Wolf?
    void Judgement()
    {
        CameraTargetController camTarCon = GameObject.FindObjectOfType <CameraTargetController>();

        if (camTarCon.controlledChar == 0 && wolfRageIntensity < (sondraRageIntensity + 200))
        {
            wolfRageIntensity += 10;
        }

        if (camTarCon.controlledChar == 1 && sondraRageIntensity < (wolfRageIntensity + 200))
        {
            sondraRageIntensity += 10;
        }

        //If either of these don't exist
        if (sondra == null || wolf == false)
        {
            Debug.LogError("One of the Main Cast is missing. Script will break without both Sondra and Wolf"); //Show Error in Inspector
        }

        //Else, choose a target based on who the AI's angrier at
        else
        {
            if (sondraRageIntensity > wolfRageIntensity)
            {
                target = sondra;
            }

            else if (wolfRageIntensity > sondraRageIntensity)
            {
                target = wolf;
            }
        }
    }
    void Start()
    {
        HelloAngel();

        _cameraTargetController = GameObject.FindObjectOfType <CameraTargetController>();

        //Turn your self off.
        gameObject.SetActive(false);
    }
Exemple #3
0
    void Start()
    {
        startingMinDistance = minDistance;
        startingMaxDistance = maxDistance;

        zoom = false;
        zoomCrosshair.enabled = false;
        camTarCon             = GameObject.FindObjectOfType <CameraTargetController>();
    }
    //-----------------------------------------------------------------------------------------------------------------------------------------------------
    // When the Game Starts
    private void Start()
    {
        nav            = GetComponent <NavMeshAgent>();
        bH             = GetComponent <Boss_Health>();
        camTarCon      = GameObject.FindObjectOfType <CameraTargetController>();
        rb             = GetComponent <Rigidbody>();
        rb.isKinematic = true;
        rb.mass        = 9001;
        rb.constraints = RigidbodyConstraints.FreezeRotation;
        headHitBox.transform.GetComponent <Collider>().enabled = false;
        headHitBox.damage = burrowDamage;

        maxHealth = bH.health;

        if (wallTargetCount > 0)
        {
            //Example:
            //X = 1000 - (1000 / 3 + 1)
            //X = 1000 - 250
            //X = 750
            nextWallAttackSubstract = (maxHealth / (wallTargetCount + 1));
            nextWallAttack          = maxHealth - nextWallAttackSubstract;
        }
    }
Exemple #5
0
 // Use this for initialization
 void Start()
 {
     camTarCon = cameraController.GetComponent <CameraTargetController>();
 }
#pragma warning restore 0219, 414

    private void OnEnable()
    {
        this._sCameraTargetController = this.target as CameraTargetController;
    }
Exemple #7
0
 // Use this for initialization
 void Start()
 {
     camTarget = FindObjectOfType <CameraTargetController> ();
 }
 public void GetController()
 {
     this.controller = this._cameraTarget.GetComponent <CameraTargetController>();
 }