void RecoverCallBack(object obj) { int currentMoney = PlayerManager.Instance.FindHeroDataModel().PlayerValues.PLAYER_FIELD_BINDPAY; if (currentMoney > RecoverTeamateMoney) { int myActorID = PlayerManager.Instance.FindHeroDataModel().ActorID; int TargetActor = (int)this.sMsgTeamPropMember_SC.TeamMemberContext.dwActorID; NetServiceManager.Instance.EntityService.SendActionRelivePlayer(myActorID, TargetActor, (byte)EctypeRevive.ER_PREFECT); TraceUtil.Log("发送复活队员请求,m_UID:" + myActorID + ",TargetUID:" + TargetActor); } else { //recoverTemmateBtnScripts.GrayButton(LanguageTextManager.GetString("IDS_H2_44"));//元宝不足 MessageBox.Instance.ShowTips(3, LanguageTextManager.GetString("IDS_H2_44"), 1); } //if(currentMoney>) }
void PlayCollectParcticeAnimation(int value) { //获取修为动画 int roomAwardDisplay = CommonDefineManager.Instance.CommonDefine.RoomAwardDisplay; int num = Mathf.CeilToInt((value * 1f / roomAwardDisplay)); int lastCollectValue = value % roomAwardDisplay; TraceUtil.Log("[lastCollectValue]" + lastCollectValue); for (int i = 0; i < num; i++) { if (i == num - 1) { roomAwardDisplay = lastCollectValue; } CollectPracticeAnimation collectPracticeAnimation = CreatObjectToNGUI.InstantiateObj(CollectPracticeAnimation.gameObject, transform).GetComponent <CollectPracticeAnimation>(); collectPracticeAnimation.Show(Vector3.zero, roomAwardDisplay, Button_Get.transform.localPosition); } }
/// <summary> /// 登录完成处理 /// </summary> /// <param name="flag"></param> private void LoginPlatformHandler(bool flag) { if (flag) { hasLogin = true; #if (UNITY_ANDROID && !UNITY_EDITOR) #if ANDROID_TENCENT MessageBox.Instance.CloseMsgBox(); #endif #endif JHPlatformConnManager.Instance.GetUserInfo(GetUserInfoHandler); } else { TraceUtil.Log("LoginPlatformFailed"); MessageBox.Instance.Show(1, "", LanguageTextManager.GetString("IDS_I32_1"), LanguageTextManager.GetString("IDS_I32_2"), SureCallBack); } }
void Awake() { if (UI.MainUI.MainUIController.Instance != null && UI.MainUI.MainUIController.Instance.IsShowCommonTool) { CreatObjectToNGUI.InstantiateObj(CommonToolPrefab, transform); } this.RegisterEventHandler(); if (FriendListPanel == null) { TraceUtil.Log(SystemModel.Common, TraceLevel.Error, "好友列表Prefab未指定!"); } this.NearlyPlayerListPanel.Init(this); this.FriendListPanel.Init(this); UIEventManager.Instance.RegisterUIEvent(UIEventType.EctypeLevelError, ShowFriendEctypeLockMsg); }
IEnumerator PlayerEquipAnimation(string[] AnimationName, int Step) { string[] anim = AnimationName[Step].Split('+'); TraceUtil.Log("Player default anim at ContainerHeroView PlayerEquipAnimation"); this.m_hero.animation.CrossFade(anim[0]); this.m_hero.animation.wrapMode = WrapMode.Once; yield return(new WaitForSeconds(float.Parse(anim[1]) / 1000)); Step++; if (Step < AnimationName.Length) { StartCoroutine(PlayerEquipAnimation(AnimationName, Step)); } else { PlayerIdleAnim(); } }
/// <summary> /// Performs the update. /// </summary> /// <returns><c>true</c> if the update completed successfully; /// <c>false</c> otherwise.</returns> public override bool Update() { try { SetMessage(String.Format("Checking for new {0} version...", "masterlist.yaml")); PluginSorter.UpdateMasterlist(); } catch (Exception e) { Trace.TraceError("Unable to update masterlist.yaml file."); TraceUtil.TraceException(e); return(false); } SetProgress(2); Trace.Unindent(); return(true); }
/// <summary> /// Adds a new message with <paramref name="messageContent"/> to a <paramref name="queueName"/>. /// </summary> /// <param name="queueName">The name of the queue.</param> /// <param name="messageContent">The content to pass to the queue.</param> /// <param name="accountConnectionString"> /// The connection string to connect to Azure or <c>null</c> if logic should search in configuration for /// an app-setting defined in <see cref="StorageConnectionStringKey"/>. /// </param> /// <returns><c>true</c> if the message was added otherwise <c>false</c>.</returns> public static async Task <bool> AddQueueMessageAsync(string queueName, string messageContent, string accountConnectionString = null) { var queue = await GetQueueAsync(queueName, accountConnectionString); var message = new CloudQueueMessage(messageContent); try { await queue.AddMessageAsync(message); return(true); } catch (Exception ex) { TraceUtil.WriteTraceError(ex.Message); } return(false); }
//Gets the bit map image private Bitmap GetBitmap(string bitmapName) { Bitmap bitmap = null; try { Assembly ass = typeof(Form1).Assembly; string name = ass.GetName().Name; Stream stream = ass.GetManifestResourceStream(name + ".Resources." + bitmapName); bitmap = new Bitmap(stream); } catch (Exception ex) { TraceUtil.TraceExceptionCatched(ex); } return(bitmap); }
// Allocates the correct type of node protected override BrowserTreeNode AllocateChildNode(Object obj) { if (_typeHandler != null && _typeHandler.Enabled) { return(_typeHandler.AllocateChildNode((ObjectInfo)obj)); } MemberInfo member = (MemberInfo)obj; ObjectInfo objInfo = ObjectInfoFactory.GetObjectInfo(_comNode, member, ObjType); if (TraceUtil.If(this, TraceLevel.Verbose)) { Trace.WriteLine("AllocateChild (member): " + member); } ObjectTypeTreeNode newNode = new ObjectTypeTreeNode(_comNode, objInfo, member, _useIntermediates); return(newNode); }
private Image GetImage(string bitmapName) { Image bitmap = null; try { Assembly ass = typeof(Form1).Assembly; string name = ass.GetName().Name; Stream stream = ass.GetManifestResourceStream(name + "." + bitmapName); bitmap = Image.FromStream(stream); } catch (Exception ex) { TraceUtil.TraceExceptionCatched(ex); } return(bitmap); }
//void SetTimeMs(float value) //{ // PassLevelTimeLabel_Ms.SetText((int)value); //} void TweenShowPanel03Value04(object obj) { SoundManager.Instance.PlaySoundEffect("Sound_UIEff_AppraisalFields"); GradLabel.SetText(this.sMSGEctypeSettleAccounts.sGrade); float targetvalue = (float)this.sMSGEctypeSettleAccounts.dwGradeCount / 200; TweenFloat.Begin(TweenAnimTime, 0, targetvalue, SetGradBar, TweenShowGradStar); if (CheckIsUpgrade()) { ShowUpgradeLevelEffect(); TraceUtil.Log("ShowUpgradEffect"); } else { TraceUtil.Log("UnShowUpgradEffect"); DoForTime.DoFunForTime(2, TweenDisCardPanel, null); } }
protected void AssignType(Type newType) { if (TraceUtil.If(this, TraceLevel.Info)) { Trace.WriteLine("COM newType: " + newType); } // Only wrap objects that are not already wrapped if (Windows.COM_ROOT_TYPE.IsAssignableFrom(newType)) { Object wrapper = Marshal.CreateWrapperOfType(_obj, newType); if (TraceUtil.If(this, TraceLevel.Info)) { Trace.WriteLine("COM create wrapper: " + wrapper); } _obj = wrapper; } _objType = newType; }
void Init() { if (null == m_soundSfcDic) { m_soundSfcDic = new Dictionary <string, SoundClip>(); foreach (SoundClip clip in m_soundSfxList._soundList) { if (m_soundSfcDic.ContainsKey(clip._name)) { TraceUtil.Log(SystemModel.Common, TraceLevel.Error, "same key : " + clip._name); } else { m_soundSfcDic.Add(clip._name, clip); } } } }
internal void UpdateProgress(int increment) { _progress.Value += increment; TraceUtil.WriteLineVerbose(this, Thread.CurrentThread.Name + " Update progress: " + increment + " current: " + _progress.Value); if (_progress.Value >= _progress.Maximum && _final) { TraceUtil.WriteLineInfo(this, Thread.CurrentThread.Name + " Update progress done"); Finished(); } }
/// <summary> /// 阻挡生成/消失特效 /// </summary> /// <param name="areaId"></param> public void BlockAppear(SMsgEctypeUpDateBlock sMsgEctypeUpDateBlock) { var mapDynamicData = SceneDataManager.Instance.GetMapDynamicBlockData(sMsgEctypeUpDateBlock.dwareaId, sMsgEctypeUpDateBlock.dwblockGroupID); if (mapDynamicData != null) { var groupId = sMsgEctypeUpDateBlock.dwblockGroupID; if (m_blockStateEffct.ContainsKey(groupId)) { for (int i = 0; i < m_blockStateEffct[groupId].Length; i++) { GameObject.Destroy(m_blockStateEffct[groupId][i]); } m_blockStateEffct.Remove(groupId); } m_blockStateEffct.Add(groupId, new GameObject[mapDynamicData.EffectPos.Length]); if (sMsgEctypeUpDateBlock.byBlockState == 0) { StartCoroutine(SceneDataManager.Instance.ChangeDynamicBlockGroupState(groupId, true, mapDynamicData.FadeDelay)); for (int i = 0; i < mapDynamicData.EffectPos.Length; i++) { m_blockStateEffct[groupId][i] = Instantiate(mapDynamicData.BlockFadeEffect, mapDynamicData.EffectPos[i], Quaternion.Euler(0, mapDynamicData.EffectAngle[i], 0)) as GameObject; } //指引箭头 if (mapDynamicData.GuideArrow == 1) { ShowNextTriggerAreaGuideArrow(mapDynamicData.AreaID + 1); } } else { StartCoroutine(SceneDataManager.Instance.ChangeDynamicBlockGroupState(groupId, false, 0)); for (int i = 0; i < mapDynamicData.EffectPos.Length; i++) { m_blockStateEffct[groupId][i] = Instantiate(mapDynamicData.BlockEffect, mapDynamicData.EffectPos[i], Quaternion.Euler(0, mapDynamicData.EffectAngle[i], 0)) as GameObject; } } } else { TraceUtil.Log(SystemModel.Rocky, "找不到组的阻挡数据:" + sMsgEctypeUpDateBlock.dwblockGroupID); } }
public void Attack(SMsgBattleCommand smsgBattleCommand) { if (GameManager.Instance.CurrentGameMode == GameMode.SINGLE_PLAYER) { TraceUtil.Log(SystemModel.Common, TraceLevel.Error, "!!!!!!!!!!!!!Wrong Monster battle Command!"); } //TraceUtil.Log("==>攻击技能id = "+smsgBattleCommand.nFightCode); //var skillConfig = SkillDataManager.Instance.GetSkillConfigData(smsgBattleCommand.nFightCode); //获取技能配置信息 m_currentSkillID = smsgBattleCommand.nFightCode; m_FightTargetID = smsgBattleCommand.uidTarget; m_shouldPos = Vector3.zero.GetFromServer(smsgBattleCommand.xPlayer, smsgBattleCommand.yPlayer); m_shouldPos.y = 0; m_targetPos = Vector3.zero.GetFromServer(smsgBattleCommand.xMouse, smsgBattleCommand.yMouse); m_rangeTypePos = m_targetPos; float rad = Mathf.Atan2(-1 * smsgBattleCommand.yDirect, smsgBattleCommand.xDirect); m_currentAngle = 90 - (rad * Mathf.Rad2Deg); Vector3 diretPos = new Vector3(smsgBattleCommand.xDirect, m_high, -1 * smsgBattleCommand.yDirect); m_attackLookAtPos = m_shouldPos + diretPos; //m_diretPos.Normalize(); //TraceUtil.Log("monster pos = " + m_shouldPos + " targetPos = " + m_targetPos + " diretPos = " + m_diretPos); //rad = m_currentAngle * Mathf.Deg2Rad; //m_attackDirt = new Vector3(Mathf.Cos(rad), 0, Mathf.Sin(rad)); //m_attackDirt = new Vector3(smsgBattleCommand.xDirect, 0, -1 * smsgBattleCommand.yDirect); //m_attackDirt.Normalize(); #region 攻击 if (Log.IsPrint) { //Log.Instance.StartLog(); //Log.Instance.AddLog("99999", "解下发攻击包", smsgBattleCommand.xPlayer.ToString(), smsgBattleCommand.yPlayer.ToString(), smsgBattleCommand.xDirect.ToString(), smsgBattleCommand.yDirect.ToString()); //Log.Instance.AppendLine(); } #endregion }
/// <summary> /// Enables AI. /// </summary> protected void ApplyAI() { if (ConfirmAiReset()) { var pluginsPath = GameMode.PluginDirectory; try { foreach (var fi in new DirectoryInfo(pluginsPath).GetFiles("Skyrim - *.bsa")) { fi.LastWriteTime = new DateTime(2019, 2, 1); } foreach (var fi in new DirectoryInfo(pluginsPath).GetFiles("Update.bsa")) { fi.LastWriteTime = new DateTime(2019, 2, 2); } foreach (var fi in new DirectoryInfo(pluginsPath).GetFiles("E - *.bsa")) { fi.LastWriteTime = new DateTime(2019, 2, 3); } foreach (var fi in new DirectoryInfo(pluginsPath).GetFiles("L - *.bsa")) { fi.LastWriteTime = new DateTime(2019, 2, 4); } } catch (Exception ex) { Trace.TraceError("ApplyAI - Could not set LastWriteTime."); TraceUtil.TraceException(ex); MessageBox.Show( "Could not apply Archive Invalidation, at least one file could not be modified.\n" + "Please try again, or check trace log for more info.\n\n" + ex.Message, "Archive Invalidation failed", MessageBoxButtons.OK, MessageBoxIcon.Error); } } }
IUIPanel GetPanel(LoginUIType loginUIType) { GameObject CreatPanelPrefab = null; switch (loginUIType) { case LoginUIType.Login: CreatPanelPrefab = LoginUIPrefab; CheatManager.Instance.isIDKickedMark = false; CheatManager.Instance.isLogined = false; return(CreatObjectToNGUI.InstantiateObj(CreatPanelPrefab, transform).GetComponent <LoginUIPanel>() as IUIPanel); break; case LoginUIType.JoinGame: CreatPanelPrefab = JoinUIPrefab; break; case LoginUIType.ServerList: CreatPanelPrefab = ServerListUIPrefab; break; case LoginUIType.CreatRole: PlatformLoginBehaviour.message += " LoginUIManagerFor91 Handler CreateRole :"; CreatPanelPrefab = CreatRoleUIPreafab; CheatManager.Instance.isLogined = true; break; case LoginUIType.SelectRole: CreatPanelPrefab = RoleSelectUIPrefab; CheatManager.Instance.isLogined = true; break; case LoginUIType.Loaing: CreatPanelPrefab = LoadingSceneUIPreafab; break; default: TraceUtil.Log(SystemModel.Common, TraceLevel.Error, "SHowUI:" + loginUIType); break; } return(CreatObjectToNGUI.InstantiateObj(CreatPanelPrefab, transform).GetComponent <IUIPanel>()); }
public static String GetLastErrorText() { StringBuilder sb = new StringBuilder(2000); int error = GetLastError(); if (FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, 0, error, 0, sb, sb.Capacity, 0) != 0) { return("Error: " + error + " - " + sb.ToString()); } else { TraceUtil.WriteLineError(typeof(Win32.Windows), "Error getting message text: " + GetLastError()); return(null); } }
void UseMedicamentResult(object obj) { TraceUtil.Log("收到药品使用请求"); if (OnUseritemFilelInfo == null) { return; } var sMsgActionUseMedicamentResult_SC = (SMsgActionUseMedicamentResult_SC)obj; if (sMsgActionUseMedicamentResult_SC.byResult == 0) { return; } if (medicine != null) { medicine.SetMyButtonActive(false); } this.OnUseritemFilelInfo = null; }
/// <summary> /// Processes all types in search for the ones that implement ISurrogateRegistration /// </summary> /// <param name="typesToRegister"></param> internal static void RegisterSurrogates(IEnumerable <Type> typesToRegister) { foreach (var typeToRegister in typesToRegister) { if (!typeToRegister.IsAbstract && !typeToRegister.IsInterface && typeToRegister.IsClass && typeof(ISurrogateRegistration).IsAssignableFrom(typeToRegister)) { try { ISurrogateRegistration surrogatesRegistration = (ISurrogateRegistration)Activator.CreateInstance(typeToRegister); surrogatesRegistration.Register(); } catch (Exception e) { TraceUtil.TraceError("SurrogateManager::RegisterSurrogates Error registering surrogates " + typeToRegister.FullName + " message " + e.Message); } } } }
private void HideMedal(Int64 playerUID, bool active) { if (m_MedalDic.ContainsKey(playerUID)) { if (m_MedalDic[playerUID] != null) { //m_MedalDic[playerUID].gameObject.SetActive(active); m_MedalDic[playerUID].MedalEffectBehaviour.SetMedalActive(active); } else { TraceUtil.Log(SystemModel.Common, TraceLevel.Error, "m_MedalDic[playerUID] is null"); } } else { TraceUtil.Log(SystemModel.Common, TraceLevel.Error, "m_MedalDic[playerUID] is not found : " + playerUID); } }
public void DeleteState(StateID id) { if (id == StateID.NullStateID) { TraceUtil.Log(SystemModel.Common, TraceLevel.Error, "FSM ERROR: NullStateID is not allowed for a real state"); return; } foreach (FSMState state in m_states) { if (state.StateID == id) { m_states.Remove(state); return; } } TraceUtil.Log(SystemModel.Common, TraceLevel.Error, "FSM ERROR: Impossible to delete state " + id.ToString() + ". It was not on the list of states"); }
public IEnumerator WateringFruit() { TraceUtil.Log("WateringFruit"); SoundManager.Instance.PlaySoundEffect("Sound_UIEff_FruitWatering"); myParent.FruitLogMessageWindow.AddWateringFruitLogInfo(this); CreatLeftUpAnimPoint.ClearChild(); CreatFlashEffectPoint.ClearChild(); CreatObjectToNGUI.InstantiateObj(FlashEffectPrefab, CreatFlashEffectPoint); CreatObjectToNGUI.InstantiateObj(WateringFruitAnimPrefab, CreatLeftUpAnimPoint); yield return(new WaitForSeconds(1)); CreatLeftUpAnimPoint.ClearChild(); yield return(new WaitForSeconds(1.2f)); if ((FruitPrucStatusType)MyFruitData.byFruitStatus != FruitPrucStatusType.RIPEN_FRUIT_STATUS_TYPE) { CreatFlashEffectPoint.ClearChild(); } }
private void InitStroyLineConfig() { if (null == StroyLineConfigFile) { TraceUtil.Log(SystemModel.Common, TraceLevel.Error, "StroyLineConfigData没有指定剧情的配置文件!"); } else { foreach (StroyLineConfigData element in StroyLineConfigFile._dataTable) { m_stroyLineConfigList.Add(new StroyLineKey { VocationID = element._TriggerVocation, ConditionID = element._TriggerCondition, EctypeID = element._EctypeID }, element); m_stroyLineConfigListBak.Add(new StroyLineKey { VocationID = element._TriggerVocation, ConditionID = element._TriggerCondition, EctypeID = element._EctypeID }, element.Clone()); } } }
// Use this for initialization void Awake() { m_instance = this; //创建NPC闲话对应配置列表 if (null == NPCTalkConfigFile) { TraceUtil.Log(SystemModel.Common, TraceLevel.Error, "NPCTalkConfigData没有指定NPC对话的配置文件!"); } else { foreach (NPCTalkConfigData element in NPCTalkConfigFile._dataTable) { m_npcTalkConfigList.Add(element._SID, element); } } //创建NPC闲话对应配置列表 if (null == NPCConfigFile) { TraceUtil.Log(SystemModel.Common, TraceLevel.Error, "NPCConfigDataBase没有指定NPC的配置文件!"); } else { foreach (NPCConfigData element in NPCConfigFile._dataTable) { m_npcConfigList.Add(element._NPCID, element); } } //创建NPC特殊功能配置表 if (null == NPCSpecialConfigFile) { TraceUtil.Log(SystemModel.Common, TraceLevel.Error, "NPCSpecialConfigDataBase没有指定NPC特殊功能的配置文件!"); } else { foreach (NPCSpecialConfigData element in NPCSpecialConfigFile._dataTable) { m_npcSpecialConfigList.Add(element); } } }
void SendOpenTreasureChestsToSever(TreasureChestsType type) { // if (UI.MainUI.ContainerInfomanager.Instance.GetEmptyPackBoxNumber() < 1) // { // MessageBox.Instance.ShowTips(3, LanguageTextManager.GetString("IDS_I21_5"), 1);//背包已满,通过邮件发送 // } // else // { TraceUtil.Log(SystemModel.Jiang, "发送打开宝箱请求"); if (type == TreasureChestsType.Normal) { MyParent.MyParent.ShowFreeTreasureReward(); } else { NetServiceManager.Instance.EctypeService.SendSMSGEctypeClickTreasure_CS((byte)type); } // } }
public virtual void Select() { BrowserTree tree = (BrowserTree)TreeView; try { tree.TreeMenuHelper.SetupActionMenu(this, tree); } catch (Exception ex) { TraceUtil.WriteLineWarning (this, "Exception in menu processing: " + ex); tree.TreeMenuHelper.DisableActionMenu(); } try { SetupParamPanel(); } catch (Exception ex) { TraceUtil.WriteLineWarning(this, "Exception in SetupParamPanel " + ex); } DoSelectInvoke(); GetDetailText(); }
public override void SetRole(View role) { base.SetRole(role); m_hero = PlayerManager.Instance.FindHero(); m_PlayerBehaviour = (PlayerBehaviour)this.m_roleBehaviour; int skillID = PlayerDataManager.Instance.GetBattleItemData(this.m_PlayerBehaviour.PlayerKind).NormalSkillID[0]; if (skillID != 0) { TraceUtil.Log("技能ID为:" + skillID); m_attackDistance = SkillDataManager.Instance.GetSkillConfigData(skillID).m_triggerRange[0]; m_attackAngle = SkillDataManager.Instance.GetSkillConfigData(skillID).m_triggerRange[1] * 2; //配置的角度是正前方偏移的角度,所以范围角度要乘2 } else { TraceUtil.Log(SystemModel.Common, TraceLevel.Error, "技能ID为0"); } }
// Gets the values of the parameters for the specified method internal Object[] GetParameterValues(bool ignoreException, bool setMember, out Object fieldPropValue) { ArrayList values = new ArrayList(); ParamControlInfo currentPi = null; fieldPropValue = null; try { foreach (ParamControlInfo pi in _paramInfos) { // So the exception handler can know which value has // the problem currentPi = pi; Object value = pi.GetValue(); if (pi._fieldPropValue) { fieldPropValue = value; } else { values.Add(value); } TraceUtil.WriteLineVerbose (this, "Value: " + value + " type: " + ((value != null) ? value.GetType().ToString() : "")); } } catch (Exception ex) { if (!ignoreException) { ErrorDialog.Show(ex, currentPi._name + " Parameter - Error converting value", MessageBoxIcon.Error); } return(null); } return(values.ToArray()); }