using AX.MessageSystem; using System; using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.EventSystems; public class WaterCurtainAttribute : ToolAttribute { private CurtainData data = new CurtainData(); private long gameObjID; protected override void Awake() { gameObjID = GetComponent().gameObjID; data.id = gameObjID; gameObjType = CloneObjType.CurtainLine; Tasklist = new string[2]; Tasklist[0] = "待命"; Tasklist[1] = "出水"; typeName = "水幕水带"; base.Awake(); } protected override void Execute(string TaskName) { task = TaskName; if (TaskName.Contains("出水")) { data.on = true; MessageDispatcher.SendMessage("ControlWaterCurtain", data); } else { data.on = false; MessageDispatcher.SendMessage("ControlWaterCurtain", data); } } protected override void OnMouseDown() { } public void OpenAttributePanel() { ToolAttributePanel.Instance.SetAttribute(this.gameObject, typeName); } }