Example #1
0
 public void TriggerActionPoint(ActionPointType actionPointType, CombatAction action)
 {
     foreach (var item in ActionPoints[actionPointType].Listeners)
     {
         item.Invoke(action);
     }
 }
Example #2
0
 public void RemoveListener(ActionPointType actionPointType, Action <CombatAction> action)
 {
     if (ActionPoints.ContainsKey(actionPointType))
     {
         ActionPoints[actionPointType].Listeners.Remove(action);
     }
 }
Example #3
0
 public void RemoveListener(ActionPointType actionPointType, Action <CombatAction> action)
 {
     //if (Conditions.ContainsKey(actionPointType))
     //{
     //    Conditions[actionPointType].Listeners.Remove(action);
     //}
 }
Example #4
0
    /// <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;
        }
    }
Example #5
0
 public void AddListener(ActionPointType actionPointType, Action <CombatAction> action)
 {
     if (!ActionPoints.ContainsKey(actionPointType))
     {
         ActionPoints.Add(actionPointType, new ActionPoint());
     }
     ActionPoints[actionPointType].Listeners.Add(action);
 }
Example #6
0
 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);
         }
     }
 }
Example #7
0
 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);
     //    }
     //}
 }
Example #8
0
 public void SetInfo(ActionPointType type)
 {
     this.type = type;
 }
Example #9
0
 public void TriggerActionPoint(ActionPointType actionPointType, CombatAction action)
 {
     GetComponent <ActionPointManageComponent>().TriggerActionPoint(actionPointType, action);
 }
Example #10
0
 public void UnListenActionPoint(ActionPointType actionPointType, Action <CombatAction> action)
 {
     GetComponent <ActionPointManageComponent>().RemoveListener(actionPointType, action);
 }
Example #11
0
 public void TriggerActionPoint(ActionPointType actionPointType, CombatAction action)
 {
     ActionPointManager.TriggerActionPoint(actionPointType, action);
 }
Example #12
0
 // RVA: 0xEACCEC Offset: 0xEACCEC VA: 0xEACCEC
 public bool IsAPFull(ActionPointType APType = 0)
 {
 }
Example #13
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));
 }
Example #14
0
 public void RemoveListener(ActionPointType actionPointType, Action <CombatAction> action)
 {
     ActionPointManager.RemoveListener(actionPointType, action);
 }
Example #15
0
 // RVA: 0xEACDA0 Offset: 0xEACDA0 VA: 0xEACDA0
 public bool IsAPEnough(int amount, ActionPointType APType = 0)
 {
 }
Example #16
0
 public void RemoveListener(ActionPointType actionPointType, Action <CombatAction> action)
 {
     ActionPoints[actionPointType].Listeners.Remove(action);
 }
Example #17
0
 public void AddListener(ActionPointType actionPointType, Action <CombatAction> action)
 {
     ActionPoints[actionPointType].Listeners.Add(action);
 }
Example #18
0
 public void ListenActionPoint(ActionPointType actionPointType, Action <CombatAction> action)
 {
     GetComponent <ActionPointManagerComponent>().AddListener(actionPointType, action);
 }
Example #19
0
        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));
        }
Example #20
0
 public void AddListener(ActionPointType actionPointType, Action <CombatAction> action)
 {
     ActionPointManager.AddListener(actionPointType, action);
 }
Example #21
0
 protected override void SetUI(params object[] uiParams)
 {
     this.type = (ActionPointType)uiParams[0];
     base.SetUI();
 }