-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWoodplatesWin.cs
More file actions
50 lines (49 loc) · 1.39 KB
/
WoodplatesWin.cs
File metadata and controls
50 lines (49 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.EventSystems;
public class WoodplatesWin : MonoBehaviour, IPointerClickHandler
{
public GameObject obj;
public GameObject objActive;
public GameObject choiceText;
public GameObject textTrue;
public GameObject textTrueActive;
public GameObject woodplate_right;
public void Start()
{
obj = GameObject.Find("Graphic");
objActive = obj;
if (obj)
{
Debug.Log(obj.name);
obj.SetActive(false);
}
else
{
Debug.Log("No Graphic object");
}
choiceText = GameObject.Find("Choice_text");
textTrue = GameObject.Find("Text_true");
textTrueActive = textTrue;
if (textTrue)
{
Debug.Log(textTrue.name);
textTrue.SetActive(false);
}
else Debug.Log("No Text_true");
woodplate_right = GameObject.Find("Woodplate_Right");
}
public void OnPointerClick(PointerEventData eventData)
{
Debug.Log("click received");
objActive.SetActive(true);
if (choiceText)
{
Debug.Log(choiceText.name);
choiceText.SetActive(false);
}
textTrueActive.SetActive(true);
woodplate_right.SetActive(false);
}
}