From a990bd0b24bac57a2051cba505b54238e5485149 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Sat, 29 Oct 2022 14:18:35 -0400 Subject: Add basic time progression and game state reset. --- apple-town-fair/time-display.scm | 63 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 apple-town-fair/time-display.scm (limited to 'apple-town-fair/time-display.scm') diff --git a/apple-town-fair/time-display.scm b/apple-town-fair/time-display.scm new file mode 100644 index 0000000..c36618f --- /dev/null +++ b/apple-town-fair/time-display.scm @@ -0,0 +1,63 @@ +;;; Copyright © 2022 David Thompson +;;; +;;; This program is free software: you can redistribute it and/or +;;; modify it under the terms of the GNU General Public License as +;;; published by the Free Software Foundation, either version 3 of the +;;; License, or (at your option) any later version. +;;; +;;; This program is distributed in the hope that it will be useful, +;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;; General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with this program. If not, see +;;; . +(define-module (apple-town-fair time-display) + #:use-module (apple-town-fair assets) + #:use-module (apple-town-fair common) + #:use-module (catbird node) + #:use-module (catbird node-2d) + #:use-module (chickadee graphics color) + #:use-module (chickadee graphics path) + #:use-module (chickadee math vector) + #:use-module (oop goops) + #:export ()) + +(define-class () + (day #:accessor day #:init-keyword #:day #:init-value 0 #:observe? #t) + (time #:accessor time #:init-keyword #:time #:init-value 0 #:observe? #t)) + +(define-method (on-boot (t )) + (attach-to t + (make + #:name 'background) + (make