public RedpointSystem() { s_instance = this; _redpointTreeDict = new Dictionary <RedpointType, string[]>(); _rootNodeDic = new Dictionary <RedpointType, RedpointNode>(); CreateTreeList(); }
// Start is called before the first frame update void Start() { system = new RedpointSystem(); system.InitRedpointTreeNode(); RedpointSystem.AddListener(RedpointType.Chat, RedPointConst.s_chatNodeWorldSub, OnCallbackWorldCub); RedpointSystem.AddListener(RedpointType.Chat, RedPointConst.s_chatNodeWorld, OnCallbackWorld); RedpointSystem.AddListener(RedpointType.Chat, RedPointConst.s_chatNode, OnCallbackChat); }
private void Update() { if (Input.GetKeyDown(KeyCode.K)) { RedpointSystem.SetRpNum(RedpointType.Chat, RedPointConst.s_chatNodeWorldSub, 2); RedpointSystem.SetRpNum(RedpointType.Chat, RedPointConst.s_chatNodeSingle, 2); } else if (Input.GetKeyDown(KeyCode.J)) { RedpointSystem.RemoveLisnener(RedpointType.Chat, RedPointConst.s_chatNode); RedpointSystem.SetRpNum(RedpointType.Chat, RedPointConst.s_chatNodeWorldSub, 10); } }