示例#1
0
 protected override void OnDestruct()
 {
     m_owner_component      = null;
     m_mana_component       = null;
     m_definition_component = null;
     ClearTargets();
 }
示例#2
0
        protected override void PreInitializeObject(ObjectCreationContext context)
        {
            Entity owner_entity = context.m_logic_world.GetEntityManager().GetObject(m_context.m_owner_id);

            if (owner_entity != null)
            {
                m_owner_component = owner_entity.GetComponent(SkillManagerComponent.ID) as SkillManagerComponent;
                m_mana_component  = owner_entity.GetComponent(ManaComponent.ID) as ManaComponent;
            }
        }
示例#3
0
        public override void Apply()
        {
            Entity        owner          = GetOwnerEntity();
            ManaComponent mana_component = owner.GetComponent(ManaComponent.ID) as ManaComponent;

            if (mana_component == null)
            {
                return;
            }
            FixPoint amount = m_mana_amount.Evaluate(this);

            mana_component.ChangeMana(m_mana_type, amount);
        }