Ejemplo n.º 1
0
        public void OnResearchRemove(Player owner)
        {
            if (!isHasOnResearchRemove)
            {
                return;
            }
            eventT["research"] = this;
            eventT["name"]     = OnResearchRemoveEventName;
            if (UnitEvents.isEventNotPreloaded(eventT, OnResearchRemoveEventName))
            {
                eventT["preset"] = _onResearchRemove;
            }

            LuaResearchGetter.OnResearchRemove(eventT);
        }
Ejemplo n.º 2
0
        public void OnUnitSpawned(GameUnit unit)
        {
            if (!isHasOnUnitSpawned)
            {
                return;
            }
            eventT["research"] = this;
            eventT["name"]     = onUnitSpawnedEventName;
            eventT["target"]   = unit;
            if (UnitEvents.isEventNotPreloaded(eventT, onUnitSpawnedEventName))
            {
                eventT["preset"] = _onUnitSpawned;
            }

            LuaResearchGetter.OnUnitSpawned(eventT);
        }
Ejemplo n.º 3
0
        public void OnOwnerSpawned(AbstractGameObject caster)
        {
            if (!parentBigAbility.eventsPreset.ContainsKey("OnOwnerSpawned"))
            {
                return;
            }
            eventTable["caster"]  = caster;
            eventTable["target"]  = DynValue.Nil;
            eventTable["ability"] = this;
            eventTable["name"]    = onOwnerSpawnedEventName;
            if (UnitEvents.isEventNotPreloaded(eventTable, onOwnerSpawnedEventName))
            {
                eventTable["preset"] = parentBigAbility.eventsPreset["OnOwnerSpawned"];
            }

            LuaAbilitiesGetter.OnOwnerSpawned(eventTable);
        }
Ejemplo n.º 4
0
        public bool OnSpellStart(AbstractGameObject caster, GameUnit target)
        {
            if (!parentBigAbility.eventsPreset.ContainsKey("OnSpellStart"))
            {
                return(true);
            }
            eventTable["caster"]  = caster;
            eventTable["target"]  = target;
            eventTable["ability"] = this;
            eventTable["name"]    = onSpellStartEventName;

            if (UnitEvents.isEventNotPreloaded(eventTable, onSpellStartEventName))
            {
                eventTable["preset"] = parentBigAbility.eventsPreset["OnSpellStart"];
            }

            return(LuaAbilitiesGetter.OnSpellStart(eventTable));
        }