Skip to content

Instantly share code, notes, and snippets.

@Hugo6991
Created February 21, 2022 13:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Hugo6991/fbe26d75a25110f493999caae51ee8c7 to your computer and use it in GitHub Desktop.
Save Hugo6991/fbe26d75a25110f493999caae51ee8c7 to your computer and use it in GitHub Desktop.
06 | MomentData
// 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