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); }
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); }
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); }
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)); }