mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-07 13:15:01 +00:00
6.4 update (minus sprites)
This commit is contained in:
34
Data/Scripts/052_AddOns/TempEvents.rb
Normal file
34
Data/Scripts/052_AddOns/TempEvents.rb
Normal file
@@ -0,0 +1,34 @@
|
||||
|
||||
class PokemonTemp
|
||||
attr_accessor :tempEvents
|
||||
attr_accessor :silhouetteDirection
|
||||
|
||||
def tempEvents
|
||||
@tempEvents = {} if !@tempEvents
|
||||
return @tempEvents
|
||||
end
|
||||
|
||||
|
||||
|
||||
def pbClearTempEvents()
|
||||
@tempEvents.keys.each {|map_id|
|
||||
map = $MapFactory.getMap(map_id)
|
||||
@tempEvents[map_id].each { |event|
|
||||
map.events[event.id].erase if map.events[event.id]
|
||||
}
|
||||
}
|
||||
@tempEvents={}
|
||||
@silhouetteDirection=nil
|
||||
end
|
||||
|
||||
|
||||
def addTempEvent(map,event)
|
||||
@tempEvents = {} if !@tempEvents
|
||||
mapEvents = @tempEvents.has_key?(map) ? @tempEvents[map] : []
|
||||
mapEvents.push(event)
|
||||
@tempEvents[map] = mapEvents
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user