public void StartTransform(GameObject jituiObj, BufferKind kind) { if (GlobalData.GetInstance().gameMode == GameMode.OnlineMode) { //ScreenLog.Log("delete daoJu -> name " + jituiObj.name); // DaoJuNetCtrl DaoJuNetCtrlScript = jitui.GetComponent<DaoJuNetCtrl>(); // if(DaoJuNetCtrlScript != null) // { // ScreenLog.Log("**********delete daoJu -> name " + jitui.name); // DaoJuNetCtrlScript.closeDaoJuServer(); // } // else // { // ScreenLog.LogWarning("DaoJuNetCtrlScript is null, daoJu -> name " + jitui.name); // } GameObject newDaoJu = null; switch (kind) { case BufferKind.Dianchi: newDaoJu = (GameObject)Instantiate(DianChiPrefab); break; case BufferKind.Shoubiao: newDaoJu = (GameObject)Instantiate(ShouBiaoPrefab); break; } if (newDaoJu != null) { newDaoJu.transform.parent = transform; newDaoJu.transform.localPosition = Vector3.zero; } isStart = false; return; } this.jitui = jituiObj; x = 0; y = 0; var s = from q in Targets where q.kind == kind select q; if (s.Count() > 0) { //ScreenLog.Log("*******************test kind " + kind.ToString()); NMB nmb = s.First(); moder = nmb.Moder; this.kind = kind; Vector3 v1 = UICam.camera.WorldToScreenPoint(nmb.Tareget.transform.position); Vector3 v2 = gameObject.camera.ScreenToWorldPoint(v1); Vector3 TargetLoaclPosition = gameObject.transform.InverseTransformPoint(v2); Hspeed = (TargetLoaclPosition.x - jitui.transform.localPosition.x) / nmb.time; Vspeed = (TargetLoaclPosition.y - jitui.transform.localPosition.y) / nmb.time; MaxX = TargetLoaclPosition.x; if (nmb.Moder == Tmoder.Parabola) { a = (TargetLoaclPosition.y - jitui.transform.localPosition.y) * 2 * Time.fixedDeltaTime * Time.fixedDeltaTime / (nmb.time * nmb.time); } } isStart = true; }
public bool IsCanUpload(string businessDate, string uploadFileName, out NMB.Model.FileInfo fileInfo) { try { fileInfo = new NMB.Model.FileInfo(); DataTable dt = SelectAll("Proc_FileInfo_Get"); int indexId = dt.Columns.IndexOf("Id"); int indexTitle = dt.Columns.IndexOf("Title"); int indexFileName = dt.Columns.IndexOf("FileName"); int indexType = dt.Columns.IndexOf("Type"); foreach (DataRow row in dt.Rows) { string dbFielName = Tools.DateReplace(row[indexFileName].ToString(), businessDate); if (string.Compare(uploadFileName.ToLower().Replace("xlsx", "xls").Replace(".txt",""), dbFielName, true) == 0) { fileInfo.Id = row[indexId].ToString(); byte type = Convert.ToByte(row[indexType]); fileInfo.Type = (FileInfoType)type; return true; } } } catch (Exception ex) { Tools.LogWrite(ex.ToString()); throw; } return false; }
// convert nmb to a virtual battle attender public static Player Lumberjack(NMB nmb, ushort orgCode, int team) { return Player.Warriors(nmb.Name, orgCode + 1000, team, nmb.STR, nmb.AGL); }