15 lines
226 B
Plaintext
15 lines
226 B
Plaintext
|
pub struct FrameCounter {
|
||
|
frame,
|
||
|
}
|
||
|
|
||
|
impl FrameCounter {
|
||
|
pub fn new() {
|
||
|
return FrameCounter {frame: 0};
|
||
|
}
|
||
|
|
||
|
pub fn update(self) {
|
||
|
self.frame += 1;
|
||
|
println(`Frame: ${self.frame}`);
|
||
|
}
|
||
|
}
|