fixing issue : position parameters of the chat/deadlist are now hard-coded. refs issue6
This commit is contained in:
parent
8b5a9975b3
commit
5c0e52b779
|
@ -0,0 +1,55 @@
|
|||
using UnityEngine;
|
||||
using System.Collections;
|
||||
|
||||
public class OnClickChangeUI : MonoBehaviour
|
||||
{
|
||||
|
||||
private GameObject GOinstance;
|
||||
private GameObject chat;
|
||||
private GameObject deadlist;
|
||||
Vector3 chatPos;
|
||||
Vector3 deadListPos;
|
||||
Vector3 away;
|
||||
|
||||
// Use this for initialization
|
||||
void Start()
|
||||
{
|
||||
GOinstance = this.gameObject;
|
||||
chat = GameObject.Find("Canvas_chat");
|
||||
deadlist = GameObject.Find("dead_list");
|
||||
|
||||
chatPos = new Vector3(-14.64F, 15.23F, 6.039996F); //chat.transform.position;
|
||||
deadListPos = new Vector3(-2.162F, 0.115F, 3.507F);//deadlist.transform.position;
|
||||
away = new Vector3(1000, 1000);
|
||||
|
||||
chat.transform.localPosition = away;
|
||||
deadlist.transform.localPosition = away;
|
||||
|
||||
Debug.Log("chat : " + chatPos);
|
||||
Debug.Log("dead : " + deadListPos);
|
||||
}
|
||||
|
||||
void OnMouseDown()
|
||||
{
|
||||
switch (GOinstance.transform.name)
|
||||
{
|
||||
case "Taverne":
|
||||
chat.transform.localPosition = chatPos;
|
||||
Debug.Log("Taverne");
|
||||
break;
|
||||
case "eglise_mdl":
|
||||
deadlist.transform.localPosition = deadListPos;
|
||||
Debug.Log("eglise");
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue