public void TriggerActionPoint(ActionPointType actionPointType, CombatAction action) { foreach (var item in ActionPoints[actionPointType].Listeners) { item.Invoke(action); } }
public void RemoveListener(ActionPointType actionPointType, Action <CombatAction> action) { if (ActionPoints.ContainsKey(actionPointType)) { ActionPoints[actionPointType].Listeners.Remove(action); } }
public void RemoveListener(ActionPointType actionPointType, Action <CombatAction> action) { //if (Conditions.ContainsKey(actionPointType)) //{ // Conditions[actionPointType].Listeners.Remove(action); //} }
/// <summary> /// 刷新主城行动点(体力 活力)显示 /// </summary> /// <param name="type"></param> /// <param name="count"></param> private void UpdateActionPoint(ActionPointType type, int count) { switch (type) { //"[ff0000]" + "20" +"[-]" case ActionPointType.Vitality:; if (count > playerData.GetInstance().actionData.maxVitalityCount) { vitalityTxt.text = "[00ffff]" + count.ToString() + "[-]" + "/" + playerData.GetInstance().actionData.maxVitalityCount; } else { vitalityTxt.text = count.ToString() + "/" + playerData.GetInstance().actionData.maxVitalityCount; playerData.GetInstance().UpdateCountdownTime(type); } break; case ActionPointType.Energy: Debug.Log(energyTxt); if (count > playerData.GetInstance().actionData.maxEnergyCount) { energyTxt.text = "[5eaeff]" + count.ToString() + "[-]" + "/" + playerData.GetInstance().actionData.maxEnergyCount; } else { energyTxt.text = count.ToString() + "/" + playerData.GetInstance().actionData.maxEnergyCount; //playerData.GetInstance().UpdateCountdownTime(type); //playerData.GetInstance().RefreshTime(); } break; } }
public void AddListener(ActionPointType actionPointType, Action <CombatAction> action) { if (!ActionPoints.ContainsKey(actionPointType)) { ActionPoints.Add(actionPointType, new ActionPoint()); } ActionPoints[actionPointType].Listeners.Add(action); }
public void TriggerActionPoint(ActionPointType actionPointType, CombatAction action) { if (ActionPoints.ContainsKey(actionPointType) && ActionPoints[actionPointType].Listeners.Count > 0) { for (int i = ActionPoints[actionPointType].Listeners.Count - 1; i >= 0; i--) { var item = ActionPoints[actionPointType].Listeners[i]; item.Invoke(action); } } }
public void TriggerActionPoint(ActionPointType actionPointType, CombatAction action) { //if (Conditions.ContainsKey(actionPointType) && Conditions[actionPointType].Listeners.Count > 0) //{ // for (int i = Conditions[actionPointType].Listeners.Count - 1; i >= 0; i--) // { // var item = Conditions[actionPointType].Listeners[i]; // item.Invoke(action); // } //} }
public void SetInfo(ActionPointType type) { this.type = type; }
public void TriggerActionPoint(ActionPointType actionPointType, CombatAction action) { GetComponent <ActionPointManageComponent>().TriggerActionPoint(actionPointType, action); }
public void UnListenActionPoint(ActionPointType actionPointType, Action <CombatAction> action) { GetComponent <ActionPointManageComponent>().RemoveListener(actionPointType, action); }
public void TriggerActionPoint(ActionPointType actionPointType, CombatAction action) { ActionPointManager.TriggerActionPoint(actionPointType, action); }
// RVA: 0xEACCEC Offset: 0xEACCEC VA: 0xEACCEC public bool IsAPFull(ActionPointType APType = 0) { }
public override Loc GetActionPoint(CharSheet sheet, ActionPointType pointType) { return(MapLoc + Collider.Size / 2 + DrawOffset + sheet.GetActionPoint(AnimFrameType, false, DirExt.AddAngles(CharDir, dirOffset), pointType, FrameMethod)); }
public void RemoveListener(ActionPointType actionPointType, Action <CombatAction> action) { ActionPointManager.RemoveListener(actionPointType, action); }
// RVA: 0xEACDA0 Offset: 0xEACDA0 VA: 0xEACDA0 public bool IsAPEnough(int amount, ActionPointType APType = 0) { }
public void RemoveListener(ActionPointType actionPointType, Action <CombatAction> action) { ActionPoints[actionPointType].Listeners.Remove(action); }
public void AddListener(ActionPointType actionPointType, Action <CombatAction> action) { ActionPoints[actionPointType].Listeners.Add(action); }
public void ListenActionPoint(ActionPointType actionPointType, Action <CombatAction> action) { GetComponent <ActionPointManagerComponent>().AddListener(actionPointType, action); }
public override Loc GetActionPoint(CharSheet sheet, ActionPointType pointType) { Loc midTileOffset = new Loc(GraphicsManager.TileSize / 2); return(MapLoc + midTileOffset + drawOffset + sheet.GetActionPoint(charFrameType, false, DirExt.AddAngles(CharDir, dirOffset), pointType, determineFrame)); }
public void AddListener(ActionPointType actionPointType, Action <CombatAction> action) { ActionPointManager.AddListener(actionPointType, action); }
protected override void SetUI(params object[] uiParams) { this.type = (ActionPointType)uiParams[0]; base.SetUI(); }