Ejemplo n.º 1
0
 void DropTile()
 {
     if (transform.GetChild(0).gameObject.tag == "Robot")
     {
         GameObject    robot     = transform.GetChild(0).gameObject;
         RobotMovement robot_scr = robot.GetComponent <RobotMovement>();
         robot_scr.Fall(Mathf.RoundToInt(transform.position.x), Mathf.RoundToInt(transform.position.z));
         AudioManager.instance.Play("tile_fall");
         Destroy(this.gameObject);
     }
 }