示例#1
0
 private void Update()
 {
     if (mType != FireworkController.LaunchType.None)
     {
         FireworkController.Launch(mType);
         mType = FireworkController.LaunchType.None;
     }
 }
示例#2
0
            private void Listen()
            {
                while (Thread.CurrentThread.IsAlive)
                {
                    try {
                        if (mClient != null && mEndPoint != null)
                        {
                            byte[] data = mClient.Receive(ref mEndPoint);
                            string text = Encoding.ASCII.GetString(data);

                            int t = 0;
                            if (int.TryParse(text, out t))
                            {
                                mType = (FireworkController.LaunchType)t;
                            }
                        }
                    } catch (Exception e) {
                        Debug.Log(e.ToString());
                    }
                }
            }