-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2a88efd
commit b8e3b99
Showing
2 changed files
with
20 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,27 @@ | ||
import { ref } from "vue" | ||
|
||
/** | ||
* Space sector tile | ||
*/ | ||
export default class SpaceSector { | ||
|
||
readonly id: string | ||
readonly outline: boolean | ||
rotation: number | ||
rotation | ||
|
||
constructor(id: string, outline?: boolean) { | ||
this.id = id | ||
this.outline = outline ?? false | ||
this.rotation = 0 | ||
this.rotation = ref(0) | ||
} | ||
|
||
rotate() : void { | ||
if (this.rotation.value == 5) { | ||
this.rotation.value = 0 | ||
} | ||
else { | ||
this.rotation.value += 1 | ||
} | ||
} | ||
|
||
} |