private void RefreshSkillItems() { if (GameEntry.Level.PlayerActor == null) { return; } IActorSkill skill = GameEntry.Level.PlayerActor.ActorSkill; if (skill == null) { return; } for (int i = 0; i < m_SkillItems.Length; i++) { m_SkillItems[i].ShowSkill(skill.GetSkill((SkillPosType)i)); } }
public virtual void Init() { m_ActorSkill = new ActorSkill(this); m_ActorCard = new ActorCard(this); m_ActorBuff = new ActorBuff(this); InitAttribute(true); InitBornParam(); InitCommands(); InitLayer(); InitAnim(); InitAi(); InitFeature(); InitState(); InitFsm(); CreateBoard(); ApplyCharacterCtrl(true); }
protected ActorBase(int entityId, int id, GameObject go, ActorType type, ActorBattleCampType camp, CharacterController cc, Animator anim) { if (id == 0 || go == null || cc == null || anim == null) { throw new GameFrameworkException("Construct Actor Fail."); } m_ActorSkill = new ActorSkill(this); Id = id; EntityId = entityId; ActorType = type; Camp = camp; EntityGo = go; CacheTransform = go.transform; BornParam = go.transform; m_CharacterController = cc; m_Animator = anim; }
public virtual void Clear() { RemoveBoard(); RemoveEffect(); m_AIFeatures?.Clear(); m_ActorStates?.Clear(); m_Enemys?.Clear(); m_Allys?.Clear(); m_Targets?.Clear(); m_ActorAI?.Clear(); m_ActorBuff?.Clear(); m_ActorSkill?.Clear(); m_CommandReceiver?.Clear(); m_ActorAI = null; m_ActorBuff = null; m_ActorCard = null; m_ActorSkill = null; m_CommandReceiver = null; GameEntry.Fsm.DestroyFsm(m_ActorFsm); }