上海苏宁宝丽嘉酒店,2020.11.17 15:30改为单机版本,以后合成单机版本可以以此版本为模板
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.
 
 
 
 

36 lines
977 B

using AX.MessageSystem;
using AX.NetworkSystem;
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class EditorRight : MonoBehaviour {
private Toggle toggle;
// Use this for initialization
void Start ()
{
toggle = GetComponent<Toggle>();
toggle.onValueChanged.AddListener(SetEditorRight);
}
private void SetEditorRight(bool isOn)
{
DisasterManager.editorRight = isOn;
MessageDispatcher.SendMessage("PlayStatusChanged");
NetworkManager.Default.SendAsync("DISASTER_EDITOR_RIGHT_SYNC", new EditorRightStruct { controlRight= isOn , disasterID= DisasterManager.disaster.Id });//单机版注释
GetComponent<DISASTER_EDITOR_RIGHT_SYNC>().SetInteractable(isOn);
}
// Update is called once per frame
void Update () {
}
}
public struct EditorRightStruct
{
public bool controlRight;
public int disasterID;
}