Esempio n. 1
0
    private bool ScanAllPlates()
    {
        foreach (GameObject Plates in ListOfPlates)
        {
            PressurePlate _plate = Plates.GetComponent <PressurePlate>();

            if (!_plate.GetActivateInfo)
            {
                return(false);
            }
        }

        //if all plates is activated
        return(true);
    }
 public void StartAnimation()
 {
     if (place_metal_sheet == false)
     {
         place_metal_sheet         = true;
         Plates.transform.position = Positions.transform.position;
         Plates.transform.rotation = Positions.transform.rotation;
         Plates.GetComponent <Animator>().SetBool("place_metal_sheet", true);
     }
     else
     {
         place_metal_sheet = false;
         Plates.GetComponent <Animator>().SetBool("place_metal_sheet", false);
     }
 }