K
K Viltersten
I've create a class Clock for entering
handling directions. It has twelve
values, 0 through 11, and methods for
jumping back and fort in time.
As it's now, i use a method for
controlling the pass over midnight.
void doJumpAhead ()
{
this.time++;
if (this.time > 11)
this.time = 0;
}
It just stroke me that i should be
able to use enum type. However, i've
seen no info on how to make
enum Direction : byte
{
One, Two, ... Twelve
}
to a circular entity. I believe, the
way it's shown above, it'll only keep
on increasing if i use "++" on it. Is
there a work-around?
handling directions. It has twelve
values, 0 through 11, and methods for
jumping back and fort in time.
As it's now, i use a method for
controlling the pass over midnight.
void doJumpAhead ()
{
this.time++;
if (this.time > 11)
this.time = 0;
}
It just stroke me that i should be
able to use enum type. However, i've
seen no info on how to make
enum Direction : byte
{
One, Two, ... Twelve
}
to a circular entity. I believe, the
way it's shown above, it'll only keep
on increasing if i use "++" on it. Is
there a work-around?