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.
40 lines
974 B
40 lines
974 B
using AX.MessageSystem; |
|
using System.Collections; |
|
using System.Collections.Generic; |
|
using UnityEngine; |
|
using System; |
|
using UnityEngine.UI; |
|
|
|
public class FireDeployLeftSYNCHandle : MonoBehaviour { |
|
|
|
public FireDepolySYNCInfo fireDepolySYNCInfo; |
|
|
|
private void Awake() |
|
{ |
|
MessageDispatcher.AddListener("FDLEFTSYNC_HANDLE", FDLeftSYNCHandle); |
|
} |
|
|
|
// Use this for initialization |
|
void Start () { |
|
|
|
} |
|
|
|
private void OnDestroy() |
|
{ |
|
MessageDispatcher.RemoveListener("FDLEFTSYNC_HANDLE", FDLeftSYNCHandle); |
|
} |
|
|
|
// Update is called once per frame |
|
void Update () { |
|
|
|
} |
|
|
|
private void FDLeftSYNCHandle(IMessage obj) |
|
{ |
|
var fireDeployLeftSYNCData = (FireDeployLeftSYNCData)obj.Data; |
|
if (transform.Find("Label").GetComponent<Text>().text == fireDeployLeftSYNCData.modeItemName) |
|
{ |
|
transform.GetComponent<Toggle>().isOn = fireDeployLeftSYNCData.selected; |
|
} |
|
} |
|
}
|
|
|