-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from default-username-852/dev
Dev
- Loading branch information
Showing
19 changed files
with
450 additions
and
107 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
# TODO | ||
|
||
- hinder | ||
- bättre modeller + texturer | ||
- mer varierade banor | ||
- roliga powerups? |
Binary file not shown.
Binary file not shown.
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
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
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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { v4 as uuidv4 } from 'uuid'; | ||
|
||
// TODO: add more pickup types | ||
export enum PickupType { | ||
Notes, | ||
} | ||
|
||
export class Pickup { | ||
type: PickupType; | ||
height: number; | ||
offset: number; | ||
uuid: string; | ||
|
||
constructor(type: PickupType, height: number, offset: number) { | ||
this.type = type; | ||
this.height = height; | ||
this.offset = offset; | ||
this.uuid = uuidv4(); | ||
} | ||
|
||
update(worldOffset: number) { | ||
this.offset -= worldOffset; | ||
} | ||
|
||
clone(): Pickup { | ||
return new Pickup(this.type, this.height, this.offset); | ||
} | ||
|
||
points(): number { | ||
switch (this.type) { | ||
case PickupType.Notes: | ||
return 100; | ||
} | ||
} | ||
} |
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
Oops, something went wrong.