35 lines
544 B
C#
35 lines
544 B
C#
|
using UnityEngine;
|
|||
|
using System.Collections;
|
|||
|
|
|||
|
public class tchat_anim : MonoBehaviour {
|
|||
|
|
|||
|
|
|||
|
public Animator anim;
|
|||
|
// Use this for initialization
|
|||
|
void Start () {
|
|||
|
|
|||
|
anim = gameObject.GetComponent<Animator> ();
|
|||
|
anim.SetBool ("etat_tchat",false);
|
|||
|
}
|
|||
|
|
|||
|
// Update is called once per frame
|
|||
|
void Update () {
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
void OnMouseDown(){
|
|||
|
//Move to position
|
|||
|
|
|||
|
if (anim.GetBool ("etat_tchat") == false) {
|
|||
|
anim.SetBool ("etat_tchat", true);
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
if (anim.GetBool ("etat_tchat") == true) {
|
|||
|
anim.SetBool ("etat_tchat", false);
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
}
|