42 lines
1015 B
C#
42 lines
1015 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using TMPro;
|
|
|
|
public class reset : MonoBehaviour
|
|
{
|
|
public GameObject parent_puzzle, membeku;
|
|
private feedback feedback;
|
|
|
|
void Start()
|
|
{
|
|
feedback = parent_puzzle.GetComponent<feedback>();
|
|
}
|
|
|
|
private void OnMouseUp()
|
|
{
|
|
for (int i = 0; i < 4; i++)
|
|
{
|
|
drag dragComponent = parent_puzzle.transform.GetChild(i).GetComponent<drag>();
|
|
dragComponent.on_tempel = false;
|
|
dragComponent.on_pos = false;
|
|
dragComponent.transform.position = dragComponent.pos_awal;
|
|
dragComponent.transform.localScale = dragComponent.scale_awal;
|
|
}
|
|
|
|
membeku.SetActive(false);
|
|
feedback.selesai = false;
|
|
if (feedback.skorSudahDiupdate)
|
|
{
|
|
feedback.score -= 100;
|
|
feedback.skorSudahDiupdate = false;
|
|
feedback.UpdateScoreText();
|
|
}
|
|
}
|
|
|
|
void Update()
|
|
{
|
|
|
|
}
|
|
}
|