-
Notifications
You must be signed in to change notification settings - Fork 1
Custom Name Script Bindings
Victor edited this page May 5, 2020
·
2 revisions
@objc public protocol PokemonStatsJSExport: JSExport {
var cp: Int { get }
var hp: Int { get }
var gender: String { get }
var weight: Double { get }
var isLucky: Bool { get }
var options: [PokemonStatsOptionJSExport] { get }
}
@objc public protocol PokemonStatsOptionJSExport: JSExport {
var name: String { get }
var form: String { get }
var level: Double { get }
var attack: Int { get }
var defense: Int { get }
var stamina: Int { get }
var greatIndex: Int { get }
var greatRanking: Double { get }
var ultraIndex: Int { get }
var ultraRanking: Double { get }
}
@objc public protocol PokemonMoveJSExport: JSExport {
var type: String { get }
var name: String { get }
var energy: Int { get }
}
function formatName(stats /* PokemonStatsJSExport */, moves /* array of PokemonMoveJSExport */) {
return stats.options[0].name;
}