继续搞点新机制
This commit is contained in:
@@ -1,9 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Continentis.MainGame.Card;
|
||||
using Continentis.MainGame.Combat;
|
||||
using NaughtyAttributes;
|
||||
using UnityEngine;
|
||||
using Object = UnityEngine.Object;
|
||||
using Random = UnityEngine.Random;
|
||||
|
||||
namespace Continentis.MainGame.Character
|
||||
{
|
||||
@@ -20,8 +23,10 @@ namespace Continentis.MainGame.Character
|
||||
DeckSubmodule deckSubmodule { get; }
|
||||
}
|
||||
|
||||
public partial class CharacterBase : ICardOwner
|
||||
public partial class CharacterBase : ICardOwner, IGameElement
|
||||
{
|
||||
public Guid elementID { get; set; }
|
||||
|
||||
public CharacterData data;
|
||||
|
||||
public Fraction fraction;
|
||||
@@ -52,6 +57,8 @@ namespace Continentis.MainGame.Character
|
||||
|
||||
public void Initialize(Fraction fraction)
|
||||
{
|
||||
(this as IGameElement).Initialize();
|
||||
|
||||
this.fraction = fraction;
|
||||
|
||||
switch (fraction)
|
||||
|
||||
@@ -78,7 +78,7 @@ namespace Continentis.MainGame.Character
|
||||
}
|
||||
else
|
||||
{
|
||||
existingBuff.iconSubmodule?.buffIcon.UpdateIcon();
|
||||
existingBuff.iconSubmodule?.Update();
|
||||
}
|
||||
|
||||
RefreshAttributes();
|
||||
|
||||
@@ -22,6 +22,11 @@ namespace Continentis.MainGame.Character
|
||||
{
|
||||
return (T)buffList.Find(x => x.GetType() == typeof(T));
|
||||
}
|
||||
|
||||
public T GetBuff<T>(string identification) where T : CharacterCombatBuffBase
|
||||
{
|
||||
return (T)buffList.FindAll(x => x.GetType() == typeof(T)).Find(x => x.identification == identification);
|
||||
}
|
||||
|
||||
public bool HasBuff<T>() where T : CharacterCombatBuffBase
|
||||
{
|
||||
|
||||
@@ -18,6 +18,7 @@ namespace Continentis.MainGame.Character
|
||||
|
||||
//中性状态
|
||||
Taunt = 2000, //嘲讽
|
||||
Protected = 2001, //被保护
|
||||
}
|
||||
|
||||
public partial class StatusSubmodule : SubmoduleBase<CharacterBase>
|
||||
|
||||
Reference in New Issue
Block a user