Пример #1
0
 public void remove(string key)
 {
     LoadUtil.show(false);
     isReceiveMsg = false;
     receives.Remove(key);
     currentKey = null;
 }
Пример #2
0
 public static void XoaNhanVien(TextBox ma, TextBox ten, TextBox diaChi,
                                TextBox sdt, ComboBox chucVu, DateTimePicker ngaySinh, ComboBox gt, TextBox tk, TextBox mk)
 {
     if (ma.Text.Trim().Equals(""))
     {
         MessageBox.Show("Bạn chưa nhập mã nhân viên cần xóa!", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
     else
     {
         String query = "Select manv from NhanVien";
         if (!KiemTra.kiemTraTonTai(query, ma.Text.Trim()))
         {
             MessageBox.Show("Mã nhân viên không tồn tại!", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
         else
         {
             DialogResult result = MessageBox.Show("Bạn có chắc xóa nhân viên này!", "Thông báo", MessageBoxButtons.YesNo, MessageBoxIcon.Information);
             if (result == DialogResult.Yes)
             {
                 String deleteQuery = "delete NhanVien where manv = '" + ma.Text.Trim() + "'";
                 if (DBConnection.ExcuteQuery(deleteQuery))
                 {
                     LoadUtil.cleanQuanLyNhanVienScreen(ma, ten, sdt, diaChi, tk, mk);
                 }
             }
         }
     }
 }
Пример #3
0
 public static void ThemNhanVien(TextBox ma, TextBox ten, TextBox diaChi,
                                 TextBox sdt, ComboBox chucVu, DateTimePicker ngaySinh, ComboBox gt, TextBox tk, TextBox mk)
 {
     if (ma.Text.Trim().Equals(""))
     {
         MessageBox.Show("Chưa nhập mã nhân viên!", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
     else if (ten.Text.Trim().Equals(""))
     {
         MessageBox.Show("Chưa nhập tên nhân viên!", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
     else if (diaChi.Text.Trim().Equals(""))
     {
         MessageBox.Show("Chưa nhập địa chỉ nhân viên!", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
     else if (sdt.Text.Trim().Equals(""))
     {
         MessageBox.Show("Chưa nhập số điện thoại của nhân viên!", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
     else if (tk.Text.Trim().Equals(""))
     {
         MessageBox.Show("Chưa nhập tài khoản đăng nhập của nhân viên!", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
     else if (mk.Text.Trim().Equals(""))
     {
         MessageBox.Show("Chưa nhập mật khẩu đăng nhập nhân viên!", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
     else
     {
         String query = "Select manv from NhanVien";
         if (KiemTra.kiemTraTonTai(query, ma.Text.Trim()))
         {
             MessageBox.Show("Mã nhân viên đã tồn tại!", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
         else
         {
             if (KiemTra.kiemTraTonTai("select taikhoan from NhanVien", tk.Text.Trim()))
             {
                 MessageBox.Show("Tài khoản nhân viên đã tồn tại!", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error);
             }
             else
             {
                 Boolean gioiTinh;
                 if (gt.Text == "Nam")
                 {
                     gioiTinh = true;
                 }
                 else
                 {
                     gioiTinh = false;
                 }
                 string queryAdd = "insert into NhanVien values ('" + ma.Text.Trim() + "',N'" + ten.Text.Trim() + "',N'" + diaChi.Text.Trim() + "','" + sdt.Text.Trim() + "',N'" + chucVu.Text.Trim() + "','" + ngaySinh.Value.ToString() + "', '" + gioiTinh + "','" + tk.Text.Trim() + "','" + mk.Text.Trim() + "')";
                 if (DBConnection.ExcuteQuery(queryAdd))
                 {
                     LoadUtil.cleanQuanLyNhanVienScreen(ma, ten, sdt, diaChi, tk, mk);
                 }
             }
         }
     }
 }
Пример #4
0
    // Update is called once per frame
    void Update()
    {
        if (pushs.Count == 0)
        {
            return;
        }
        if (!ConfirmUtil.isConfirmShow() && !LoadUtil.isActivity() && !DialogUtil.isPopTips())
        {
            if (!isOpen)
            {
                tryToOpenPush();
            }
        }
        ByteBuffer buffer = MyUtilTools.tryToLogic("DealGrab");

        if (buffer != null)
        {
            DialogUtil.tip("抢单成功", true);
        }
        buffer = MyUtilTools.tryToLogic("DealFavorite");
        if (buffer != null)
        {
            int type = buffer.ReadInt();
            int len  = buffer.ReadInt();
            MainData.instance.user.favorites.Clear();
            for (int i = 0; i < len; i++)
            {
                long value = buffer.ReadLong();
                MainData.instance.user.favorites.Add(value);
            }
            DialogUtil.tip(type == 0 ? "收藏成功" : "取消收藏成功", true);
        }
    }
Пример #5
0
 void uploadPicOk(SendMessageEntity entity, UITexture texture1, UITexture texture2)
 {
     if (texture1 != null && texture2 != null)
     {
         EventDelegate ok = new EventDelegate(this, "uploadPicOk");
         ok.parameters[0]     = new EventDelegate.Parameter();
         ok.parameters[0].obj = entity;
         ok.parameters[1]     = new EventDelegate.Parameter();
         ok.parameters[1].obj = texture2;
         ok.parameters[2]     = new EventDelegate.Parameter();
         ok.parameters[2].obj = null;
         JustRun.Instance.upLoadPic(entity.names[1], ((Texture2D)texture1.mainTexture).EncodeToJPG(), ok, new EventDelegate(uploadPicFail));
     }
     else if (texture1 != null && texture2 == null)
     {
         EventDelegate ok = new EventDelegate(this, "uploadPicOk");
         ok.parameters[0]     = new EventDelegate.Parameter();
         ok.parameters[0].obj = entity;
         ok.parameters[1]     = new EventDelegate.Parameter();
         ok.parameters[1].obj = null;
         ok.parameters[2]     = new EventDelegate.Parameter();
         ok.parameters[2].obj = null;
         JustRun.Instance.upLoadPic(entity.names[2], ((Texture2D)texture1.mainTexture).EncodeToJPG(), ok, new EventDelegate(uploadPicFail));
     }
     else
     {
         isUploaded = true;
         LoadUtil.show(false);
         EventDelegate next = new EventDelegate(this, "sendMessage");
         next.parameters[0]     = new EventDelegate.Parameter();
         next.parameters[0].obj = entity;
         DialogUtil.tip("图片上传成功点击确定继续", true, next);
     }
 }
Пример #6
0
    public void OnSpawned(Color _color)
    {
        if (!this.gameObject.activeSelf)
        {
            LoadUtil.SetActive(this.gameObject, true);
        }
        MeshRenderer rd = GetComponentInChildren <MeshRenderer>();

        if (rd != null)
        {
            Material[] mat = rd.materials;
            foreach (Material item in mat)
            {
                if (item.HasProperty("_TintColor"))
                {
                    item.SetColor("_TintColor", _color);
                }
                else
                {
                    item.color = _color;
                }
            }
        }
        FXCtrl.RePlay(this.gameObject);
        base.OnSpawned();
        if (!GameHelper.haveDontDestroyRingEffect)
        {
            //Debug.Log("GameHelper.haveDontDestroyRingEffect = :"+ GameHelper.haveDontDestroyRingEffect);
            DontDestroyOnLoad(this);
            GameHelper.haveDontDestroyRingEffect = true;            //只需要执行一次就可以了
        }
    }
Пример #7
0
 public static bool isActivity()
 {
     if (currentLoad != null)
     {
         LoadUtil util = currentLoad.GetComponent <LoadUtil>();
         return(util.count > 0);
     }
     return(false);
 }
Пример #8
0
    void uploadPicOk(SendMessageEntity entity)
    {
        LoadUtil.show(false);
        EventDelegate next = new EventDelegate(this, "sendRZ");

        next.parameters[0]     = new EventDelegate.Parameter();
        next.parameters[0].obj = entity;
        DialogUtil.tip("图片上传成功点击确定继续认证", true, next);
    }
Пример #9
0
    public override void OnSpawned()
    {
        if (!this.gameObject.activeSelf)
        {
            LoadUtil.SetActive(this.gameObject, true);
        }
        FXCtrl.RePlay(this.gameObject);
        base.OnSpawned();
        DontDestroyOnLoad(this);

        Invoke("ReturnBySelf", duration);
    }
Пример #10
0
 public void SendMessage(byte[] datas, bool needShowLoading)
 {
     if (!socket.Connected)
     {
         ConfirmUtil.confirm("未连接服务器,连接?", tryToReconnect);
         return;
     }
     try  {
         LoadUtil.show(needShowLoading);
         socket.BeginSend(datas, 0, datas.Length, SocketFlags.None, null, socket);
     }  catch  {
         Debug.Log("send message error");
     }
 }
Пример #11
0
 public static void show(bool flag, string showStr = "通讯中,请稍候")
 {
     if (flag)
     {
         if (currentLoad == null)
         {
             currentLoad = GameObject.Find("pops").transform.FindChild("loading").gameObject;
         }
         LoadUtil util = currentLoad.GetComponent <LoadUtil>();
         util.appear(showStr);
     }
     else if (currentLoad != null)
     {
         LoadUtil util = currentLoad.GetComponent <LoadUtil>();
         util.dispear();
     }
 }
Пример #12
0
    void sendPicture(Texture2D texture, MainData.FriendBody friend)
    {
        LoadUtil.show(true, "图片发送中请稍后");
        System.DateTime   now     = System.DateTime.Now;
        string            dateStr = now.Year + "-" + now.Month + "-" + now.Day + " " + now.Hour + "-" + now.Minute + "-" + now.Second;
        string            picName = "[" + MainData.instance.user.id + "," + friend.fid + "] " + dateStr + ".jpg";
        SendMessageEntity entity  = new SendMessageEntity();

        entity.buffer.skip(4);
        entity.buffer.WriteString("FriendMessage");
        entity.buffer.WriteLong(MainData.instance.user.id); //自己编号
        entity.buffer.WriteLong(friend.fid);                //好友编号
        entity.buffer.WriteByte(1);                         //0 文字内容,1图片
        entity.buffer.WriteString(picName);                 //上传的文件名字
        EventDelegate ok_event = new EventDelegate(this, "sendPictureOk");

        ok_event.parameters[0]     = new EventDelegate.Parameter();
        ok_event.parameters[0].obj = entity;
        JustRun.Instance.upLoadPic(picName, texture.EncodeToJPG(), ok_event, new EventDelegate(sendPictureFail));
    }
Пример #13
0
 public void OnSpawned(float _duration, bool _matchingSpeed)
 {
     if (!this.gameObject.activeSelf)
     {
         LoadUtil.SetActive(this.gameObject, true);
     }
     if (_matchingSpeed)
     {
         FXCtrl.RePlayMatchingSpeed(this.gameObject, _duration);
     }
     else
     {
         FXCtrl.RePlay(this.gameObject);
     }
     base.OnSpawned();
     if (_duration > 0)
     {
         Invoke("ReturnBySelf", _duration);
     }
 }
Пример #14
0
        private void openToolStripMenuItem_Click(object sender, EventArgs e)
        {
            OpenFileDialog openFileDialog = new OpenFileDialog();

            openFileDialog.Filter           = "World files (*." + WORLD_EXTENSION + ")|*." + WORLD_EXTENSION + "|All files (*.*)|*.*";
            openFileDialog.RestoreDirectory = true;

            if (openFileDialog.ShowDialog() == DialogResult.OK)
            {
                try
                {
                    FileInfo file = new FileInfo(openFileDialog.FileName);
                    worldView.World = LoadUtil.Load(file);
                    currentFile     = file;
                    Text            = file.Name;
                    worldView.Invalidate();
                }
                catch (Exception ex)
                {
                    MessageBox.Show("Error during load", ex.Message, MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
        }
Пример #15
0
    public void doRZ(GameObject container)
    {
        UIPopupList type_list = container.transform.FindChild("type").GetComponent <UIPopupList>();
        UIInput     key_input = container.transform.FindChild("key").GetComponent <UIInput>();

        if (MyUtilTools.stringIsNull(key_input.value))
        {
            UILabel label = key_input.transform.FindChild("tips").GetComponent <UILabel>();
            DialogUtil.tip(label.text);
            return;
        }
        UITexture texture = container.transform.FindChild("front").FindChild("context").GetComponent <UITexture>();

        if (texture.mainTexture == null)
        {
            DialogUtil.tip("请拍摄证件正面");
            return;
        }
        SendMessageEntity entity = new SendMessageEntity();
        Texture2D         t2d    = (Texture2D)texture.mainTexture;
        EventDelegate     ok     = new EventDelegate(this, "uploadPicOk");

        ok.parameters[0]     = new EventDelegate.Parameter();
        ok.parameters[0].obj = entity;
        System.DateTime tody    = System.DateTime.Now;
        string          dateStr = tody.Year + "-" + tody.Month + "-" + tody.Day + "-" + tody.Hour + "-" + tody.Minute + "-" + tody.Second + ".jpg";
        string          picName = MainData.instance.user.account + "-sellercommit-" + dateStr;

        entity.buffer.skip(4);
        entity.buffer.WriteString("SellerCommit");
        entity.buffer.WriteLong(MainData.instance.user.id);
        entity.buffer.WriteByte((byte)(type_list.value.Equals("个人") ? 0 : 1));
        entity.buffer.WriteString(key_input.value);
        entity.buffer.WriteString(picName);
        LoadUtil.show(true, "上传图片中请稍后");
        JustRun.Instance.upLoadPic(picName, t2d.EncodeToJPG(), ok, new EventDelegate(uploadPicFail));
    }
Пример #16
0
 void uploadPicFail()
 {
     LoadUtil.show(false);
     DialogUtil.tip("图片上传失败");
 }
Пример #17
0
 void sendPictureOk(SendMessageEntity entity)
 {
     LoadUtil.show(false);
     NetUtil.getInstance.SendMessage(entity.buffer);
 }
Пример #18
0
        public static void CapNhatNhanVien(TextBox ma, TextBox ten, TextBox diaChi,
                                           TextBox sdt, ComboBox chucVu, DateTimePicker ngaySinh, ComboBox gt,
                                           TextBox tk, TextBox mk, NhanVien nv)
        {
            if (ma.Text.Trim().Equals(""))
            {
                MessageBox.Show("Chưa nhập mã nhân viên!", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            else if (ten.Text.Trim().Equals(""))
            {
                MessageBox.Show("Chưa nhập tên nhân viên!", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            else if (diaChi.Text.Trim().Equals(""))
            {
                MessageBox.Show("Chưa nhập địa chỉ nhân viên!", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            else if (sdt.Text.Trim().Equals(""))
            {
                MessageBox.Show("Chưa nhập số điện thoại của nhân viên!", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            else if (tk.Text.Trim().Equals(""))
            {
                MessageBox.Show("Chưa nhập tài khoản đăng nhập của nhân viên!", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            else if (mk.Text.Trim().Equals(""))
            {
                MessageBox.Show("Chưa nhập mật khẩu đăng nhập nhân viên!", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            else
            {
                if (!KiemTra.kiemTraTonTai("select manv from NhanVien", ma.Text.Trim()))
                {
                    MessageBox.Show("Mã nhân viên không tồn tại!", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
                else
                {
                    Boolean gioiTinh;
                    if (gt.Text.Equals("Nam"))
                    {
                        gioiTinh = true;
                    }
                    else
                    {
                        gioiTinh = false;
                    }
                    String query = "update NhanVien set tennv = N'" + ten.Text.Trim() + "'" +
                                   ", diachi = N'" + diaChi.Text.Trim() + "'" +
                                   ", sdt = '" + sdt.Text.Trim() + "'" +
                                   ", chucvu = N'" + chucVu.Text.Trim() + "'" +
                                   ", ngaysinh = '" + ngaySinh.Value.ToString() + "'" +
                                   ", gioitinh = '" + gioiTinh + "'" +
                                   ", taikhoan = '" + tk.Text.Trim() + "'" +
                                   ", matkhau = '" + mk.Text.Trim() + "'" +
                                   " where manv = '" + ma.Text.Trim() + "'";

                    if (nv.TaiKhoan.Trim().Equals(tk.Text.Trim()))
                    {
                        DBConnection.ExcuteQuery(query);
                        LoadUtil.cleanQuanLyNhanVienScreen(ma, ten, sdt, diaChi, tk, mk);
                    }
                    else
                    {
                        if (!KiemTra.kiemTraTonTai("select taikhoan from NhanVien", tk.Text.Trim()))
                        {
                            DBConnection.ExcuteQuery(query);
                            LoadUtil.cleanQuanLyNhanVienScreen(ma, ten, sdt, diaChi, tk, mk);
                        }
                        else
                        {
                            MessageBox.Show("Tài khoản đã tồn tại!", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error);
                        }
                    }
                }
            }
        }
Пример #19
0
    // Update is called once per frame
    void Update()
    {
        if (NetUtil.getInstance.mustLogin && !ConfirmUtil.isConfirmShow() && !LoadUtil.isActivity() && !DialogUtil.isPopTips())
        {
            if (pushEvent != null)
            {
                pushEvent.ignoreAll();
            }
            NetUtil.getInstance.mustLogin = false;
            ConfirmUtil.confirm("你的账号在别处登录了", goToLogin, exit);
            return;
        }
        List <ByteBuffer> modules = NetUtil.getInstance.Module;

        if (modules.Count > 0)
        {
            foreach (ByteBuffer buffer in modules)
            {
                buffer.ReadInt();//成功
                int size = buffer.ReadInt();
                for (int i = 0; i < size; i++)
                {
                    byte code = buffer.ReadByte();
                    if (moduleCalls.ContainsKey(code))
                    {
                        ModuleCallBack call = moduleCalls[code];
                        call(buffer);
                    }
                }
            }
            modules.Clear();
        }
        modules = NetUtil.getInstance.Cachs;
        if (modules.Count > 0)
        {
            modules.Clear();
        }
        if (Input.GetKeyDown(KeyCode.Escape))
        {
            if (LoadUtil.isActivity())
            {
                return;
            }
            if (ConfirmUtil.isConfirmShow())
            {
                ConfirmUtil.TryToDispear();
                return;
            }
            GameObject photographer = GameObject.Find("photographer");
            if (photographer != null && photographer.activeSelf)
            {
                photographer.GetComponent <PhotographEvent>().over();
                return;
            }
            GameObject popup_select = GameObject.Find("popup-select");
            if (popup_select != null && popup_select.activeSelf)
            {
                popup_select.GetComponent <PopupListEvent>().close();
                return;
            }
            if (DialogUtil.isPopTips())
            {
                DialogUtil.dispear();
                return;
            }
            ConfirmUtil.confirm("是否退出?", exit);
        }
    }
Пример #20
0
 private void cmbLoaiPhong_SelectionChangeCommitted(object sender, EventArgs e)
 {
     LoadUtil.timKiemDuLieuPhong(dtgThongTinPhong, "Phong", cmbLoaiPhong.Text);
 }
Пример #21
0
    public void upload(GameObject container)
    {
        UIPopupList wjs_list    = container.transform.FindChild("wjs").GetComponent <UIPopupList>();
        UIPopupList yhk_list    = container.transform.FindChild("yhk").GetComponent <UIPopupList>();
        UIInput     tel_input   = container.transform.FindChild("tel").GetComponent <UIInput>();
        UIInput     email_input = container.transform.FindChild("email").GetComponent <UIInput>();

        //UIInput token_input = container.transform.FindChild("token").GetComponent<UIInput>();
        if (MyUtilTools.stringIsNull(tel_input.value))
        {
            DialogUtil.tip("请输入开户手机号码");
            return;
        }
        if (tel_input.value.Length != 11)
        {
            DialogUtil.tip("手机号码尾数不对");
            return;
        }
        if (!MyUtilTools.checkEmail(email_input.value))
        {
            DialogUtil.tip("请输入合法的email");
            return;
        }

        /*
         * if (MyUtilTools.checkEmail(token_input.value))
         * {
         *  DialogUtil.tip("请输入验证码");
         *  return;
         * }*/
        Transform indent_trans         = container.transform.FindChild("indents");
        UITexture indent_front_texture = indent_trans.FindChild("front").FindChild("context").GetComponent <UITexture>();

        if (indent_front_texture.mainTexture == null)
        {
            DialogUtil.tip("请上传身份证正面");
            return;
        }
        UITexture indent_back_texture = indent_trans.FindChild("back").FindChild("context").GetComponent <UITexture>();

        if (indent_back_texture.mainTexture == null)
        {
            DialogUtil.tip("请上传身份证反面");
            return;
        }
        UITexture bank_texture = container.transform.FindChild("bank").FindChild("front").FindChild("context").GetComponent <UITexture>();

        if (bank_texture.mainTexture == null)
        {
            DialogUtil.tip("请上传银行卡正面");
            return;
        }
        SendMessageEntity entity = new SendMessageEntity();

        System.DateTime tody    = System.DateTime.Now;
        string          dateStr = tody.Year + "-" + tody.Month + "-" + tody.Day + "-" + tody.Hour + "-" + tody.Minute + "-" + tody.Second + ".jpg";

        entity.names.Add(tel_input.value + "-indent-front-" + dateStr);
        entity.names.Add(tel_input.value + "-indent-back-" + dateStr);
        entity.names.Add(tel_input.value + "-bank-front-" + dateStr);
        entity.buffer.skip(4);
        entity.buffer.WriteString("OpenAccountApply");
        entity.buffer.WriteString(wjs_list.value);
        entity.buffer.WriteString(yhk_list.value);
        entity.buffer.WriteString(tel_input.value);
        entity.buffer.WriteString(email_input.value);
        //entity.buffer.WriteString(token_input.value);
        entity.buffer.WriteString(entity.names[0]);
        entity.buffer.WriteString(entity.names[1]);
        entity.buffer.WriteString(entity.names[2]);
        if (!isUploaded)
        {
            EventDelegate ok = new EventDelegate(this, "uploadPicOk");
            ok.parameters[0]     = new EventDelegate.Parameter();
            ok.parameters[0].obj = entity;
            ok.parameters[1]     = new EventDelegate.Parameter();
            ok.parameters[1].obj = indent_back_texture;
            ok.parameters[2]     = new EventDelegate.Parameter();
            ok.parameters[2].obj = bank_texture;
            LoadUtil.show(true, "上传图片中请稍后");
            JustRun.Instance.upLoadPic(entity.names[0], ((Texture2D)indent_front_texture.mainTexture).EncodeToJPG(), ok, new EventDelegate(uploadPicFail));
        }
        else
        {
            sendMessage(entity);
        }
    }
Пример #22
0
 void sendPictureFail()
 {
     LoadUtil.show(false);
     DialogUtil.tip("图片发送失败");
 }
Пример #23
0
 private void btnTimKiem_Click(object sender, EventArgs e)
 {
     LoadUtil.timKiemNhanVien(txtTKTenNV.Text, dtgDanhSachNhanVien);
 }
Пример #24
0
    public void OnSpawned(AbilityBallisticCurveInfo _info)
    {
        info         = _info;
        needDespawed = false;
        starttime    = 0;
        if (info == null)
        {
            OnDespawned();
            return;
        }
        curStartPos = info.StartPos;
        speed       = info.Speed;
        addSpeed    = info.AddSpeed;
        lockLastDis = 0;
        if (info.IsLock && info.Target != null)
        {
            targetTransform = info.Target.HitPoint;
        }
        if (effect != null)
        {
            GameCenter.spawner.DespawnEffecter(effect);
        }
        GameCenter.spawner.SpawnEffecter(info.EffectName, -1, (x) =>
        {
            //清理原特效,主要因为两次异步可能导致多个特效加载很慢的特效同时存在 by吴江
            if (effect != null)
            {
                GameCenter.spawner.DespawnEffecter(effect);
            }
            int count = this.transform.childCount;
            if (count > 0)
            {
                PoolEffecter[] p = new PoolEffecter[count];
                for (int i = 0; i < count; i++)
                {
                    effect = this.transform.GetChild(i).gameObject.GetComponent <PoolEffecter>();
                    p[i]   = effect;
                }
                foreach (var item in p)
                {
                    GameCenter.spawner.DespawnEffecter(item);
                }
            }
            count = this.transform.childCount;
            if (count > 0)
            {
                for (int i = 0; i < count; i++)
                {
                    Destroy(this.transform.GetChild(i).gameObject);
                }
            }
            effect = x;
            effect.transform.parent           = this.transform;
            effect.transform.localPosition    = Vector3.zero;
            effect.transform.localEulerAngles = Vector3.zero;
            this.transform.localEulerAngles   = info.Direction;

            Vector3 now      = info.StartPos + info.Direction * 10;
            Vector3 velocity = now - transform.position;
            curStartPos      = info.StartPos;
            if (velocity != Vector3.zero)
            {
                transform.forward = velocity;
            }
            starttime = Time.time;
            if (!this.gameObject.activeSelf)
            {
                LoadUtil.SetActive(this.gameObject, true);
            }
        }, false);
        base.OnSpawned();
        transform.position = _info.StartPos;
        GameCenter.soundMng.PlaySound(info.PlaySound, SoundMng.GetSceneSoundValue(transform, GameCenter.curMainPlayer.transform), false, true);
    }