You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
520 B
25 lines
520 B
using UnityEngine; |
|
using System.Collections; |
|
using AX.MessageSystem; |
|
|
|
public class ListMessageControl : MonoBehaviour { |
|
|
|
void OnDestroy() |
|
{ |
|
MessageDispatcher.RemoveListener("SHOWUI", Hide); |
|
} |
|
void OnEnable() |
|
{ |
|
MessageDispatcher.AddListener("SHOWUI", Hide); |
|
gameObject.SetActive(false); |
|
} |
|
|
|
|
|
void Hide(IMessage message) |
|
{ |
|
if ((string)message.Data == this.gameObject.name) |
|
{ |
|
this.gameObject.SetActive(true); |
|
} |
|
} |
|
}
|
|
|