Ejemplo n.º 1
0
 private void OnTriggerEnter(Collider other)
 {
     if (other.CompareTag("EndZoneCollider"))
     {
         door3.CloseDoor();
     }
 }
Ejemplo n.º 2
0
 private void OnTriggerEnter(Collider other)
 {
     if (other.gameObject.tag == "Player")
     {
         doorController.CloseDoor();
     }
 }
Ejemplo n.º 3
0
 private void OnTriggerEnter(Collider other)
 {
     if (!isLoopingSection && loopCounter < 2)
     {
         DC.CloseDoor();
         Vector3 SpawnLocationOffset = new Vector3(SpawnLocation.x, SpawnLocation.y + playerOffsetY, SpawnLocation.z + playerOffsetZ);
         loopCounter++;
         GM.currentIterration++;
         PC.Teleport(SpawnLocationOffset);
     }
 }
Ejemplo n.º 4
0
    private void OnTriggerEnter(Collider other)
    {
        if (state == TriggerState.Opens)
        {
            door.OpenDoor();
        }

        if (state == TriggerState.Closes)
        {
            door.CloseDoor();
        }
    }
    /// <summary>
    /// When a grid gets generated sets a door on top
    /// </summary>
    /// <param name="grid"></param>
    private void OnGridGenerated(Grid grid)
    {
        GridGraphic gridGraphic = gridManager.GetGridGraphic();

        int randomColumn = Random.Range(2, gridManager.GridSize.x - 2);

        Vector3 pos = gridGraphic.GetCells()[randomColumn, gridManager.GridSize.y - 1].transform.position;

        doorInstance.transform.position = pos + (Vector3)offset;
        doorInstance.KeyAmountNeeded    = gameManager.GetTotalKeys();
        doorController.CloseDoor();
        doorInstance.gameObject.SetActive(true);
    }
Ejemplo n.º 6
0
    IEnumerator  closeDoor()
    {
        yield  return(new WaitForSeconds(3));

        doorController.CloseDoor();
    }
Ejemplo n.º 7
0
 private void OnTriggerEnter(Collider other)
 {
     myDoor.CloseDoor();
 }