votes buttons added for hanged tree, visibility managed in changeUI script
This commit is contained in:
parent
afc4447e8d
commit
8c08e4c1f3
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,16 @@
|
|||
using UnityEngine;
|
||||
using System.Collections;
|
||||
|
||||
public class NewBehaviourScript : MonoBehaviour {
|
||||
|
||||
|
||||
// Use this for initialization
|
||||
void Start () {
|
||||
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update () {
|
||||
|
||||
}
|
||||
}
|
|
@ -1,5 +1,6 @@
|
|||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class OnClickChangeUI : MonoBehaviour
|
||||
{
|
||||
|
@ -7,6 +8,8 @@ public class OnClickChangeUI : MonoBehaviour
|
|||
private GameObject GOinstance;
|
||||
private GameObject chat;
|
||||
private GameObject deadlist;
|
||||
private GameObject votePendu;
|
||||
CanvasGroup votePenduCanvas;
|
||||
Vector3 chatPos;
|
||||
Vector3 deadListPos;
|
||||
Vector3 away;
|
||||
|
@ -17,9 +20,12 @@ public class OnClickChangeUI : MonoBehaviour
|
|||
GOinstance = this.gameObject;
|
||||
chat = GameObject.Find("Canvas_chat");
|
||||
deadlist = GameObject.Find("dead_list");
|
||||
votePendu = GameObject.Find("PanelVotePendu");
|
||||
|
||||
chatPos = new Vector3(-14.64F, 15.23F, 6.039996F); //chat.transform.position;
|
||||
deadListPos = new Vector3(-2.162F, 0.115F, 3.507F);//deadlist.transform.position;
|
||||
votePenduCanvas = votePendu.GetComponent<CanvasGroup>();
|
||||
votePenduCanvas.alpha = 0;
|
||||
away = new Vector3(1000, 1000);
|
||||
|
||||
chat.transform.localPosition = away;
|
||||
|
@ -41,7 +47,10 @@ public class OnClickChangeUI : MonoBehaviour
|
|||
deadlist.transform.localPosition = deadListPos;
|
||||
Debug.Log("eglise");
|
||||
break;
|
||||
|
||||
case "arbre_pendus_mdl":
|
||||
votePenduCanvas.alpha = 1;
|
||||
Debug.Log("pendu");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue