public static bool ZombieCrazy() { BattleUIEvent bue = new BattleUIEvent(BattleUIEvent.BATTLE_UI_ZOMBIE_CRAZY); EventSystem.Instance.PushEvent(bue); return(true); }
protected override void onDamage(DamageInfo damage, AttackerAttr attackerAttr) { if (!mMainPlayer) { int curHp = GetHP() < 0 ? 0 : GetHP(); BossBloodUIManager.Instance.ChangeHp(mGhostData.name, "touxiang:head" + mGhostData.resId.ToString(), GetLevel(), curHp, GetMaxHP(), GetMaxHP(), IsFury()); } Vector3 headPos = this.GetBonePositionByName("head"); if (headPos != Vector3.zero) { headPos = CameraController.Instance.WorldToScreenPoint(headPos); headPos.z = 0.0f; BattleUIEvent evt = new BattleUIEvent(BattleUIEvent.BATTLE_UI_GHOST_DAMAGE); evt.pos = headPos; evt.damage = damage; evt.dead = IsDead(); EventSystem.Instance.PushEvent(evt); } base.onDamage(damage, attackerAttr); }
public override void OnPick(ObjectBase pick, ObjectBase picker) { base.OnPick(pick, picker); if (pick == null || picker == null) { return; } Pick obj = pick as Pick; if (obj == null) { return; } PickTableItem pti = obj.GetCurPickTableItem(); if (pti == null) { return; } if (pick.GetAlias() == "pick_buff") { ModuleManager.Instance.FindModule <MonsterFloodModule>().TempMoney -= 50; GameDebug.Log("拾取pick_buff:" + pti.resID); RemoveObjsByAlias <Pick>(MonsterFloodModule.Pick_Buff); BattleUIEvent bu4 = new BattleUIEvent(BattleUIEvent.BATTLE_UI_PICK_TEMPMONEY); bu4.msg = pick.GetPosition(); EventSystem.Instance.PushEvent(bu4); } }
protected override void onDamage(DamageInfo damage, AttackerAttr attackerAttr) { if (mRes.bossHpUnit > 0) { int curHp = GetHP() < 0 ? 0 : GetHP(); BossBloodUIManager.Instance.ChangeHp(mRes.name, mRes.headicon, GetLevel(), curHp, GetMaxHP(), mRes.bossHpUnit, IsFury()); } if (mBloodNode != null && !IsDead() && damage.Value < 0) { mBloodNode.Show(); } Vector3 headPos = this.GetBonePositionByName("head"); if (headPos != Vector3.zero) { headPos = CameraController.Instance.WorldToScreenPoint(headPos); headPos.z = 0.0f; BattleUIEvent evt = new BattleUIEvent(BattleUIEvent.BATTLE_UI_DAMAGE); evt.pos = headPos; evt.damage = damage; evt.dead = IsDead(); EventSystem.Instance.PushEvent(evt); } base.onDamage(damage, attackerAttr); }
protected override void OnKillOther(AttackerAttr attr, BattleUnit theDead) { base.OnKillOther(attr, theDead); BattleUIEvent evt = new BattleUIEvent(BattleUIEvent.BATTLE_UI_KILL_OTHER); EventSystem.Instance.PushEvent(evt); }
private void UpdateUI() { BattleUIEvent eUpdate = new BattleUIEvent(BattleUIEvent.BATTLE_UI_PROGRESS_UPDATE); eUpdate.msg = mCurProgNum; eUpdate.msg1 = mTotalProgNum; EventSystem.Instance.PushEvent(eUpdate); }
public override void OnKillEnemy(ObjectBase sprite, uint killId) { base.OnKillEnemy(sprite, killId); ModuleManager.Instance.FindModule <MonsterFloodModule>().TempMoney += 50; BattleUIEvent bu3 = new BattleUIEvent(BattleUIEvent.BATTLE_UI_PICK_TEMPMONEY); EventSystem.Instance.PushEvent(bu3); }
//public static bool SaySomething(string str) //{ // //BattleUIEvent bue = new BattleUIEvent(BattleUIEvent.BATTLE_UI_SAY_SOMETHING); // //bue.msg = str; // //EventSystem.Instance.PushEvent(bue); // PromptUIManager.Instance.AddNewPrompt(str); // return true; //} public static bool ZombieTenSecond(int fontSize, int resId) { BattleUIEvent bue = new BattleUIEvent(BattleUIEvent.BATTLE_UI_TEN_SECOND); bue.msg = fontSize; bue.msg1 = resId; EventSystem.Instance.PushEvent(bue); return(true); }
public void ShowTimer(bool b) { mShowTimer = b; BattleUIEvent e = new BattleUIEvent(BattleUIEvent.BATTLE_UI_SHOW_TIMER); e.msg = b; EventSystem.Instance.PushEvent(e); }
public void SetShootType(int type) { if (mShootType != type) { mShootType = type; PlayerPrefs.SetInt(mPlayerName + "_shoot_type", mShootType); BattleUIEvent ev = new BattleUIEvent(BattleUIEvent.BATTLE_UI_SHOOT_TYPE_CHANGE); EventSystem.Instance.PushEvent(ev); } }
public static bool SetChallengeNum(List <string> paramList) { if (paramList == null || paramList.Count != 1) { return(false); } ModuleManager.Instance.FindModule <MonsterFloodModule>().mCurNum = Convert.ToInt32(paramList[0]); BattleUIEvent evt = new BattleUIEvent(BattleUIEvent.BATTLE_UI_UPDATE_MONSTER_FlOOD); GameDebug.Log("设置波数" + ModuleManager.Instance.FindModule <MonsterFloodModule>().mCurNum); EventSystem.Instance.PushEvent(evt); return(true); }
public static bool SetTotalEnermyNum(uint num) { mLastEnermyNum = mTotalEnermyNum = num; BattleUIEvent ev = new BattleUIEvent(BattleUIEvent.BATTLE_UI_ZOMBIE_ENERMY_NUM); ev.msg = mLastEnermyNum; ev.msg1 = mTotalEnermyNum; EventSystem.Instance.PushEvent(ev); return(true); }
public void ShowProgress(int total, string alias, float angle) { mTotalProgNum = total; mCurProgNum = total; mAngle = angle; mAlias = alias.Split(','); BattleUIEvent e = new BattleUIEvent(BattleUIEvent.BATTLE_UI_PROGRESS_SHOW); e.msg = mCurProgNum; e.msg1 = mTotalProgNum; EventSystem.Instance.PushEvent(e); }
private void StepStop(int index) { FunctionTriggerStep step = steps[index] as FunctionTriggerStep; if (step == null || (step.functions.Count < 1 && step.times.Count < 1)) { return; } if (step.times.Count > 0) { BattleUIEvent ev = new BattleUIEvent(BattleUIEvent.BATTLE_UI_SHOW_TIMER); ev.msg = 0; EventSystem.Instance.PushEvent(ev); } }
protected virtual void onSkillBuffAdded(uint resID) { SkillBuffTableItem buffRes = DataManager.BuffTable[resID] as SkillBuffTableItem; Vector3 headPos = Vector3.zero; if (!string.IsNullOrEmpty(buffRes.icon) && (headPos = this.GetBonePositionByName("head")) != Vector3.zero) { headPos = CameraController.Instance.WorldToScreenPoint(headPos); headPos.z = 0.0f; BattleUIEvent evt = new BattleUIEvent(BattleUIEvent.BATTLE_UI_BUFF_ADDED); evt.bmpPath = buffRes.icon; evt.pos = headPos; EventSystem.Instance.PushEvent(evt); } }
public override void OnPick(ObjectBase pick, ObjectBase picker) { base.OnPick(pick, picker); if (pick == null || picker == null) { return; } Pick obj = pick as Pick; if (obj == null) { return; } PickTableItem pti = obj.GetCurPickTableItem(); if (pti == null) { return; } //switch(pti.resID) //{ // case 5: //齿轮碎片; // BattleUIEvent bue1 = new BattleUIEvent(BattleUIEvent.BATTLE_UI_PICK_GEAR); // bue1.msg = pick.GetPosition(); // EventSystem.Instance.PushEvent(bue1); // break; // case 3: //捡到金币; // BattleUIEvent bue2 = new BattleUIEvent(BattleUIEvent.BATTLE_UI_PICK_GOLD); // bue2.msg = pick.GetPosition(); // EventSystem.Instance.PushEvent(bue2); // break; //} int pickId = (int)ConfigManager.GetVal <int>(ConfigItemKey.ZOMBIE_PICK_ID); //Debug.LogError(pti.resID); if (pti.resID == pickId) { BattleUIEvent bue1 = new BattleUIEvent(BattleUIEvent.BATTLE_UI_ZOMBIE_PICK1); //bue1.msg = pick.GetPosition(); EventSystem.Instance.PushEvent(bue1); } }
private void Dec(int n) { mCurProgNum -= n; if (mCurProgNum < 0) { mCurProgNum = 0; } UpdateUI(); if (mCurProgNum < 1) { BattleUIEvent eOver = new BattleUIEvent(BattleUIEvent.BATTLE_UI_PROGRESS_OVER); eOver.msg = mAngle; EventSystem.Instance.PushEvent(eOver); } }
protected override void onManaChanged(int delta) { Vector3 headPos = this.GetBonePositionByName("head"); if (headPos != Vector3.zero) { headPos = CameraController.Instance.WorldToScreenPoint(headPos); headPos.z = 0.0f; BattleUIEvent evt = new BattleUIEvent(BattleUIEvent.BATTLE_UI_PLAYER_MANA_CHANGED); evt.pos = headPos; evt.deltaMana = delta; EventSystem.Instance.PushEvent(evt); } base.onManaChanged(delta); }
protected override void onDamage(DamageInfo damage, AttackerAttr attackerAttr) { Vector3 headPos = this.GetBonePositionByName("head"); if (headPos != Vector3.zero) { headPos = CameraController.Instance.WorldToScreenPoint(headPos); headPos.z = 0.0f; BattleUIEvent evt = new BattleUIEvent(BattleUIEvent.BATTLE_UI_PLAYER_DAMAGE); evt.pos = headPos; evt.damage = damage; EventSystem.Instance.PushEvent(evt); } base.onDamage(damage, attackerAttr); }
void onBattleDamage(EventBase e) { if (!mEnable) { return; } BattleUIEvent evt = (BattleUIEvent)e; if (!mBeginFlicker && evt.damage.Value < 0) { mSprite.alpha = 0.8f; TweenAlpha.Begin(mSprite.gameObject, 0.5f, 0.0f); // mDamageTime = DamageTime; // mDamageTimeBegin = true; } }
public bool KillEnermy() { mLastEnermyNum--; if (mLastEnermyNum < 0) { return(false); } BattleUIEvent ev = new BattleUIEvent(BattleUIEvent.BATTLE_UI_ZOMBIE_ENERMY_NUM); ev.msg = mLastEnermyNum; ev.msg1 = mTotalEnermyNum; EventSystem.Instance.PushEvent(ev); if (mLastEnermyNum == 0) { return(true); } return(false); }
private void onPlayerManaChanged(EventBase e) { BattleUIEvent evt = (BattleUIEvent)e; AddNewDamage(evt.pos, evt.deltaMana, true, true, false, evt.dead); }
private void onDamage(EventBase e) { BattleUIEvent evt = (BattleUIEvent)e; AddNewDamage(evt.pos, evt.damage.Value, false, false, evt.damage.Critical, evt.dead); }
void onBuffAdded(EventBase e) { BattleUIEvent evt = (BattleUIEvent)e; AddNewBuff(evt.pos, evt.bmpPath); }