示例#1
0
 void OnTriggerEnter(Collider other)
 {
     if (other.CompareTag("Player"))
     {
         AutomatedPlayerMovement autoPlayerMove = other.GetComponent <AutomatedPlayerMovement>();
         autoPlayerMove.TurnDegrees(true, 20f);
     }
 }
    void OnTriggerEnter(Collider other)
    {
        if (other.CompareTag("Player"))
        {
            AutomatedPlayerMovement autoPlayerMove = other.GetComponent <AutomatedPlayerMovement>();
            autoPlayerMove.TurnDegrees(false, 13f);
            autoPlayerMove.StartMoveForward();

            this.gameObject.SetActive(false);
        }
    }
示例#3
0
    void OnTriggerEnter(Collider other)
    {
        if (other.CompareTag("Player"))
        {
            AutomatedPlayerMovement autoPlayerMove  = other.GetComponent <AutomatedPlayerMovement>();
            AutomatedCannonUsage    autoCannonUsage = other.GetComponent <AutomatedCannonUsage>();
            autoPlayerMove.StopMove();
            autoCannonUsage.PickupCannonball();
            autoPlayerMove.TurnDegrees(false, 45f);
            autoPlayerMove.StartMoveForward();

            cannonInstructionText.text = secondInstructionText;
        }
    }
示例#4
0
    void OnTriggerEnter(Collider other)
    {
        if (other.CompareTag("Player"))
        {
            AutomatedPlayerMovement autoPlayerMove = other.GetComponent <AutomatedPlayerMovement>();
            AutomatedPlayerStealGem autoSealGem    = other.GetComponent <AutomatedPlayerStealGem>();
            autoPlayerMove.StopMove();
            autoSealGem.ShowXIndicator();
            autoPlayerMove.SetDirection(Vector3.left);
            autoPlayerMove.TurnDegrees(true, 90f);
            autoSealGem.StealGem();
            autoPlayerMove.TurnDegrees(true, 180f);

            autoPlayerMove.SetDirection(Vector3.right);
            autoPlayerMove.StartMoveForward();

            StartCoroutine(DelayAndTurn(autoPlayerMove));

            this.backToBoatB4PlankTrigger.SetActive(true);
            this.backToBoatAfterPlankTrigger.SetActive(true);

            mainCamera.transform.position = secondCameraPosition.position;
        }
    }
示例#5
0
    void OnTriggerEnter(Collider other)
    {
        if (other.CompareTag("Player"))
        {
            AutomatedPlayerMovement autoPlayerMove = other.GetComponent <AutomatedPlayerMovement>();
            other.GetComponent <Rigidbody>().constraints = RigidbodyConstraints.FreezeAll;
            other.transform.parent = shipRb.gameObject.transform;

            rockRb.velocity = Vector3.back * 20f;

            xInidcator.SetActive(true);

            autoPlayerMove.TurnDegrees(false, 90f);
            shipRb.velocity = (new Vector3(1, 0, 1)) * 35f;

            StartCoroutine(WaitAndStrafeLeft());
        }
    }
 void TurnPlayerLeft(AutomatedPlayerMovement autoPlayerMovement)
 {
     autoPlayerMovement.TurnDegrees(false, 90f);
 }
示例#7
0
    IEnumerator DelayAndTurn(AutomatedPlayerMovement autoMove)
    {
        yield return(new WaitForSeconds(1.5f));

        autoMove.TurnDegrees(true, 90f);
    }