hide/show of canvas are managed (they're moved far in fact). refs issue6
This commit is contained in:
parent
94879f62f5
commit
8b5a9975b3
3291
Assets/scene.unity
3291
Assets/scene.unity
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,51 @@
|
|||
using UnityEngine;
|
||||
using System.Collections;
|
||||
|
||||
public class Gui_OnClickChangeUi : MonoBehaviour {
|
||||
|
||||
public GameObject Canvas_chat;
|
||||
public GameObject dead_list;
|
||||
public Gui_ChatWindow chatWindow;
|
||||
public Vector3 chatPosition;
|
||||
public Vector3 deadListPosition;
|
||||
|
||||
public CanvasGroup cg;
|
||||
|
||||
// Use this for initialization
|
||||
void Start () {
|
||||
//manage canvas chat
|
||||
Canvas_chat = GameObject.Find("Canvas_chat");
|
||||
chatPosition = Canvas_chat.transform.localPosition;
|
||||
Canvas_chat.transform.localPosition = new Vector3(1000, 1000);
|
||||
|
||||
//manage dead_list
|
||||
dead_list = GameObject.Find("dead_list");
|
||||
deadListPosition = dead_list.transform.localPosition;
|
||||
dead_list.transform.localPosition = new Vector3(1000, 1000);
|
||||
//canvas.GetComponentInChildren();
|
||||
}
|
||||
|
||||
void OnMouseDown()
|
||||
{
|
||||
//Manage show/hide status of canvas (hidden by default, shown when the user clicks on the associate building)
|
||||
switch (this.gameObject.name)
|
||||
{
|
||||
case "Maison":
|
||||
Debug.logger.Log("Maison !");
|
||||
break;
|
||||
case "Taverne":
|
||||
Debug.logger.Log("Taverne !");
|
||||
Canvas_chat.transform.localPosition = chatPosition;
|
||||
break;
|
||||
case "eglise_mdl":
|
||||
Debug.logger.Log("Eglise !");
|
||||
dead_list.transform.localPosition = deadListPosition;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update () {
|
||||
|
||||
}
|
||||
}
|
|
@ -28,7 +28,7 @@ public class Gui_OnClickedMoveCamera : MonoBehaviour {
|
|||
|
||||
camCtrl.targetPos = destination.position;
|
||||
camCtrl.targetRot = destination.rotation;
|
||||
}
|
||||
}
|
||||
|
||||
void OnMouseEnter() {
|
||||
//Lerp to hilight color
|
||||
|
|
Loading…
Reference in New Issue