Example #1
0
    // Update is called once per frame
    void Update()
    {
        //movementBehaviour.Align(target.transform);
        // rigidbody.velocity = Vector3.forward*maxSpeed;

        //  movementBehaviour.SteeringFlee();
        //movementBehaviour.LookWhereYoureGoing();
        switch (movementype)
        {
        case testerScript.movementType.evade:
            movementBehaviour.Evade();
            break;

        case testerScript.movementType.pursuit:
            movementBehaviour.Pursuit();
            break;

        case testerScript.movementType.seek:
            movementBehaviour.SteeringSeek(movementBehaviour._targetGameObject.transform);
            break;

        case testerScript.movementType.FaceawayAndEvade:
            movementBehaviour.FaceAway(movementBehaviour._targetGameObject.transform);
            movementBehaviour.Evade();
            break;

        case  testerScript.movementType.face:
            movementBehaviour.Face((movementBehaviour._targetGameObject.transform));
            break;

        case testerScript.movementType.faceaway:
            movementBehaviour.FaceAway((movementBehaviour._targetGameObject.transform));
            break;
        }
    }