Skip to content

Instantly share code, notes, and snippets.

@harry830622
Created February 27, 2022 06:13
Show Gist options
  • Save harry830622/e94a59e107b3d19009014f01a1dd7a2e to your computer and use it in GitHub Desktop.
Save harry830622/e94a59e107b3d19009014f01a1dd7a2e to your computer and use it in GitHub Desktop.
// Moment 也就是一張卡片,
pub struct MomentData {
// 是在哪個 set 裡
pub let setID: UInt32
// 是哪個 play
pub let playID: UInt32
// 序號是多少
pub let serialNumber: UInt32
// 創建 struct 時候的初始化 function
// 主要就是初始化上述提到的那些 variables
init(setID: UInt32, playID: UInt32, serialNumber: UInt32) {
self.setID = setID
self.playID = playID
self.serialNumber = serialNumber
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment