Compare commits
No commits in common. "master" and "backend" have entirely different histories.
|
|
@ -1,6 +1,5 @@
|
||||||
POSTGRES_PORT=5432
|
POSTGRES_PORT=5432
|
||||||
EXPRESS_PORT=3000
|
EXPRESS_PORT=3000
|
||||||
FRONTEND_PORT=8080
|
|
||||||
|
|
||||||
POSTGRES_USER=postgres
|
POSTGRES_USER=postgres
|
||||||
POSTGRES_PASSWORD=postgres
|
POSTGRES_PASSWORD=postgres
|
||||||
|
|
|
||||||
30
README.md
|
|
@ -1,30 +0,0 @@
|
||||||
# RaspberryRocketeer
|
|
||||||
|
|
||||||
## How to run
|
|
||||||
|
|
||||||
### Copy .env
|
|
||||||
First you need to copy the `.env.example`.
|
|
||||||
|
|
||||||
```shell
|
|
||||||
cp .env.example .env
|
|
||||||
```
|
|
||||||
|
|
||||||
<small>Note: It is recommended to change the values for the database user.</small>
|
|
||||||
|
|
||||||
### Install node packages
|
|
||||||
Go into the frontend folder using
|
|
||||||
```shell
|
|
||||||
cd frontend
|
|
||||||
```
|
|
||||||
and run:
|
|
||||||
```shell
|
|
||||||
npm install
|
|
||||||
```
|
|
||||||
|
|
||||||
### Start the container (in the project root)
|
|
||||||
|
|
||||||
```shell
|
|
||||||
docker compose up --build
|
|
||||||
```
|
|
||||||
|
|
||||||
You can then access the website on `localhost:8080`
|
|
||||||
|
|
@ -9,9 +9,6 @@ export const gameRoute = express.Router()
|
||||||
|
|
||||||
gameRoute.use(express.json())
|
gameRoute.use(express.json())
|
||||||
|
|
||||||
/**
|
|
||||||
* Test
|
|
||||||
*/
|
|
||||||
gameRoute.post(
|
gameRoute.post(
|
||||||
'/add',
|
'/add',
|
||||||
body('playtime')
|
body('playtime')
|
||||||
|
|
@ -21,8 +18,6 @@ gameRoute.post(
|
||||||
body('userId')
|
body('userId')
|
||||||
.isInt({min: 1})
|
.isInt({min: 1})
|
||||||
.custom(userWithIdExists),
|
.custom(userWithIdExists),
|
||||||
body('score')
|
|
||||||
.isInt({min: 0}),
|
|
||||||
/**
|
/**
|
||||||
* After processing the errors of express-validator, inserts the game into the DB
|
* After processing the errors of express-validator, inserts the game into the DB
|
||||||
* @param req
|
* @param req
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
import express from 'express';
|
import express from 'express';
|
||||||
import {query, validationResult} from 'express-validator';
|
|
||||||
import {TimeLeaderboardRepository} from "./repositories/TimeLeaderboardRepository.js";
|
import {TimeLeaderboardRepository} from "./repositories/TimeLeaderboardRepository.js";
|
||||||
import {TimeLeaderboardPgPromiseRepository} from "./repositories/pgPromise/TimeLeaderboardPgPromiseRepository.js";
|
import {TimeLeaderboardPgPromiseRepository} from "./repositories/pgPromise/TimeLeaderboardPgPromiseRepository.js";
|
||||||
import {HighscoreLeaderboardPgPromiseRepository} from "./repositories/pgPromise/HighscoreLeaderboardPgPromiseRepository.js";
|
import {HighscoreLeaderboardPgPromiseRepository} from "./repositories/pgPromise/HighscoreLeaderboardPgPromiseRepository.js";
|
||||||
|
|
@ -9,9 +8,6 @@ import {HighscoreLeaderboard, TimeLeaderboard} from "./model/Leaderboard.js";
|
||||||
export const leaderboardRoute = express.Router()
|
export const leaderboardRoute = express.Router()
|
||||||
|
|
||||||
leaderboardRoute.get('/highscore',
|
leaderboardRoute.get('/highscore',
|
||||||
query('pagination').toBoolean(),
|
|
||||||
query('entriesPerPage').optional().isInt({min: 1}).toInt(),
|
|
||||||
query('page').optional().isInt({min: 0}).toInt(),
|
|
||||||
/**
|
/**
|
||||||
* Returns the highscore leaderboard as JSON response, fetched from DB
|
* Returns the highscore leaderboard as JSON response, fetched from DB
|
||||||
* @param req
|
* @param req
|
||||||
|
|
@ -19,21 +15,8 @@ leaderboardRoute.get('/highscore',
|
||||||
*/
|
*/
|
||||||
async (req, res) => {
|
async (req, res) => {
|
||||||
try {
|
try {
|
||||||
//region validate parameters
|
|
||||||
const errors = validationResult(req);
|
|
||||||
if (!errors.isEmpty()) {
|
|
||||||
return res.status(400).json({ errors: errors.array() });
|
|
||||||
}
|
|
||||||
//endregion
|
|
||||||
const highscoreLeaderboardRepo: HighscoreLeaderboardRepository = new HighscoreLeaderboardPgPromiseRepository;
|
const highscoreLeaderboardRepo: HighscoreLeaderboardRepository = new HighscoreLeaderboardPgPromiseRepository;
|
||||||
let highscoreLeaderboard: HighscoreLeaderboard;
|
const highscoreLeaderboard: HighscoreLeaderboard = await highscoreLeaderboardRepo.getAll();
|
||||||
if (req.query.pagination == true) {
|
|
||||||
const entriesPerPage = req.query.entriesPerPage;
|
|
||||||
const page = req.query.page;
|
|
||||||
highscoreLeaderboard = await highscoreLeaderboardRepo.getPage(entriesPerPage, page);
|
|
||||||
} else {
|
|
||||||
highscoreLeaderboard = await highscoreLeaderboardRepo.getAll();
|
|
||||||
}
|
|
||||||
res.send(highscoreLeaderboard);
|
res.send(highscoreLeaderboard);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
// handle errors
|
// handle errors
|
||||||
|
|
@ -43,9 +26,6 @@ leaderboardRoute.get('/highscore',
|
||||||
})
|
})
|
||||||
|
|
||||||
leaderboardRoute.get('/totalplaytime',
|
leaderboardRoute.get('/totalplaytime',
|
||||||
query('pagination').toBoolean(),
|
|
||||||
query('entriesPerPage').optional().isInt({min: 1}).toInt(),
|
|
||||||
query('page').optional().isInt({min: 0}).toInt(),
|
|
||||||
/**
|
/**
|
||||||
* Returns the total playtime leaderboard as JSON response, fetched from DB
|
* Returns the total playtime leaderboard as JSON response, fetched from DB
|
||||||
* @param req
|
* @param req
|
||||||
|
|
@ -53,23 +33,8 @@ leaderboardRoute.get('/totalplaytime',
|
||||||
*/
|
*/
|
||||||
async (req, res) => {
|
async (req, res) => {
|
||||||
try {
|
try {
|
||||||
console.log(req.query)
|
|
||||||
//region validate parameters
|
|
||||||
const errors = validationResult(req);
|
|
||||||
if (!errors.isEmpty()) {
|
|
||||||
return res.status(400).json({ errors: errors.array() });
|
|
||||||
}
|
|
||||||
//endregion
|
|
||||||
const timeLeaderboardRepo: TimeLeaderboardRepository = new TimeLeaderboardPgPromiseRepository;
|
const timeLeaderboardRepo: TimeLeaderboardRepository = new TimeLeaderboardPgPromiseRepository;
|
||||||
let timeLeaderboard: TimeLeaderboard;
|
const timeLeaderboard: TimeLeaderboard = await timeLeaderboardRepo.getAll();
|
||||||
console.log(req.query)
|
|
||||||
if (req.query.pagination == true) {
|
|
||||||
const entriesPerPage = req.query.entriesPerPage;
|
|
||||||
const page = req.query.page;
|
|
||||||
timeLeaderboard = await timeLeaderboardRepo.getPage(entriesPerPage, page);
|
|
||||||
} else {
|
|
||||||
timeLeaderboard = await timeLeaderboardRepo.getAll();
|
|
||||||
}
|
|
||||||
res.send(timeLeaderboard);
|
res.send(timeLeaderboard);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
// handle errors
|
// handle errors
|
||||||
|
|
|
||||||
|
|
@ -2,5 +2,4 @@ import {HighscoreLeaderboard} from "../model/Leaderboard.js";
|
||||||
|
|
||||||
export abstract class HighscoreLeaderboardRepository {
|
export abstract class HighscoreLeaderboardRepository {
|
||||||
abstract getAll(): Promise<HighscoreLeaderboard>;
|
abstract getAll(): Promise<HighscoreLeaderboard>;
|
||||||
abstract getPage(entriesPerPage: number, page: number): Promise<HighscoreLeaderboard>
|
|
||||||
}
|
}
|
||||||
|
|
@ -2,5 +2,4 @@ import {TimeLeaderboard} from "../model/Leaderboard.js";
|
||||||
|
|
||||||
export abstract class TimeLeaderboardRepository {
|
export abstract class TimeLeaderboardRepository {
|
||||||
abstract getAll(): Promise<TimeLeaderboard>;
|
abstract getAll(): Promise<TimeLeaderboard>;
|
||||||
abstract getPage(entriesPerPage: number, page: number);
|
|
||||||
}
|
}
|
||||||
|
|
@ -5,15 +5,7 @@ import {Database} from "../../Database.js";
|
||||||
export class HighscoreLeaderboardPgPromiseRepository extends HighscoreLeaderboardRepository {
|
export class HighscoreLeaderboardPgPromiseRepository extends HighscoreLeaderboardRepository {
|
||||||
async getAll(): Promise<HighscoreLeaderboard> {
|
async getAll(): Promise<HighscoreLeaderboard> {
|
||||||
const raw: any = await Database.db.manyOrNone(
|
const raw: any = await Database.db.manyOrNone(
|
||||||
'SELECT * FROM lb_highscore INNER JOIN "user" ON user_id = id ORDER BY rank;'
|
'SELECT * FROM lb_highscore INNER JOIN "user" ON user_id = id ORDER BY RANK;'
|
||||||
);
|
|
||||||
return this.serialize(raw);
|
|
||||||
}
|
|
||||||
|
|
||||||
async getPage(entriesPerPage, page): Promise<HighscoreLeaderboard> {
|
|
||||||
const raw: any = await Database.db.manyOrNone(
|
|
||||||
'SELECT * FROM lb_highscore INNER JOIN "user" ON user_id = id ORDER BY rank LIMIT $1 OFFSET $2;',
|
|
||||||
[entriesPerPage, page * entriesPerPage]
|
|
||||||
);
|
);
|
||||||
return this.serialize(raw);
|
return this.serialize(raw);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,15 +5,7 @@ import {Database} from "../../Database.js";
|
||||||
export class TimeLeaderboardPgPromiseRepository extends TimeLeaderboardRepository {
|
export class TimeLeaderboardPgPromiseRepository extends TimeLeaderboardRepository {
|
||||||
async getAll(): Promise<TimeLeaderboard> {
|
async getAll(): Promise<TimeLeaderboard> {
|
||||||
const raw: any = await Database.db.manyOrNone(
|
const raw: any = await Database.db.manyOrNone(
|
||||||
'SELECT * FROM lb_total_playtime INNER JOIN "user" ON user_id = id ORDER BY rank;'
|
'SELECT * FROM lb_total_playtime INNER JOIN "user" ON user_id = id ORDER BY RANK;'
|
||||||
);
|
|
||||||
return this.serialize(raw);
|
|
||||||
}
|
|
||||||
|
|
||||||
async getPage(entriesPerPage: number, page: number): Promise<TimeLeaderboard> {
|
|
||||||
const raw: any = await Database.db.manyOrNone(
|
|
||||||
'SELECT * FROM lb_total_playtime INNER JOIN "user" ON user_id = id ORDER BY rank LIMIT $1 OFFSET $2;',
|
|
||||||
[entriesPerPage, page * entriesPerPage]
|
|
||||||
);
|
);
|
||||||
return this.serialize(raw);
|
return this.serialize(raw);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -84,30 +84,3 @@ userRoute.get('/:userId/scores',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
userRoute.get('/:name',
|
|
||||||
param('name')
|
|
||||||
.isString()
|
|
||||||
.isLength({min: 3, max: 32})
|
|
||||||
.matches(USERNAME_VALIDATION_REGEX),
|
|
||||||
|
|
||||||
async (req, res) => {
|
|
||||||
const errors = validationResult(req);
|
|
||||||
if (!errors.isEmpty()) {
|
|
||||||
return res.status(400).json({ errors: errors.array() });
|
|
||||||
}
|
|
||||||
|
|
||||||
const name: string = req.params.name;
|
|
||||||
console.log(name)
|
|
||||||
|
|
||||||
try {
|
|
||||||
// get & return data
|
|
||||||
const userRepo: UserPgPromiseRepository = new UserPgPromiseRepository();
|
|
||||||
const user = await userRepo.getByName(name);
|
|
||||||
res.json(user);
|
|
||||||
} catch (error) {
|
|
||||||
// handle errors
|
|
||||||
console.log(error)
|
|
||||||
res.status(500).json({ errors: [{msg: "Internal server error"}]})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
|
||||||
40
backend/db/initScripts/loadMockData.sql
Normal file
|
|
@ -0,0 +1,40 @@
|
||||||
|
insert into "user" (name) values ('dpettus0');
|
||||||
|
insert into "user" (name) values ('egreetland1');
|
||||||
|
insert into "user" (name) values ('smontford2');
|
||||||
|
insert into "user" (name) values ('idagwell3');
|
||||||
|
insert into "user" (name) values ('lgagan4');
|
||||||
|
insert into "user" (name) values ('acarmont5');
|
||||||
|
insert into "user" (name) values ('kjermyn6');
|
||||||
|
insert into "user" (name) values ('dokieran7');
|
||||||
|
insert into "user" (name) values ('pdrinkel8');
|
||||||
|
|
||||||
|
insert into game (user_id, score, playtime, date) values ('1', 74, '19:59', '2022-07-19');
|
||||||
|
insert into game (user_id, score, playtime, date) values ('1', 86, '20:32', '2022-11-24');
|
||||||
|
insert into game (user_id, score, playtime, date) values ('1', 68, '10:41', '2022-03-24');
|
||||||
|
insert into game (user_id, score, playtime, date) values ('2', 39, '5:55', '2022-06-01');
|
||||||
|
insert into game (user_id, score, playtime, date) values ('2', 20, '9:23', '2022-03-12');
|
||||||
|
insert into game (user_id, score, playtime, date) values ('2', 28, '23:45', '2022-04-01');
|
||||||
|
insert into game (user_id, score, playtime, date) values ('2', 44, '18:43', '2022-06-24');
|
||||||
|
insert into game (user_id, score, playtime, date) values ('3', 92, '14:54', '2022-11-06');
|
||||||
|
insert into game (user_id, score, playtime, date) values ('3', 73, '0:45', '2022-07-26');
|
||||||
|
insert into game (user_id, score, playtime, date) values ('3', 27, '2:49', '2022-02-03');
|
||||||
|
insert into game (user_id, score, playtime, date) values ('4', 26, '2:32', '2022-07-19');
|
||||||
|
insert into game (user_id, score, playtime, date) values ('4', 12, '17:03', '2022-04-25');
|
||||||
|
insert into game (user_id, score, playtime, date) values ('4', 6, '8:49', '2021-12-03');
|
||||||
|
insert into game (user_id, score, playtime, date) values ('4', 22, '22:27', '2022-03-02');
|
||||||
|
insert into game (user_id, score, playtime, date) values ('5', 94, '1:04', '2022-10-19');
|
||||||
|
insert into game (user_id, score, playtime, date) values ('5', 2, '2:14', '2022-04-06');
|
||||||
|
insert into game (user_id, score, playtime, date) values ('5', 21, '17:18', '2022-06-03');
|
||||||
|
insert into game (user_id, score, playtime, date) values ('6', 33, '16:01', '2022-02-02');
|
||||||
|
insert into game (user_id, score, playtime, date) values ('6', 27, '7:03', '2022-02-06');
|
||||||
|
insert into game (user_id, score, playtime, date) values ('6', 62, '0:45', '2022-11-15');
|
||||||
|
insert into game (user_id, score, playtime, date) values ('7', 12, '8:54', '2022-06-29');
|
||||||
|
insert into game (user_id, score, playtime, date) values ('7', 63, '16:01', '2022-11-05');
|
||||||
|
insert into game (user_id, score, playtime, date) values ('7', 29, '0:46', '2022-10-01');
|
||||||
|
insert into game (user_id, score, playtime, date) values ('8', 67, '1:27', '2022-09-29');
|
||||||
|
insert into game (user_id, score, playtime, date) values ('8', 84, '10:37', '2021-12-18');
|
||||||
|
insert into game (user_id, score, playtime, date) values ('8', 14, '19:14', '2022-01-31');
|
||||||
|
insert into game (user_id, score, playtime, date) values ('9', 21, '19:04', '2022-03-08');
|
||||||
|
insert into game (user_id, score, playtime, date) values ('9', 46, '2:34', '2022-04-18');
|
||||||
|
insert into game (user_id, score, playtime, date) values ('9', 78, '9:33', '2022-09-10');
|
||||||
|
insert into game (user_id, score, playtime, date) values ('9', 82, '11:19', '2022-11-29');
|
||||||
|
|
@ -21,12 +21,3 @@ services:
|
||||||
ports:
|
ports:
|
||||||
- "${EXPRESS_PORT}:3000"
|
- "${EXPRESS_PORT}:3000"
|
||||||
|
|
||||||
vue:
|
|
||||||
build: frontend
|
|
||||||
container_name: frontend
|
|
||||||
ports:
|
|
||||||
- "${FRONTEND_PORT}:8080"
|
|
||||||
|
|
||||||
|
|
||||||
volumes:
|
|
||||||
- ./frontend:/app
|
|
||||||
|
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
TypeDoc added this file to prevent GitHub Pages from using Jekyll. You can turn off this behavior by setting the `githubPages` option to false.
|
|
||||||
|
|
@ -1,64 +0,0 @@
|
||||||
:root {
|
|
||||||
--light-hl-0: #AF00DB;
|
|
||||||
--dark-hl-0: #C586C0;
|
|
||||||
--light-hl-1: #000000;
|
|
||||||
--dark-hl-1: #D4D4D4;
|
|
||||||
--light-hl-2: #267F99;
|
|
||||||
--dark-hl-2: #4EC9B0;
|
|
||||||
--light-hl-3: #795E26;
|
|
||||||
--dark-hl-3: #DCDCAA;
|
|
||||||
--light-hl-4: #0000FF;
|
|
||||||
--dark-hl-4: #569CD6;
|
|
||||||
--light-hl-5: #001080;
|
|
||||||
--dark-hl-5: #9CDCFE;
|
|
||||||
--light-code-background: #FFFFFF;
|
|
||||||
--dark-code-background: #1E1E1E;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (prefers-color-scheme: light) { :root {
|
|
||||||
--hl-0: var(--light-hl-0);
|
|
||||||
--hl-1: var(--light-hl-1);
|
|
||||||
--hl-2: var(--light-hl-2);
|
|
||||||
--hl-3: var(--light-hl-3);
|
|
||||||
--hl-4: var(--light-hl-4);
|
|
||||||
--hl-5: var(--light-hl-5);
|
|
||||||
--code-background: var(--light-code-background);
|
|
||||||
} }
|
|
||||||
|
|
||||||
@media (prefers-color-scheme: dark) { :root {
|
|
||||||
--hl-0: var(--dark-hl-0);
|
|
||||||
--hl-1: var(--dark-hl-1);
|
|
||||||
--hl-2: var(--dark-hl-2);
|
|
||||||
--hl-3: var(--dark-hl-3);
|
|
||||||
--hl-4: var(--dark-hl-4);
|
|
||||||
--hl-5: var(--dark-hl-5);
|
|
||||||
--code-background: var(--dark-code-background);
|
|
||||||
} }
|
|
||||||
|
|
||||||
:root[data-theme='light'] {
|
|
||||||
--hl-0: var(--light-hl-0);
|
|
||||||
--hl-1: var(--light-hl-1);
|
|
||||||
--hl-2: var(--light-hl-2);
|
|
||||||
--hl-3: var(--light-hl-3);
|
|
||||||
--hl-4: var(--light-hl-4);
|
|
||||||
--hl-5: var(--light-hl-5);
|
|
||||||
--code-background: var(--light-code-background);
|
|
||||||
}
|
|
||||||
|
|
||||||
:root[data-theme='dark'] {
|
|
||||||
--hl-0: var(--dark-hl-0);
|
|
||||||
--hl-1: var(--dark-hl-1);
|
|
||||||
--hl-2: var(--dark-hl-2);
|
|
||||||
--hl-3: var(--dark-hl-3);
|
|
||||||
--hl-4: var(--dark-hl-4);
|
|
||||||
--hl-5: var(--dark-hl-5);
|
|
||||||
--code-background: var(--dark-code-background);
|
|
||||||
}
|
|
||||||
|
|
||||||
.hl-0 { color: var(--hl-0); }
|
|
||||||
.hl-1 { color: var(--hl-1); }
|
|
||||||
.hl-2 { color: var(--hl-2); }
|
|
||||||
.hl-3 { color: var(--hl-3); }
|
|
||||||
.hl-4 { color: var(--hl-4); }
|
|
||||||
.hl-5 { color: var(--hl-5); }
|
|
||||||
pre, code { background: var(--code-background); }
|
|
||||||
|
|
@ -1,286 +0,0 @@
|
||||||
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Entity | Raspberry Rocketeer Docs</title><meta name="description" content="Documentation for Raspberry Rocketeer Docs"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
|
|
||||||
<div class="tsd-toolbar-contents container">
|
|
||||||
<div class="table-cell" id="tsd-search" data-base="..">
|
|
||||||
<div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
|
|
||||||
<div class="field">
|
|
||||||
<div id="tsd-toolbar-links"></div></div>
|
|
||||||
<ul class="results">
|
|
||||||
<li class="state loading">Preparing search index...</li>
|
|
||||||
<li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">Raspberry Rocketeer Docs</a></div>
|
|
||||||
<div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
|
|
||||||
<div class="container container-main">
|
|
||||||
<div class="col-8 col-content">
|
|
||||||
<div class="tsd-page-title">
|
|
||||||
<ul class="tsd-breadcrumb">
|
|
||||||
<li><a href="../modules.html">Raspberry Rocketeer Docs</a></li>
|
|
||||||
<li><a href="../modules/Entity.html">Entity</a></li>
|
|
||||||
<li><a href="Entity.Entity.html">Entity</a></li></ul>
|
|
||||||
<h1>Class Entity<code class="tsd-tag ts-flagAbstract">Abstract</code> </h1></div>
|
|
||||||
<section class="tsd-panel tsd-comment">
|
|
||||||
<div class="tsd-comment tsd-typography"><p>General rectangular entities.</p>
|
|
||||||
</div></section>
|
|
||||||
<section class="tsd-panel tsd-hierarchy">
|
|
||||||
<h4>Hierarchy</h4>
|
|
||||||
<ul class="tsd-hierarchy">
|
|
||||||
<li><span class="target">Entity</span>
|
|
||||||
<ul class="tsd-hierarchy">
|
|
||||||
<li><a href="Obstacle.Obstacle.html" class="tsd-signature-type" data-tsd-kind="Class">Obstacle</a></li>
|
|
||||||
<li><a href="Pipe.Pipe.html" class="tsd-signature-type" data-tsd-kind="Class">Pipe</a></li>
|
|
||||||
<li><a href="Raspberry.Raspberry.html" class="tsd-signature-type" data-tsd-kind="Class">Raspberry</a></li></ul></li></ul></section><aside class="tsd-sources">
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Entity.ts#L4">Entity.ts:4</a></li></ul></aside>
|
|
||||||
<section class="tsd-panel-group tsd-index-group">
|
|
||||||
<section class="tsd-panel tsd-index-panel">
|
|
||||||
<details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
|
|
||||||
<h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex=0><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M1.5 5.50969L8 11.6609L14.5 5.50969L12.5466 3.66086L8 7.96494L3.45341 3.66086L1.5 5.50969Z" fill="var(--color-text)"></path></svg> Index</h5></summary>
|
|
||||||
<div class="tsd-accordion-details">
|
|
||||||
<section class="tsd-index-section">
|
|
||||||
<h3 class="tsd-index-heading">Constructors</h3>
|
|
||||||
<div class="tsd-index-list"><a href="Entity.Entity.html#constructor" class="tsd-index-link tsd-kind-constructor tsd-parent-kind-class tsd-is-protected"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#4D7FFF" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-512-path"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)" id="icon-512-text"></path></svg><span>constructor</span></a>
|
|
||||||
</div></section>
|
|
||||||
<section class="tsd-index-section">
|
|
||||||
<h3 class="tsd-index-heading">Properties</h3>
|
|
||||||
<div class="tsd-index-list"><a href="Entity.Entity.html#_height" class="tsd-index-link tsd-kind-property tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#FF984D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-1024-path"></rect><path d="M9.354 16V7.24H12.174C12.99 7.24 13.638 7.476 14.118 7.948C14.606 8.412 14.85 9.036 14.85 9.82C14.85 10.604 14.606 11.232 14.118 11.704C13.638 12.168 12.99 12.4 12.174 12.4H10.434V16H9.354ZM10.434 11.428H12.174C12.646 11.428 13.022 11.284 13.302 10.996C13.59 10.7 13.734 10.308 13.734 9.82C13.734 9.324 13.59 8.932 13.302 8.644C13.022 8.356 12.646 8.212 12.174 8.212H10.434V11.428Z" fill="var(--color-text)" id="icon-1024-text"></path></svg><span>_height</span></a>
|
|
||||||
<a href="Entity.Entity.html#_position" class="tsd-index-link tsd-kind-property tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>_position</span></a>
|
|
||||||
<a href="Entity.Entity.html#_showHitbox" class="tsd-index-link tsd-kind-property tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>_show<wbr/>Hitbox</span></a>
|
|
||||||
<a href="Entity.Entity.html#_width" class="tsd-index-link tsd-kind-property tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>_width</span></a>
|
|
||||||
<a href="Entity.Entity.html#fill" class="tsd-index-link tsd-kind-property tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>fill</span></a>
|
|
||||||
</div></section>
|
|
||||||
<section class="tsd-index-section">
|
|
||||||
<h3 class="tsd-index-heading">Accessors</h3>
|
|
||||||
<div class="tsd-index-list"><a href="Entity.Entity.html#height" class="tsd-index-link tsd-kind-accessor tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#FF4D4D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-262144-path"></rect><path d="M8.85 16L11.13 7.24H12.582L14.85 16H13.758L13.182 13.672H10.53L9.954 16H8.85ZM10.746 12.76H12.954L12.282 10.06C12.154 9.548 12.054 9.12 11.982 8.776C11.91 8.432 11.866 8.208 11.85 8.104C11.834 8.208 11.79 8.432 11.718 8.776C11.646 9.12 11.546 9.544 11.418 10.048L10.746 12.76Z" fill="var(--color-text)" id="icon-262144-text"></path></svg><span>height</span></a>
|
|
||||||
<a href="Entity.Entity.html#position" class="tsd-index-link tsd-kind-accessor tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg><span>position</span></a>
|
|
||||||
<a href="Entity.Entity.html#showHitbox" class="tsd-index-link tsd-kind-accessor tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg><span>show<wbr/>Hitbox</span></a>
|
|
||||||
<a href="Entity.Entity.html#width" class="tsd-index-link tsd-kind-accessor tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg><span>width</span></a>
|
|
||||||
</div></section>
|
|
||||||
<section class="tsd-index-section">
|
|
||||||
<h3 class="tsd-index-heading">Methods</h3>
|
|
||||||
<div class="tsd-index-list"><a href="Entity.Entity.html#draw" class="tsd-index-link tsd-kind-method tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#FF4DB8" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-2048-path"></rect><path d="M9.162 16V7.24H10.578L11.514 10.072C11.602 10.328 11.674 10.584 11.73 10.84C11.794 11.088 11.842 11.28 11.874 11.416C11.906 11.28 11.954 11.088 12.018 10.84C12.082 10.584 12.154 10.324 12.234 10.06L13.122 7.24H14.538V16H13.482V12.82C13.482 12.468 13.49 12.068 13.506 11.62C13.53 11.172 13.558 10.716 13.59 10.252C13.622 9.78 13.654 9.332 13.686 8.908C13.726 8.476 13.762 8.1 13.794 7.78L12.366 12.16H11.334L9.894 7.78C9.934 8.092 9.97 8.456 10.002 8.872C10.042 9.28 10.078 9.716 10.11 10.18C10.142 10.636 10.166 11.092 10.182 11.548C10.206 12.004 10.218 12.428 10.218 12.82V16H9.162Z" fill="var(--color-text)" id="icon-2048-text"></path></svg><span>draw</span></a>
|
|
||||||
<a href="Entity.Entity.html#update" class="tsd-index-link tsd-kind-method tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>update</span></a>
|
|
||||||
</div></section></div></details></section></section>
|
|
||||||
<section class="tsd-panel-group tsd-member-group">
|
|
||||||
<h2>Constructors</h2>
|
|
||||||
<section class="tsd-panel tsd-member tsd-kind-constructor tsd-parent-kind-class tsd-is-protected"><a id="constructor" class="tsd-anchor"></a>
|
|
||||||
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none" id="icon-anchor-a"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5" id="icon-anchor-b"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5" id="icon-anchor-c"></path></svg></a></h3>
|
|
||||||
<ul class="tsd-signatures tsd-kind-constructor tsd-parent-kind-class tsd-is-protected">
|
|
||||||
<li class="tsd-signature tsd-anchor-link" id="constructor.new_Entity">new <wbr/>Entity<span class="tsd-signature-symbol">(</span>position<span class="tsd-signature-symbol">: </span><a href="Position.Position.html" class="tsd-signature-type" data-tsd-kind="Class">Position</a>, width<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, height<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, fill<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="Entity.Entity.html" class="tsd-signature-type" data-tsd-kind="Class">Entity</a><a href="#constructor.new_Entity" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
|
||||||
<li class="tsd-description">
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Constructs the Entity.</p>
|
|
||||||
</div>
|
|
||||||
<div class="tsd-parameters">
|
|
||||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
||||||
<ul class="tsd-parameter-list">
|
|
||||||
<li>
|
|
||||||
<h5>position: <a href="Position.Position.html" class="tsd-signature-type" data-tsd-kind="Class">Position</a></h5>
|
|
||||||
<div class="tsd-comment tsd-typography"><p>starting Position</p>
|
|
||||||
</div></li>
|
|
||||||
<li>
|
|
||||||
<h5>width: <span class="tsd-signature-type">number</span></h5>
|
|
||||||
<div class="tsd-comment tsd-typography"><p>entity width</p>
|
|
||||||
</div></li>
|
|
||||||
<li>
|
|
||||||
<h5>height: <span class="tsd-signature-type">number</span></h5>
|
|
||||||
<div class="tsd-comment tsd-typography"><p>entity height</p>
|
|
||||||
</div></li>
|
|
||||||
<li>
|
|
||||||
<h5>fill: <span class="tsd-signature-type">number</span></h5>
|
|
||||||
<div class="tsd-comment tsd-typography"><p>fill color</p>
|
|
||||||
</div></li></ul></div>
|
|
||||||
<h4 class="tsd-returns-title">Returns <a href="Entity.Entity.html" class="tsd-signature-type" data-tsd-kind="Class">Entity</a></h4><aside class="tsd-sources">
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Entity.ts#L105">Entity.ts:105</a></li></ul></aside></li></ul></section></section>
|
|
||||||
<section class="tsd-panel-group tsd-member-group">
|
|
||||||
<h2>Properties</h2>
|
|
||||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-private"><a id="_height" class="tsd-anchor"></a>
|
|
||||||
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>_height</span><a href="#_height" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
||||||
<div class="tsd-signature">_height<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Height.</p>
|
|
||||||
</div><aside class="tsd-sources">
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Entity.ts#L21">Entity.ts:21</a></li></ul></aside></section>
|
|
||||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-private"><a id="_position" class="tsd-anchor"></a>
|
|
||||||
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>_position</span><a href="#_position" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
||||||
<div class="tsd-signature">_position<span class="tsd-signature-symbol">:</span> <a href="Position.Position.html" class="tsd-signature-type" data-tsd-kind="Class">Position</a></div>
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Position.</p>
|
|
||||||
</div><aside class="tsd-sources">
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Entity.ts#L9">Entity.ts:9</a></li></ul></aside></section>
|
|
||||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-private"><a id="_showHitbox" class="tsd-anchor"></a>
|
|
||||||
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>_show<wbr/>Hitbox</span><a href="#_showHitbox" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
||||||
<div class="tsd-signature">_show<wbr/>Hitbox<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div>
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Whether the hitbox (rectangular surrounding) is shown, or not.</p>
|
|
||||||
</div><aside class="tsd-sources">
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Entity.ts#L33">Entity.ts:33</a></li></ul></aside></section>
|
|
||||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-private"><a id="_width" class="tsd-anchor"></a>
|
|
||||||
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>_width</span><a href="#_width" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
||||||
<div class="tsd-signature">_width<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Width.</p>
|
|
||||||
</div><aside class="tsd-sources">
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Entity.ts#L15">Entity.ts:15</a></li></ul></aside></section>
|
|
||||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-private"><a id="fill" class="tsd-anchor"></a>
|
|
||||||
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>fill</span><a href="#fill" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
||||||
<div class="tsd-signature">fill<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Color.</p>
|
|
||||||
</div><aside class="tsd-sources">
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Entity.ts#L27">Entity.ts:27</a></li></ul></aside></section></section>
|
|
||||||
<section class="tsd-panel-group tsd-member-group">
|
|
||||||
<h2>Accessors</h2>
|
|
||||||
<section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="height" class="tsd-anchor"></a>
|
|
||||||
<h3 class="tsd-anchor-link"><span>height</span><a href="#height" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
||||||
<ul class="tsd-signatures tsd-kind-accessor tsd-parent-kind-class">
|
|
||||||
<li class="tsd-signature" id="height.height-1"><span class="tsd-signature-symbol">get</span> height<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li>
|
|
||||||
<li class="tsd-description">
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Get height.</p>
|
|
||||||
</div>
|
|
||||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources">
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Entity.ts#L70">Entity.ts:70</a></li></ul></aside></li>
|
|
||||||
<li class="tsd-signature" id="height.height-2"><span class="tsd-signature-symbol">set</span> height<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
|
|
||||||
<li class="tsd-description">
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Set height.</p>
|
|
||||||
</div>
|
|
||||||
<div class="tsd-parameters">
|
|
||||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
||||||
<ul class="tsd-parameter-list">
|
|
||||||
<li>
|
|
||||||
<h5>value: <span class="tsd-signature-type">number</span></h5></li></ul></div>
|
|
||||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Entity.ts#L78">Entity.ts:78</a></li></ul></aside></li></ul></section>
|
|
||||||
<section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="position" class="tsd-anchor"></a>
|
|
||||||
<h3 class="tsd-anchor-link"><span>position</span><a href="#position" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
||||||
<ul class="tsd-signatures tsd-kind-accessor tsd-parent-kind-class">
|
|
||||||
<li class="tsd-signature" id="position.position-1"><span class="tsd-signature-symbol">get</span> position<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="Position.Position.html" class="tsd-signature-type" data-tsd-kind="Class">Position</a></li>
|
|
||||||
<li class="tsd-description">
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Get position.</p>
|
|
||||||
</div>
|
|
||||||
<h4 class="tsd-returns-title">Returns <a href="Position.Position.html" class="tsd-signature-type" data-tsd-kind="Class">Position</a></h4><aside class="tsd-sources">
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Entity.ts#L40">Entity.ts:40</a></li></ul></aside></li>
|
|
||||||
<li class="tsd-signature" id="position.position-2"><span class="tsd-signature-symbol">set</span> position<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><a href="Position.Position.html" class="tsd-signature-type" data-tsd-kind="Class">Position</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
|
|
||||||
<li class="tsd-description">
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Set position.</p>
|
|
||||||
</div>
|
|
||||||
<div class="tsd-parameters">
|
|
||||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
||||||
<ul class="tsd-parameter-list">
|
|
||||||
<li>
|
|
||||||
<h5>value: <a href="Position.Position.html" class="tsd-signature-type" data-tsd-kind="Class">Position</a></h5></li></ul></div>
|
|
||||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Entity.ts#L48">Entity.ts:48</a></li></ul></aside></li></ul></section>
|
|
||||||
<section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="showHitbox" class="tsd-anchor"></a>
|
|
||||||
<h3 class="tsd-anchor-link"><span>show<wbr/>Hitbox</span><a href="#showHitbox" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
||||||
<ul class="tsd-signatures tsd-kind-accessor tsd-parent-kind-class">
|
|
||||||
<li class="tsd-signature" id="showHitbox.showHitbox-1"><span class="tsd-signature-symbol">get</span> showHitbox<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
|
|
||||||
<li class="tsd-description">
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Get the hitbox's visibility.</p>
|
|
||||||
</div>
|
|
||||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><aside class="tsd-sources">
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Entity.ts#L85">Entity.ts:85</a></li></ul></aside></li>
|
|
||||||
<li class="tsd-signature" id="showHitbox.showHitbox-2"><span class="tsd-signature-symbol">set</span> showHitbox<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
|
|
||||||
<li class="tsd-description">
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Set the hitbox's visibility.</p>
|
|
||||||
</div>
|
|
||||||
<div class="tsd-parameters">
|
|
||||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
||||||
<ul class="tsd-parameter-list">
|
|
||||||
<li>
|
|
||||||
<h5>value: <span class="tsd-signature-type">boolean</span></h5></li></ul></div>
|
|
||||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Entity.ts#L93">Entity.ts:93</a></li></ul></aside></li></ul></section>
|
|
||||||
<section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="width" class="tsd-anchor"></a>
|
|
||||||
<h3 class="tsd-anchor-link"><span>width</span><a href="#width" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
||||||
<ul class="tsd-signatures tsd-kind-accessor tsd-parent-kind-class">
|
|
||||||
<li class="tsd-signature" id="width.width-1"><span class="tsd-signature-symbol">get</span> width<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li>
|
|
||||||
<li class="tsd-description">
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Get width.</p>
|
|
||||||
</div>
|
|
||||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources">
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Entity.ts#L55">Entity.ts:55</a></li></ul></aside></li>
|
|
||||||
<li class="tsd-signature" id="width.width-2"><span class="tsd-signature-symbol">set</span> width<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
|
|
||||||
<li class="tsd-description">
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Set width.</p>
|
|
||||||
</div>
|
|
||||||
<div class="tsd-parameters">
|
|
||||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
||||||
<ul class="tsd-parameter-list">
|
|
||||||
<li>
|
|
||||||
<h5>value: <span class="tsd-signature-type">number</span></h5></li></ul></div>
|
|
||||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Entity.ts#L63">Entity.ts:63</a></li></ul></aside></li></ul></section></section>
|
|
||||||
<section class="tsd-panel-group tsd-member-group">
|
|
||||||
<h2>Methods</h2>
|
|
||||||
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="draw" class="tsd-anchor"></a>
|
|
||||||
<h3 class="tsd-anchor-link"><span>draw</span><a href="#draw" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
||||||
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
|
|
||||||
<li class="tsd-signature tsd-anchor-link" id="draw.draw-1">draw<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#draw.draw-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
|
||||||
<li class="tsd-description">
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Draws the entity.</p>
|
|
||||||
</div>
|
|
||||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Entity.ts#L121">Entity.ts:121</a></li></ul></aside></li></ul></section>
|
|
||||||
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="update" class="tsd-anchor"></a>
|
|
||||||
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagAbstract">Abstract</code> <span>update</span><a href="#update" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
||||||
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
|
|
||||||
<li class="tsd-signature tsd-anchor-link" id="update.update-1">update<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#update.update-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
|
||||||
<li class="tsd-description">
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Updates the entity.</p>
|
|
||||||
</div>
|
|
||||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Entity.ts#L116">Entity.ts:116</a></li></ul></aside></li></ul></section></section></div>
|
|
||||||
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
|
|
||||||
<div class="tsd-navigation settings">
|
|
||||||
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
|
|
||||||
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg> Settings</h3></summary>
|
|
||||||
<div class="tsd-accordion-details">
|
|
||||||
<div class="tsd-filter-visibility">
|
|
||||||
<h4 class="uppercase">Member Visibility</h4><form>
|
|
||||||
<ul id="tsd-filter-options">
|
|
||||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li>
|
|
||||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-private" name="private"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Private</span></label></li>
|
|
||||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li>
|
|
||||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></form></div>
|
|
||||||
<div class="tsd-theme-toggle">
|
|
||||||
<h4 class="uppercase">Theme</h4><select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div>
|
|
||||||
<nav class="tsd-navigation primary">
|
|
||||||
<details class="tsd-index-accordion" open><summary class="tsd-accordion-summary">
|
|
||||||
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg> Modules</h3></summary>
|
|
||||||
<div class="tsd-accordion-details">
|
|
||||||
<ul>
|
|
||||||
<li class="current"><a href="../modules.html">Raspberry <wbr/>Rocketeer <wbr/>Docs</a>
|
|
||||||
<ul>
|
|
||||||
<li class="tsd-kind-module"><a href="../modules/Collidable.html">Collidable</a></li>
|
|
||||||
<li class="current selected tsd-kind-module"><a href="../modules/Entity.html">Entity</a></li>
|
|
||||||
<li class="tsd-kind-module"><a href="../modules/Obstacle.html">Obstacle</a></li>
|
|
||||||
<li class="tsd-kind-module"><a href="../modules/Pipe.html">Pipe</a></li>
|
|
||||||
<li class="tsd-kind-module"><a href="../modules/Position.html">Position</a></li>
|
|
||||||
<li class="tsd-kind-module"><a href="../modules/Raspberry.html">Raspberry</a></li></ul></li></ul></div></details></nav>
|
|
||||||
<nav class="tsd-navigation secondary menu-sticky">
|
|
||||||
<ul>
|
|
||||||
<li class="current tsd-kind-class tsd-parent-kind-module"><a href="Entity.Entity.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-128-path"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)" id="icon-128-text"></path></svg><span>Entity</span></a>
|
|
||||||
<ul>
|
|
||||||
<li class="tsd-kind-constructor tsd-parent-kind-class tsd-is-protected"><a href="Entity.Entity.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-512-path"></use><use href="#icon-512-text"></use></svg>constructor</a></li>
|
|
||||||
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><a href="Entity.Entity.html#_height" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>_height</a></li>
|
|
||||||
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><a href="Entity.Entity.html#_position" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>_position</a></li>
|
|
||||||
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><a href="Entity.Entity.html#_showHitbox" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>_show<wbr/>Hitbox</a></li>
|
|
||||||
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><a href="Entity.Entity.html#_width" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>_width</a></li>
|
|
||||||
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><a href="Entity.Entity.html#fill" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>fill</a></li>
|
|
||||||
<li class="tsd-kind-accessor tsd-parent-kind-class"><a href="Entity.Entity.html#height" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg>height</a></li>
|
|
||||||
<li class="tsd-kind-accessor tsd-parent-kind-class"><a href="Entity.Entity.html#position" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg>position</a></li>
|
|
||||||
<li class="tsd-kind-accessor tsd-parent-kind-class"><a href="Entity.Entity.html#showHitbox" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg>show<wbr/>Hitbox</a></li>
|
|
||||||
<li class="tsd-kind-accessor tsd-parent-kind-class"><a href="Entity.Entity.html#width" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg>width</a></li>
|
|
||||||
<li class="tsd-kind-method tsd-parent-kind-class"><a href="Entity.Entity.html#draw" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg>draw</a></li>
|
|
||||||
<li class="tsd-kind-method tsd-parent-kind-class"><a href="Entity.Entity.html#update" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg>update</a></li></ul></li></ul></nav></div></div>
|
|
||||||
<div class="container tsd-generator">
|
|
||||||
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div>
|
|
||||||
<div class="overlay"></div><script src="../assets/main.js"></script></body></html>
|
|
||||||
|
|
@ -1,417 +0,0 @@
|
||||||
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Obstacle | Raspberry Rocketeer Docs</title><meta name="description" content="Documentation for Raspberry Rocketeer Docs"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
|
|
||||||
<div class="tsd-toolbar-contents container">
|
|
||||||
<div class="table-cell" id="tsd-search" data-base="..">
|
|
||||||
<div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
|
|
||||||
<div class="field">
|
|
||||||
<div id="tsd-toolbar-links"></div></div>
|
|
||||||
<ul class="results">
|
|
||||||
<li class="state loading">Preparing search index...</li>
|
|
||||||
<li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">Raspberry Rocketeer Docs</a></div>
|
|
||||||
<div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
|
|
||||||
<div class="container container-main">
|
|
||||||
<div class="col-8 col-content">
|
|
||||||
<div class="tsd-page-title">
|
|
||||||
<ul class="tsd-breadcrumb">
|
|
||||||
<li><a href="../modules.html">Raspberry Rocketeer Docs</a></li>
|
|
||||||
<li><a href="../modules/Obstacle.html">Obstacle</a></li>
|
|
||||||
<li><a href="Obstacle.Obstacle.html">Obstacle</a></li></ul>
|
|
||||||
<h1>Class Obstacle</h1></div>
|
|
||||||
<section class="tsd-panel tsd-comment">
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Obstacle of the game. Built from 2 pipes, one at the bottom, one at the top.</p>
|
|
||||||
</div></section>
|
|
||||||
<section class="tsd-panel tsd-hierarchy">
|
|
||||||
<h4>Hierarchy</h4>
|
|
||||||
<ul class="tsd-hierarchy">
|
|
||||||
<li><a href="Entity.Entity.html" class="tsd-signature-type" data-tsd-kind="Class">Entity</a>
|
|
||||||
<ul class="tsd-hierarchy">
|
|
||||||
<li><span class="target">Obstacle</span></li></ul></li></ul></section>
|
|
||||||
<section class="tsd-panel">
|
|
||||||
<h4>Implements</h4>
|
|
||||||
<ul class="tsd-hierarchy">
|
|
||||||
<li><a href="../interfaces/Collidable.Collidable.html" class="tsd-signature-type" data-tsd-kind="Interface">Collidable</a></li></ul></section><aside class="tsd-sources">
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Obstacle.ts#L4">Obstacle.ts:4</a></li></ul></aside>
|
|
||||||
<section class="tsd-panel-group tsd-index-group">
|
|
||||||
<section class="tsd-panel tsd-index-panel">
|
|
||||||
<details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
|
|
||||||
<h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex=0><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M1.5 5.50969L8 11.6609L14.5 5.50969L12.5466 3.66086L8 7.96494L3.45341 3.66086L1.5 5.50969Z" fill="var(--color-text)"></path></svg> Index</h5></summary>
|
|
||||||
<div class="tsd-accordion-details">
|
|
||||||
<section class="tsd-index-section">
|
|
||||||
<h3 class="tsd-index-heading">Constructors</h3>
|
|
||||||
<div class="tsd-index-list"><a href="Obstacle.Obstacle.html#constructor" class="tsd-index-link tsd-kind-constructor tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#4D7FFF" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-512-path"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)" id="icon-512-text"></path></svg><span>constructor</span></a>
|
|
||||||
</div></section>
|
|
||||||
<section class="tsd-index-section">
|
|
||||||
<h3 class="tsd-index-heading">Properties</h3>
|
|
||||||
<div class="tsd-index-list"><a href="Obstacle.Obstacle.html#padding" class="tsd-index-link tsd-kind-property tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#FF984D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-1024-path"></rect><path d="M9.354 16V7.24H12.174C12.99 7.24 13.638 7.476 14.118 7.948C14.606 8.412 14.85 9.036 14.85 9.82C14.85 10.604 14.606 11.232 14.118 11.704C13.638 12.168 12.99 12.4 12.174 12.4H10.434V16H9.354ZM10.434 11.428H12.174C12.646 11.428 13.022 11.284 13.302 10.996C13.59 10.7 13.734 10.308 13.734 9.82C13.734 9.324 13.59 8.932 13.302 8.644C13.022 8.356 12.646 8.212 12.174 8.212H10.434V11.428Z" fill="var(--color-text)" id="icon-1024-text"></path></svg><span>padding</span></a>
|
|
||||||
<a href="Obstacle.Obstacle.html#pipeBottom" class="tsd-index-link tsd-kind-property tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>pipe<wbr/>Bottom</span></a>
|
|
||||||
<a href="Obstacle.Obstacle.html#pipeTop" class="tsd-index-link tsd-kind-property tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>pipe<wbr/>Top</span></a>
|
|
||||||
<a href="Obstacle.Obstacle.html#speed" class="tsd-index-link tsd-kind-property tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>speed</span></a>
|
|
||||||
<a href="Obstacle.Obstacle.html#_distanceBetweenPipes" class="tsd-index-link tsd-kind-property tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>_distance<wbr/>Between<wbr/>Pipes</span></a>
|
|
||||||
<a href="Obstacle.Obstacle.html#_startX" class="tsd-index-link tsd-kind-property tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>_startX</span></a>
|
|
||||||
</div></section>
|
|
||||||
<section class="tsd-index-section">
|
|
||||||
<h3 class="tsd-index-heading">Accessors</h3>
|
|
||||||
<div class="tsd-index-list"><a href="Obstacle.Obstacle.html#height" class="tsd-index-link tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#FF4D4D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-262144-path"></rect><path d="M8.85 16L11.13 7.24H12.582L14.85 16H13.758L13.182 13.672H10.53L9.954 16H8.85ZM10.746 12.76H12.954L12.282 10.06C12.154 9.548 12.054 9.12 11.982 8.776C11.91 8.432 11.866 8.208 11.85 8.104C11.834 8.208 11.79 8.432 11.718 8.776C11.646 9.12 11.546 9.544 11.418 10.048L10.746 12.76Z" fill="var(--color-text)" id="icon-262144-text"></path></svg><span>height</span></a>
|
|
||||||
<a href="Obstacle.Obstacle.html#position" class="tsd-index-link tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg><span>position</span></a>
|
|
||||||
<a href="Obstacle.Obstacle.html#showHitbox" class="tsd-index-link tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg><span>show<wbr/>Hitbox</span></a>
|
|
||||||
<a href="Obstacle.Obstacle.html#width" class="tsd-index-link tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg><span>width</span></a>
|
|
||||||
<a href="Obstacle.Obstacle.html#distanceBetweenPipes" class="tsd-index-link tsd-kind-accessor tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg><span>distance<wbr/>Between<wbr/>Pipes</span></a>
|
|
||||||
<a href="Obstacle.Obstacle.html#startX" class="tsd-index-link tsd-kind-accessor tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg><span>startX</span></a>
|
|
||||||
</div></section>
|
|
||||||
<section class="tsd-index-section">
|
|
||||||
<h3 class="tsd-index-heading">Methods</h3>
|
|
||||||
<div class="tsd-index-list"><a href="Obstacle.Obstacle.html#collides" class="tsd-index-link tsd-kind-method tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#FF4DB8" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-2048-path"></rect><path d="M9.162 16V7.24H10.578L11.514 10.072C11.602 10.328 11.674 10.584 11.73 10.84C11.794 11.088 11.842 11.28 11.874 11.416C11.906 11.28 11.954 11.088 12.018 10.84C12.082 10.584 12.154 10.324 12.234 10.06L13.122 7.24H14.538V16H13.482V12.82C13.482 12.468 13.49 12.068 13.506 11.62C13.53 11.172 13.558 10.716 13.59 10.252C13.622 9.78 13.654 9.332 13.686 8.908C13.726 8.476 13.762 8.1 13.794 7.78L12.366 12.16H11.334L9.894 7.78C9.934 8.092 9.97 8.456 10.002 8.872C10.042 9.28 10.078 9.716 10.11 10.18C10.142 10.636 10.166 11.092 10.182 11.548C10.206 12.004 10.218 12.428 10.218 12.82V16H9.162Z" fill="var(--color-text)" id="icon-2048-text"></path></svg><span>collides</span></a>
|
|
||||||
<a href="Obstacle.Obstacle.html#createPipes" class="tsd-index-link tsd-kind-method tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>create<wbr/>Pipes</span></a>
|
|
||||||
<a href="Obstacle.Obstacle.html#draw" class="tsd-index-link tsd-kind-method tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>draw</span></a>
|
|
||||||
<a href="Obstacle.Obstacle.html#randomRange" class="tsd-index-link tsd-kind-method tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>random<wbr/>Range</span></a>
|
|
||||||
<a href="Obstacle.Obstacle.html#randomizeHeight" class="tsd-index-link tsd-kind-method tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>randomize<wbr/>Height</span></a>
|
|
||||||
<a href="Obstacle.Obstacle.html#resetPosition" class="tsd-index-link tsd-kind-method tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>reset<wbr/>Position</span></a>
|
|
||||||
<a href="Obstacle.Obstacle.html#update" class="tsd-index-link tsd-kind-method tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>update</span></a>
|
|
||||||
</div></section></div></details></section></section>
|
|
||||||
<section class="tsd-panel-group tsd-member-group">
|
|
||||||
<h2>Constructors</h2>
|
|
||||||
<section class="tsd-panel tsd-member tsd-kind-constructor tsd-parent-kind-class"><a id="constructor" class="tsd-anchor"></a>
|
|
||||||
<h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none" id="icon-anchor-a"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5" id="icon-anchor-b"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5" id="icon-anchor-c"></path></svg></a></h3>
|
|
||||||
<ul class="tsd-signatures tsd-kind-constructor tsd-parent-kind-class">
|
|
||||||
<li class="tsd-signature tsd-anchor-link" id="constructor.new_Obstacle">new <wbr/>Obstacle<span class="tsd-signature-symbol">(</span>position<span class="tsd-signature-symbol">: </span><a href="Position.Position.html" class="tsd-signature-type" data-tsd-kind="Class">Position</a>, obstacleWidth<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, obstacleHeight<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, pipeImagePath<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="Obstacle.Obstacle.html" class="tsd-signature-type" data-tsd-kind="Class">Obstacle</a><a href="#constructor.new_Obstacle" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
|
||||||
<li class="tsd-description">
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Constructs the Obstacle with the given image.</p>
|
|
||||||
</div>
|
|
||||||
<div class="tsd-parameters">
|
|
||||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
||||||
<ul class="tsd-parameter-list">
|
|
||||||
<li>
|
|
||||||
<h5>position: <a href="Position.Position.html" class="tsd-signature-type" data-tsd-kind="Class">Position</a></h5>
|
|
||||||
<div class="tsd-comment tsd-typography"><p>starting position of the obstacle</p>
|
|
||||||
</div></li>
|
|
||||||
<li>
|
|
||||||
<h5>obstacleWidth: <span class="tsd-signature-type">number</span></h5>
|
|
||||||
<div class="tsd-comment tsd-typography"><p>width of the obstacle</p>
|
|
||||||
</div></li>
|
|
||||||
<li>
|
|
||||||
<h5>obstacleHeight: <span class="tsd-signature-type">number</span></h5>
|
|
||||||
<div class="tsd-comment tsd-typography"><p>height of the obstacle</p>
|
|
||||||
</div></li>
|
|
||||||
<li>
|
|
||||||
<h5>pipeImagePath: <span class="tsd-signature-type">string</span></h5>
|
|
||||||
<div class="tsd-comment tsd-typography"><p>path to the image to be used</p>
|
|
||||||
</div></li></ul></div>
|
|
||||||
<h4 class="tsd-returns-title">Returns <a href="Obstacle.Obstacle.html" class="tsd-signature-type" data-tsd-kind="Class">Obstacle</a></h4><aside class="tsd-sources">
|
|
||||||
<p>Overrides <a href="Entity.Entity.html">Entity</a>.<a href="Entity.Entity.html#constructor">constructor</a></p>
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Obstacle.ts#L28">Obstacle.ts:28</a></li></ul></aside></li></ul></section></section>
|
|
||||||
<section class="tsd-panel-group tsd-member-group">
|
|
||||||
<h2>Properties</h2>
|
|
||||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-private"><a id="padding" class="tsd-anchor"></a>
|
|
||||||
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <code class="tsd-tag ts-flagReadonly">Readonly</code> <span>padding</span><a href="#padding" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
||||||
<div class="tsd-signature">padding<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 150</span></div><aside class="tsd-sources">
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Obstacle.ts#L7">Obstacle.ts:7</a></li></ul></aside></section>
|
|
||||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-private"><a id="pipeBottom" class="tsd-anchor"></a>
|
|
||||||
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>pipe<wbr/>Bottom</span><a href="#pipeBottom" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
||||||
<div class="tsd-signature">pipe<wbr/>Bottom<span class="tsd-signature-symbol">:</span> <a href="Pipe.Pipe.html" class="tsd-signature-type" data-tsd-kind="Class">Pipe</a></div><aside class="tsd-sources">
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Obstacle.ts#L6">Obstacle.ts:6</a></li></ul></aside></section>
|
|
||||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-private"><a id="pipeTop" class="tsd-anchor"></a>
|
|
||||||
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>pipe<wbr/>Top</span><a href="#pipeTop" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
||||||
<div class="tsd-signature">pipe<wbr/>Top<span class="tsd-signature-symbol">:</span> <a href="Pipe.Pipe.html" class="tsd-signature-type" data-tsd-kind="Class">Pipe</a></div><aside class="tsd-sources">
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Obstacle.ts#L5">Obstacle.ts:5</a></li></ul></aside></section>
|
|
||||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-private"><a id="speed" class="tsd-anchor"></a>
|
|
||||||
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <code class="tsd-tag ts-flagReadonly">Readonly</code> <span>speed</span><a href="#speed" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
||||||
<div class="tsd-signature">speed<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 3</span></div><aside class="tsd-sources">
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Obstacle.ts#L8">Obstacle.ts:8</a></li></ul></aside></section>
|
|
||||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-private"><a id="_distanceBetweenPipes" class="tsd-anchor"></a>
|
|
||||||
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <code class="tsd-tag ts-flagPrivate">Private</code> <span>_distance<wbr/>Between<wbr/>Pipes</span><a href="#_distanceBetweenPipes" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
||||||
<div class="tsd-signature">_distance<wbr/>Between<wbr/>Pipes<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources">
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Obstacle.ts#L10">Obstacle.ts:10</a></li></ul></aside></section>
|
|
||||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-private"><a id="_startX" class="tsd-anchor"></a>
|
|
||||||
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <code class="tsd-tag ts-flagPrivate">Private</code> <span>_startX</span><a href="#_startX" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
||||||
<div class="tsd-signature">_startX<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources">
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Obstacle.ts#L11">Obstacle.ts:11</a></li></ul></aside></section></section>
|
|
||||||
<section class="tsd-panel-group tsd-member-group">
|
|
||||||
<h2>Accessors</h2>
|
|
||||||
<section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><a id="height" class="tsd-anchor"></a>
|
|
||||||
<h3 class="tsd-anchor-link"><span>height</span><a href="#height" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
||||||
<ul class="tsd-signatures tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited">
|
|
||||||
<li class="tsd-signature" id="height.height-1"><span class="tsd-signature-symbol">get</span> height<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li>
|
|
||||||
<li class="tsd-description">
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Get height.</p>
|
|
||||||
</div>
|
|
||||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources">
|
|
||||||
<p>Inherited from Entity.height</p>
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Entity.ts#L70">Entity.ts:70</a></li></ul></aside></li>
|
|
||||||
<li class="tsd-signature" id="height.height-2"><span class="tsd-signature-symbol">set</span> height<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
|
|
||||||
<li class="tsd-description">
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Set height.</p>
|
|
||||||
</div>
|
|
||||||
<div class="tsd-parameters">
|
|
||||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
||||||
<ul class="tsd-parameter-list">
|
|
||||||
<li>
|
|
||||||
<h5>value: <span class="tsd-signature-type">number</span></h5></li></ul></div>
|
|
||||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
||||||
<p>Inherited from Entity.height</p>
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Entity.ts#L78">Entity.ts:78</a></li></ul></aside></li></ul></section>
|
|
||||||
<section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><a id="position" class="tsd-anchor"></a>
|
|
||||||
<h3 class="tsd-anchor-link"><span>position</span><a href="#position" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
||||||
<ul class="tsd-signatures tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited">
|
|
||||||
<li class="tsd-signature" id="position.position-1"><span class="tsd-signature-symbol">get</span> position<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="Position.Position.html" class="tsd-signature-type" data-tsd-kind="Class">Position</a></li>
|
|
||||||
<li class="tsd-description">
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Get position.</p>
|
|
||||||
</div>
|
|
||||||
<h4 class="tsd-returns-title">Returns <a href="Position.Position.html" class="tsd-signature-type" data-tsd-kind="Class">Position</a></h4><aside class="tsd-sources">
|
|
||||||
<p>Inherited from Entity.position</p>
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Entity.ts#L40">Entity.ts:40</a></li></ul></aside></li>
|
|
||||||
<li class="tsd-signature" id="position.position-2"><span class="tsd-signature-symbol">set</span> position<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><a href="Position.Position.html" class="tsd-signature-type" data-tsd-kind="Class">Position</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
|
|
||||||
<li class="tsd-description">
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Set position.</p>
|
|
||||||
</div>
|
|
||||||
<div class="tsd-parameters">
|
|
||||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
||||||
<ul class="tsd-parameter-list">
|
|
||||||
<li>
|
|
||||||
<h5>value: <a href="Position.Position.html" class="tsd-signature-type" data-tsd-kind="Class">Position</a></h5></li></ul></div>
|
|
||||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
||||||
<p>Inherited from Entity.position</p>
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Entity.ts#L48">Entity.ts:48</a></li></ul></aside></li></ul></section>
|
|
||||||
<section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><a id="showHitbox" class="tsd-anchor"></a>
|
|
||||||
<h3 class="tsd-anchor-link"><span>show<wbr/>Hitbox</span><a href="#showHitbox" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
||||||
<ul class="tsd-signatures tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited">
|
|
||||||
<li class="tsd-signature" id="showHitbox.showHitbox-1"><span class="tsd-signature-symbol">get</span> showHitbox<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
|
|
||||||
<li class="tsd-description">
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Get the hitbox's visibility.</p>
|
|
||||||
</div>
|
|
||||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><aside class="tsd-sources">
|
|
||||||
<p>Inherited from Entity.showHitbox</p>
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Entity.ts#L85">Entity.ts:85</a></li></ul></aside></li>
|
|
||||||
<li class="tsd-signature" id="showHitbox.showHitbox-2"><span class="tsd-signature-symbol">set</span> showHitbox<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
|
|
||||||
<li class="tsd-description">
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Set the hitbox's visibility.</p>
|
|
||||||
</div>
|
|
||||||
<div class="tsd-parameters">
|
|
||||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
||||||
<ul class="tsd-parameter-list">
|
|
||||||
<li>
|
|
||||||
<h5>value: <span class="tsd-signature-type">boolean</span></h5></li></ul></div>
|
|
||||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
||||||
<p>Inherited from Entity.showHitbox</p>
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Entity.ts#L93">Entity.ts:93</a></li></ul></aside></li></ul></section>
|
|
||||||
<section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><a id="width" class="tsd-anchor"></a>
|
|
||||||
<h3 class="tsd-anchor-link"><span>width</span><a href="#width" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
||||||
<ul class="tsd-signatures tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited">
|
|
||||||
<li class="tsd-signature" id="width.width-1"><span class="tsd-signature-symbol">get</span> width<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li>
|
|
||||||
<li class="tsd-description">
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Get width.</p>
|
|
||||||
</div>
|
|
||||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources">
|
|
||||||
<p>Inherited from Entity.width</p>
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Entity.ts#L55">Entity.ts:55</a></li></ul></aside></li>
|
|
||||||
<li class="tsd-signature" id="width.width-2"><span class="tsd-signature-symbol">set</span> width<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
|
|
||||||
<li class="tsd-description">
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Set width.</p>
|
|
||||||
</div>
|
|
||||||
<div class="tsd-parameters">
|
|
||||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
||||||
<ul class="tsd-parameter-list">
|
|
||||||
<li>
|
|
||||||
<h5>value: <span class="tsd-signature-type">number</span></h5></li></ul></div>
|
|
||||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
||||||
<p>Inherited from Entity.width</p>
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Entity.ts#L63">Entity.ts:63</a></li></ul></aside></li></ul></section>
|
|
||||||
<section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="distanceBetweenPipes" class="tsd-anchor"></a>
|
|
||||||
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <span>distance<wbr/>Between<wbr/>Pipes</span><a href="#distanceBetweenPipes" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
||||||
<ul class="tsd-signatures tsd-kind-accessor tsd-parent-kind-class">
|
|
||||||
<li class="tsd-signature" id="distanceBetweenPipes.distanceBetweenPipes-1"><span class="tsd-signature-symbol">set</span> distanceBetweenPipes<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
|
|
||||||
<li class="tsd-description">
|
|
||||||
<div class="tsd-parameters">
|
|
||||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
||||||
<ul class="tsd-parameter-list">
|
|
||||||
<li>
|
|
||||||
<h5>value: <span class="tsd-signature-type">number</span></h5></li></ul></div>
|
|
||||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Obstacle.ts#L17">Obstacle.ts:17</a></li></ul></aside></li></ul></section>
|
|
||||||
<section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="startX" class="tsd-anchor"></a>
|
|
||||||
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <span>startX</span><a href="#startX" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
||||||
<ul class="tsd-signatures tsd-kind-accessor tsd-parent-kind-class">
|
|
||||||
<li class="tsd-signature" id="startX.startX-1"><span class="tsd-signature-symbol">set</span> startX<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
|
|
||||||
<li class="tsd-description">
|
|
||||||
<div class="tsd-parameters">
|
|
||||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
||||||
<ul class="tsd-parameter-list">
|
|
||||||
<li>
|
|
||||||
<h5>value: <span class="tsd-signature-type">number</span></h5></li></ul></div>
|
|
||||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Obstacle.ts#L13">Obstacle.ts:13</a></li></ul></aside></li></ul></section></section>
|
|
||||||
<section class="tsd-panel-group tsd-member-group">
|
|
||||||
<h2>Methods</h2>
|
|
||||||
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="collides" class="tsd-anchor"></a>
|
|
||||||
<h3 class="tsd-anchor-link"><span>collides</span><a href="#collides" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
||||||
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
|
|
||||||
<li class="tsd-signature tsd-anchor-link" id="collides.collides-1">collides<span class="tsd-signature-symbol">(</span>o<span class="tsd-signature-symbol">: </span><a href="Entity.Entity.html" class="tsd-signature-type" data-tsd-kind="Class">Entity</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#collides.collides-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
|
||||||
<li class="tsd-description">
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Determines when the obstacle is colliding with another entity</p>
|
|
||||||
</div>
|
|
||||||
<div class="tsd-parameters">
|
|
||||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
||||||
<ul class="tsd-parameter-list">
|
|
||||||
<li>
|
|
||||||
<h5>o: <a href="Entity.Entity.html" class="tsd-signature-type" data-tsd-kind="Class">Entity</a></h5>
|
|
||||||
<div class="tsd-comment tsd-typography"><p>other entity</p>
|
|
||||||
</div></li></ul></div>
|
|
||||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><aside class="tsd-sources">
|
|
||||||
<p>Implementation of <a href="../interfaces/Collidable.Collidable.html">Collidable</a>.<a href="../interfaces/Collidable.Collidable.html#collides">collides</a></p>
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Obstacle.ts#L89">Obstacle.ts:89</a></li></ul></aside></li></ul></section>
|
|
||||||
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-private"><a id="createPipes" class="tsd-anchor"></a>
|
|
||||||
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>create<wbr/>Pipes</span><a href="#createPipes" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
||||||
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-private">
|
|
||||||
<li class="tsd-signature tsd-anchor-link" id="createPipes.createPipes-1">create<wbr/>Pipes<span class="tsd-signature-symbol">(</span>position<span class="tsd-signature-symbol">: </span><a href="Position.Position.html" class="tsd-signature-type" data-tsd-kind="Class">Position</a>, obstacleHeight<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, obstacleWidth<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, pipeImagePath<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#createPipes.createPipes-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
|
||||||
<li class="tsd-description"><code class="tsd-tag ts-flagPrivate">Private</code>
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Creates the pipes.</p>
|
|
||||||
</div>
|
|
||||||
<div class="tsd-parameters">
|
|
||||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
||||||
<ul class="tsd-parameter-list">
|
|
||||||
<li>
|
|
||||||
<h5>position: <a href="Position.Position.html" class="tsd-signature-type" data-tsd-kind="Class">Position</a></h5></li>
|
|
||||||
<li>
|
|
||||||
<h5>obstacleHeight: <span class="tsd-signature-type">number</span></h5></li>
|
|
||||||
<li>
|
|
||||||
<h5>obstacleWidth: <span class="tsd-signature-type">number</span></h5></li>
|
|
||||||
<li>
|
|
||||||
<h5>pipeImagePath: <span class="tsd-signature-type">string</span></h5></li></ul></div>
|
|
||||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Obstacle.ts#L41">Obstacle.ts:41</a></li></ul></aside></li></ul></section>
|
|
||||||
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="draw" class="tsd-anchor"></a>
|
|
||||||
<h3 class="tsd-anchor-link"><span>draw</span><a href="#draw" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
||||||
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
|
|
||||||
<li class="tsd-signature tsd-anchor-link" id="draw.draw-1">draw<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#draw.draw-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
|
||||||
<li class="tsd-description">
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Draws the entity.</p>
|
|
||||||
</div>
|
|
||||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
||||||
<p>Overrides <a href="Entity.Entity.html">Entity</a>.<a href="Entity.Entity.html#draw">draw</a></p>
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Obstacle.ts#L80">Obstacle.ts:80</a></li></ul></aside></li></ul></section>
|
|
||||||
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-private"><a id="randomRange" class="tsd-anchor"></a>
|
|
||||||
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>random<wbr/>Range</span><a href="#randomRange" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
||||||
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-private">
|
|
||||||
<li class="tsd-signature tsd-anchor-link" id="randomRange.randomRange-1">random<wbr/>Range<span class="tsd-signature-symbol">(</span>min<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, max<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#randomRange.randomRange-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
|
||||||
<li class="tsd-description">
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Creates a random number between the min and max parameter</p>
|
|
||||||
</div>
|
|
||||||
<div class="tsd-parameters">
|
|
||||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
||||||
<ul class="tsd-parameter-list">
|
|
||||||
<li>
|
|
||||||
<h5>min: <span class="tsd-signature-type">number</span></h5>
|
|
||||||
<div class="tsd-comment tsd-typography"><p>minimum number</p>
|
|
||||||
</div></li>
|
|
||||||
<li>
|
|
||||||
<h5>max: <span class="tsd-signature-type">number</span></h5>
|
|
||||||
<div class="tsd-comment tsd-typography"><p>maximum number</p>
|
|
||||||
</div></li></ul></div>
|
|
||||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources">
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Obstacle.ts#L70">Obstacle.ts:70</a></li></ul></aside></li></ul></section>
|
|
||||||
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="randomizeHeight" class="tsd-anchor"></a>
|
|
||||||
<h3 class="tsd-anchor-link"><span>randomize<wbr/>Height</span><a href="#randomizeHeight" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
||||||
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
|
|
||||||
<li class="tsd-signature tsd-anchor-link" id="randomizeHeight.randomizeHeight-1">randomize<wbr/>Height<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#randomizeHeight.randomizeHeight-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
|
||||||
<li class="tsd-description">
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Randomizes the height of the pipes</p>
|
|
||||||
</div>
|
|
||||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Obstacle.ts#L59">Obstacle.ts:59</a></li></ul></aside></li></ul></section>
|
|
||||||
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="resetPosition" class="tsd-anchor"></a>
|
|
||||||
<h3 class="tsd-anchor-link"><span>reset<wbr/>Position</span><a href="#resetPosition" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
||||||
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
|
|
||||||
<li class="tsd-signature tsd-anchor-link" id="resetPosition.resetPosition-1">reset<wbr/>Position<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#resetPosition.resetPosition-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
|
||||||
<li class="tsd-description">
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Resets the position of the obstacle to the Obstacle.startX variable
|
|
||||||
Randomises the height of the pipes using the padding variable</p>
|
|
||||||
</div>
|
|
||||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Obstacle.ts#L50">Obstacle.ts:50</a></li></ul></aside></li></ul></section>
|
|
||||||
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="update" class="tsd-anchor"></a>
|
|
||||||
<h3 class="tsd-anchor-link"><span>update</span><a href="#update" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
||||||
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
|
|
||||||
<li class="tsd-signature tsd-anchor-link" id="update.update-1">update<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#update.update-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
|
||||||
<li class="tsd-description">
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Updates the entity.</p>
|
|
||||||
</div>
|
|
||||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
||||||
<p>Overrides <a href="Entity.Entity.html">Entity</a>.<a href="Entity.Entity.html#update">update</a></p>
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Obstacle.ts#L74">Obstacle.ts:74</a></li></ul></aside></li></ul></section></section></div>
|
|
||||||
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
|
|
||||||
<div class="tsd-navigation settings">
|
|
||||||
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
|
|
||||||
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg> Settings</h3></summary>
|
|
||||||
<div class="tsd-accordion-details">
|
|
||||||
<div class="tsd-filter-visibility">
|
|
||||||
<h4 class="uppercase">Member Visibility</h4><form>
|
|
||||||
<ul id="tsd-filter-options">
|
|
||||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li>
|
|
||||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-private" name="private"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Private</span></label></li>
|
|
||||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li>
|
|
||||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></form></div>
|
|
||||||
<div class="tsd-theme-toggle">
|
|
||||||
<h4 class="uppercase">Theme</h4><select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div>
|
|
||||||
<nav class="tsd-navigation primary">
|
|
||||||
<details class="tsd-index-accordion" open><summary class="tsd-accordion-summary">
|
|
||||||
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg> Modules</h3></summary>
|
|
||||||
<div class="tsd-accordion-details">
|
|
||||||
<ul>
|
|
||||||
<li class="current"><a href="../modules.html">Raspberry <wbr/>Rocketeer <wbr/>Docs</a>
|
|
||||||
<ul>
|
|
||||||
<li class="tsd-kind-module"><a href="../modules/Collidable.html">Collidable</a></li>
|
|
||||||
<li class="tsd-kind-module"><a href="../modules/Entity.html">Entity</a></li>
|
|
||||||
<li class="current selected tsd-kind-module"><a href="../modules/Obstacle.html">Obstacle</a></li>
|
|
||||||
<li class="tsd-kind-module"><a href="../modules/Pipe.html">Pipe</a></li>
|
|
||||||
<li class="tsd-kind-module"><a href="../modules/Position.html">Position</a></li>
|
|
||||||
<li class="tsd-kind-module"><a href="../modules/Raspberry.html">Raspberry</a></li></ul></li></ul></div></details></nav>
|
|
||||||
<nav class="tsd-navigation secondary menu-sticky">
|
|
||||||
<ul>
|
|
||||||
<li class="current tsd-kind-class tsd-parent-kind-module"><a href="Obstacle.Obstacle.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-128-path"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)" id="icon-128-text"></path></svg><span>Obstacle</span></a>
|
|
||||||
<ul>
|
|
||||||
<li class="tsd-kind-constructor tsd-parent-kind-class"><a href="Obstacle.Obstacle.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-512-path"></use><use href="#icon-512-text"></use></svg>constructor</a></li>
|
|
||||||
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><a href="Obstacle.Obstacle.html#padding" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>padding</a></li>
|
|
||||||
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><a href="Obstacle.Obstacle.html#pipeBottom" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>pipe<wbr/>Bottom</a></li>
|
|
||||||
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><a href="Obstacle.Obstacle.html#pipeTop" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>pipe<wbr/>Top</a></li>
|
|
||||||
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><a href="Obstacle.Obstacle.html#speed" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>speed</a></li>
|
|
||||||
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><a href="Obstacle.Obstacle.html#_distanceBetweenPipes" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>_distance<wbr/>Between<wbr/>Pipes</a></li>
|
|
||||||
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><a href="Obstacle.Obstacle.html#_startX" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>_startX</a></li>
|
|
||||||
<li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><a href="Obstacle.Obstacle.html#height" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg>height</a></li>
|
|
||||||
<li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><a href="Obstacle.Obstacle.html#position" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg>position</a></li>
|
|
||||||
<li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><a href="Obstacle.Obstacle.html#showHitbox" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg>show<wbr/>Hitbox</a></li>
|
|
||||||
<li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><a href="Obstacle.Obstacle.html#width" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg>width</a></li>
|
|
||||||
<li class="tsd-kind-accessor tsd-parent-kind-class"><a href="Obstacle.Obstacle.html#distanceBetweenPipes" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg>distance<wbr/>Between<wbr/>Pipes</a></li>
|
|
||||||
<li class="tsd-kind-accessor tsd-parent-kind-class"><a href="Obstacle.Obstacle.html#startX" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg>startX</a></li>
|
|
||||||
<li class="tsd-kind-method tsd-parent-kind-class"><a href="Obstacle.Obstacle.html#collides" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg>collides</a></li>
|
|
||||||
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-private"><a href="Obstacle.Obstacle.html#createPipes" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg>create<wbr/>Pipes</a></li>
|
|
||||||
<li class="tsd-kind-method tsd-parent-kind-class"><a href="Obstacle.Obstacle.html#draw" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg>draw</a></li>
|
|
||||||
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-private"><a href="Obstacle.Obstacle.html#randomRange" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg>random<wbr/>Range</a></li>
|
|
||||||
<li class="tsd-kind-method tsd-parent-kind-class"><a href="Obstacle.Obstacle.html#randomizeHeight" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg>randomize<wbr/>Height</a></li>
|
|
||||||
<li class="tsd-kind-method tsd-parent-kind-class"><a href="Obstacle.Obstacle.html#resetPosition" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg>reset<wbr/>Position</a></li>
|
|
||||||
<li class="tsd-kind-method tsd-parent-kind-class"><a href="Obstacle.Obstacle.html#update" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg>update</a></li></ul></li></ul></nav></div></div>
|
|
||||||
<div class="container tsd-generator">
|
|
||||||
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div>
|
|
||||||
<div class="overlay"></div><script src="../assets/main.js"></script></body></html>
|
|
||||||
|
|
@ -1,328 +0,0 @@
|
||||||
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Pipe | Raspberry Rocketeer Docs</title><meta name="description" content="Documentation for Raspberry Rocketeer Docs"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
|
|
||||||
<div class="tsd-toolbar-contents container">
|
|
||||||
<div class="table-cell" id="tsd-search" data-base="..">
|
|
||||||
<div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
|
|
||||||
<div class="field">
|
|
||||||
<div id="tsd-toolbar-links"></div></div>
|
|
||||||
<ul class="results">
|
|
||||||
<li class="state loading">Preparing search index...</li>
|
|
||||||
<li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">Raspberry Rocketeer Docs</a></div>
|
|
||||||
<div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
|
|
||||||
<div class="container container-main">
|
|
||||||
<div class="col-8 col-content">
|
|
||||||
<div class="tsd-page-title">
|
|
||||||
<ul class="tsd-breadcrumb">
|
|
||||||
<li><a href="../modules.html">Raspberry Rocketeer Docs</a></li>
|
|
||||||
<li><a href="../modules/Pipe.html">Pipe</a></li>
|
|
||||||
<li><a href="Pipe.Pipe.html">Pipe</a></li></ul>
|
|
||||||
<h1>Class Pipe</h1></div>
|
|
||||||
<section class="tsd-panel tsd-comment">
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Rectangular obstacle.</p>
|
|
||||||
</div></section>
|
|
||||||
<section class="tsd-panel tsd-hierarchy">
|
|
||||||
<h4>Hierarchy</h4>
|
|
||||||
<ul class="tsd-hierarchy">
|
|
||||||
<li><a href="Entity.Entity.html" class="tsd-signature-type" data-tsd-kind="Class">Entity</a>
|
|
||||||
<ul class="tsd-hierarchy">
|
|
||||||
<li><span class="target">Pipe</span></li></ul></li></ul></section>
|
|
||||||
<section class="tsd-panel">
|
|
||||||
<h4>Implements</h4>
|
|
||||||
<ul class="tsd-hierarchy">
|
|
||||||
<li><a href="../interfaces/Collidable.Collidable.html" class="tsd-signature-type" data-tsd-kind="Interface">Collidable</a></li></ul></section><aside class="tsd-sources">
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Pipe.ts#L4">Pipe.ts:4</a></li></ul></aside>
|
|
||||||
<section class="tsd-panel-group tsd-index-group">
|
|
||||||
<section class="tsd-panel tsd-index-panel">
|
|
||||||
<details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
|
|
||||||
<h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex=0><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M1.5 5.50969L8 11.6609L14.5 5.50969L12.5466 3.66086L8 7.96494L3.45341 3.66086L1.5 5.50969Z" fill="var(--color-text)"></path></svg> Index</h5></summary>
|
|
||||||
<div class="tsd-accordion-details">
|
|
||||||
<section class="tsd-index-section">
|
|
||||||
<h3 class="tsd-index-heading">Constructors</h3>
|
|
||||||
<div class="tsd-index-list"><a href="Pipe.Pipe.html#constructor" class="tsd-index-link tsd-kind-constructor tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#4D7FFF" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-512-path"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)" id="icon-512-text"></path></svg><span>constructor</span></a>
|
|
||||||
</div></section>
|
|
||||||
<section class="tsd-index-section">
|
|
||||||
<h3 class="tsd-index-heading">Properties</h3>
|
|
||||||
<div class="tsd-index-list"><a href="Pipe.Pipe.html#_image" class="tsd-index-link tsd-kind-property tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#FF984D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-1024-path"></rect><path d="M9.354 16V7.24H12.174C12.99 7.24 13.638 7.476 14.118 7.948C14.606 8.412 14.85 9.036 14.85 9.82C14.85 10.604 14.606 11.232 14.118 11.704C13.638 12.168 12.99 12.4 12.174 12.4H10.434V16H9.354ZM10.434 11.428H12.174C12.646 11.428 13.022 11.284 13.302 10.996C13.59 10.7 13.734 10.308 13.734 9.82C13.734 9.324 13.59 8.932 13.302 8.644C13.022 8.356 12.646 8.212 12.174 8.212H10.434V11.428Z" fill="var(--color-text)" id="icon-1024-text"></path></svg><span>_image</span></a>
|
|
||||||
</div></section>
|
|
||||||
<section class="tsd-index-section">
|
|
||||||
<h3 class="tsd-index-heading">Accessors</h3>
|
|
||||||
<div class="tsd-index-list"><a href="Pipe.Pipe.html#height" class="tsd-index-link tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#FF4D4D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-262144-path"></rect><path d="M8.85 16L11.13 7.24H12.582L14.85 16H13.758L13.182 13.672H10.53L9.954 16H8.85ZM10.746 12.76H12.954L12.282 10.06C12.154 9.548 12.054 9.12 11.982 8.776C11.91 8.432 11.866 8.208 11.85 8.104C11.834 8.208 11.79 8.432 11.718 8.776C11.646 9.12 11.546 9.544 11.418 10.048L10.746 12.76Z" fill="var(--color-text)" id="icon-262144-text"></path></svg><span>height</span></a>
|
|
||||||
<a href="Pipe.Pipe.html#image" class="tsd-index-link tsd-kind-accessor tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg><span>image</span></a>
|
|
||||||
<a href="Pipe.Pipe.html#position" class="tsd-index-link tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg><span>position</span></a>
|
|
||||||
<a href="Pipe.Pipe.html#showHitbox" class="tsd-index-link tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg><span>show<wbr/>Hitbox</span></a>
|
|
||||||
<a href="Pipe.Pipe.html#width" class="tsd-index-link tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg><span>width</span></a>
|
|
||||||
</div></section>
|
|
||||||
<section class="tsd-index-section">
|
|
||||||
<h3 class="tsd-index-heading">Methods</h3>
|
|
||||||
<div class="tsd-index-list"><a href="Pipe.Pipe.html#collides" class="tsd-index-link tsd-kind-method tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#FF4DB8" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-2048-path"></rect><path d="M9.162 16V7.24H10.578L11.514 10.072C11.602 10.328 11.674 10.584 11.73 10.84C11.794 11.088 11.842 11.28 11.874 11.416C11.906 11.28 11.954 11.088 12.018 10.84C12.082 10.584 12.154 10.324 12.234 10.06L13.122 7.24H14.538V16H13.482V12.82C13.482 12.468 13.49 12.068 13.506 11.62C13.53 11.172 13.558 10.716 13.59 10.252C13.622 9.78 13.654 9.332 13.686 8.908C13.726 8.476 13.762 8.1 13.794 7.78L12.366 12.16H11.334L9.894 7.78C9.934 8.092 9.97 8.456 10.002 8.872C10.042 9.28 10.078 9.716 10.11 10.18C10.142 10.636 10.166 11.092 10.182 11.548C10.206 12.004 10.218 12.428 10.218 12.82V16H9.162Z" fill="var(--color-text)" id="icon-2048-text"></path></svg><span>collides</span></a>
|
|
||||||
<a href="Pipe.Pipe.html#draw" class="tsd-index-link tsd-kind-method tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>draw</span></a>
|
|
||||||
<a href="Pipe.Pipe.html#move" class="tsd-index-link tsd-kind-method tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>move</span></a>
|
|
||||||
<a href="Pipe.Pipe.html#update" class="tsd-index-link tsd-kind-method tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>update</span></a>
|
|
||||||
</div></section></div></details></section></section>
|
|
||||||
<section class="tsd-panel-group tsd-member-group">
|
|
||||||
<h2>Constructors</h2>
|
|
||||||
<section class="tsd-panel tsd-member tsd-kind-constructor tsd-parent-kind-class"><a id="constructor" class="tsd-anchor"></a>
|
|
||||||
<h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none" id="icon-anchor-a"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5" id="icon-anchor-b"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5" id="icon-anchor-c"></path></svg></a></h3>
|
|
||||||
<ul class="tsd-signatures tsd-kind-constructor tsd-parent-kind-class">
|
|
||||||
<li class="tsd-signature tsd-anchor-link" id="constructor.new_Pipe">new <wbr/>Pipe<span class="tsd-signature-symbol">(</span>positionX<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, width<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, height<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, image<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="Pipe.Pipe.html" class="tsd-signature-type" data-tsd-kind="Class">Pipe</a><a href="#constructor.new_Pipe" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
|
||||||
<li class="tsd-description">
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Constructs the pipe.</p>
|
|
||||||
</div>
|
|
||||||
<div class="tsd-parameters">
|
|
||||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
||||||
<ul class="tsd-parameter-list">
|
|
||||||
<li>
|
|
||||||
<h5>positionX: <span class="tsd-signature-type">number</span></h5>
|
|
||||||
<div class="tsd-comment tsd-typography"><p>starting x-Position</p>
|
|
||||||
</div></li>
|
|
||||||
<li>
|
|
||||||
<h5>width: <span class="tsd-signature-type">number</span></h5>
|
|
||||||
<div class="tsd-comment tsd-typography"><p>pipe width</p>
|
|
||||||
</div></li>
|
|
||||||
<li>
|
|
||||||
<h5>height: <span class="tsd-signature-type">number</span></h5>
|
|
||||||
<div class="tsd-comment tsd-typography"><p>pipe height</p>
|
|
||||||
</div></li>
|
|
||||||
<li>
|
|
||||||
<h5>image: <span class="tsd-signature-type">string</span></h5>
|
|
||||||
<div class="tsd-comment tsd-typography"><p>path to image.</p>
|
|
||||||
</div></li></ul></div>
|
|
||||||
<h4 class="tsd-returns-title">Returns <a href="Pipe.Pipe.html" class="tsd-signature-type" data-tsd-kind="Class">Pipe</a></h4><aside class="tsd-sources">
|
|
||||||
<p>Overrides <a href="Entity.Entity.html">Entity</a>.<a href="Entity.Entity.html#constructor">constructor</a></p>
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Pipe.ts#L35">Pipe.ts:35</a></li></ul></aside></li></ul></section></section>
|
|
||||||
<section class="tsd-panel-group tsd-member-group">
|
|
||||||
<h2>Properties</h2>
|
|
||||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-private"><a id="_image" class="tsd-anchor"></a>
|
|
||||||
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>_image</span><a href="#_image" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
||||||
<div class="tsd-signature">_image<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Image</span></div>
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Pipe's image.</p>
|
|
||||||
</div><aside class="tsd-sources">
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Pipe.ts#L9">Pipe.ts:9</a></li></ul></aside></section></section>
|
|
||||||
<section class="tsd-panel-group tsd-member-group">
|
|
||||||
<h2>Accessors</h2>
|
|
||||||
<section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><a id="height" class="tsd-anchor"></a>
|
|
||||||
<h3 class="tsd-anchor-link"><span>height</span><a href="#height" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
||||||
<ul class="tsd-signatures tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited">
|
|
||||||
<li class="tsd-signature" id="height.height-1"><span class="tsd-signature-symbol">get</span> height<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li>
|
|
||||||
<li class="tsd-description">
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Get height.</p>
|
|
||||||
</div>
|
|
||||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources">
|
|
||||||
<p>Inherited from Entity.height</p>
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Entity.ts#L70">Entity.ts:70</a></li></ul></aside></li>
|
|
||||||
<li class="tsd-signature" id="height.height-2"><span class="tsd-signature-symbol">set</span> height<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
|
|
||||||
<li class="tsd-description">
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Set height.</p>
|
|
||||||
</div>
|
|
||||||
<div class="tsd-parameters">
|
|
||||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
||||||
<ul class="tsd-parameter-list">
|
|
||||||
<li>
|
|
||||||
<h5>value: <span class="tsd-signature-type">number</span></h5></li></ul></div>
|
|
||||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
||||||
<p>Inherited from Entity.height</p>
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Entity.ts#L78">Entity.ts:78</a></li></ul></aside></li></ul></section>
|
|
||||||
<section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="image" class="tsd-anchor"></a>
|
|
||||||
<h3 class="tsd-anchor-link"><span>image</span><a href="#image" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
||||||
<ul class="tsd-signatures tsd-kind-accessor tsd-parent-kind-class">
|
|
||||||
<li class="tsd-signature" id="image.image-1"><span class="tsd-signature-symbol">get</span> image<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Image</span></li>
|
|
||||||
<li class="tsd-description">
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Gets the image.</p>
|
|
||||||
</div>
|
|
||||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Image</span></h4><aside class="tsd-sources">
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Pipe.ts#L15">Pipe.ts:15</a></li></ul></aside></li>
|
|
||||||
<li class="tsd-signature" id="image.image-2"><span class="tsd-signature-symbol">set</span> image<span class="tsd-signature-symbol">(</span>path<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
|
|
||||||
<li class="tsd-description">
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Sets the image.</p>
|
|
||||||
</div>
|
|
||||||
<div class="tsd-parameters">
|
|
||||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
||||||
<ul class="tsd-parameter-list">
|
|
||||||
<li>
|
|
||||||
<h5>path: <span class="tsd-signature-type">any</span></h5>
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Path to image</p>
|
|
||||||
</div></li></ul></div>
|
|
||||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Pipe.ts#L23">Pipe.ts:23</a></li></ul></aside></li></ul></section>
|
|
||||||
<section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><a id="position" class="tsd-anchor"></a>
|
|
||||||
<h3 class="tsd-anchor-link"><span>position</span><a href="#position" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
||||||
<ul class="tsd-signatures tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited">
|
|
||||||
<li class="tsd-signature" id="position.position-1"><span class="tsd-signature-symbol">get</span> position<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="Position.Position.html" class="tsd-signature-type" data-tsd-kind="Class">Position</a></li>
|
|
||||||
<li class="tsd-description">
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Get position.</p>
|
|
||||||
</div>
|
|
||||||
<h4 class="tsd-returns-title">Returns <a href="Position.Position.html" class="tsd-signature-type" data-tsd-kind="Class">Position</a></h4><aside class="tsd-sources">
|
|
||||||
<p>Inherited from Entity.position</p>
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Entity.ts#L40">Entity.ts:40</a></li></ul></aside></li>
|
|
||||||
<li class="tsd-signature" id="position.position-2"><span class="tsd-signature-symbol">set</span> position<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><a href="Position.Position.html" class="tsd-signature-type" data-tsd-kind="Class">Position</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
|
|
||||||
<li class="tsd-description">
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Set position.</p>
|
|
||||||
</div>
|
|
||||||
<div class="tsd-parameters">
|
|
||||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
||||||
<ul class="tsd-parameter-list">
|
|
||||||
<li>
|
|
||||||
<h5>value: <a href="Position.Position.html" class="tsd-signature-type" data-tsd-kind="Class">Position</a></h5></li></ul></div>
|
|
||||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
||||||
<p>Inherited from Entity.position</p>
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Entity.ts#L48">Entity.ts:48</a></li></ul></aside></li></ul></section>
|
|
||||||
<section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><a id="showHitbox" class="tsd-anchor"></a>
|
|
||||||
<h3 class="tsd-anchor-link"><span>show<wbr/>Hitbox</span><a href="#showHitbox" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
||||||
<ul class="tsd-signatures tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited">
|
|
||||||
<li class="tsd-signature" id="showHitbox.showHitbox-1"><span class="tsd-signature-symbol">get</span> showHitbox<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
|
|
||||||
<li class="tsd-description">
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Get the hitbox's visibility.</p>
|
|
||||||
</div>
|
|
||||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><aside class="tsd-sources">
|
|
||||||
<p>Inherited from Entity.showHitbox</p>
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Entity.ts#L85">Entity.ts:85</a></li></ul></aside></li>
|
|
||||||
<li class="tsd-signature" id="showHitbox.showHitbox-2"><span class="tsd-signature-symbol">set</span> showHitbox<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
|
|
||||||
<li class="tsd-description">
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Set the hitbox's visibility.</p>
|
|
||||||
</div>
|
|
||||||
<div class="tsd-parameters">
|
|
||||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
||||||
<ul class="tsd-parameter-list">
|
|
||||||
<li>
|
|
||||||
<h5>value: <span class="tsd-signature-type">boolean</span></h5></li></ul></div>
|
|
||||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
||||||
<p>Inherited from Entity.showHitbox</p>
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Entity.ts#L93">Entity.ts:93</a></li></ul></aside></li></ul></section>
|
|
||||||
<section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><a id="width" class="tsd-anchor"></a>
|
|
||||||
<h3 class="tsd-anchor-link"><span>width</span><a href="#width" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
||||||
<ul class="tsd-signatures tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited">
|
|
||||||
<li class="tsd-signature" id="width.width-1"><span class="tsd-signature-symbol">get</span> width<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li>
|
|
||||||
<li class="tsd-description">
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Get width.</p>
|
|
||||||
</div>
|
|
||||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources">
|
|
||||||
<p>Inherited from Entity.width</p>
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Entity.ts#L55">Entity.ts:55</a></li></ul></aside></li>
|
|
||||||
<li class="tsd-signature" id="width.width-2"><span class="tsd-signature-symbol">set</span> width<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
|
|
||||||
<li class="tsd-description">
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Set width.</p>
|
|
||||||
</div>
|
|
||||||
<div class="tsd-parameters">
|
|
||||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
||||||
<ul class="tsd-parameter-list">
|
|
||||||
<li>
|
|
||||||
<h5>value: <span class="tsd-signature-type">number</span></h5></li></ul></div>
|
|
||||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
||||||
<p>Inherited from Entity.width</p>
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Entity.ts#L63">Entity.ts:63</a></li></ul></aside></li></ul></section></section>
|
|
||||||
<section class="tsd-panel-group tsd-member-group">
|
|
||||||
<h2>Methods</h2>
|
|
||||||
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="collides" class="tsd-anchor"></a>
|
|
||||||
<h3 class="tsd-anchor-link"><span>collides</span><a href="#collides" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
||||||
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
|
|
||||||
<li class="tsd-signature tsd-anchor-link" id="collides.collides-1">collides<span class="tsd-signature-symbol">(</span>o<span class="tsd-signature-symbol">: </span><a href="Entity.Entity.html" class="tsd-signature-type" data-tsd-kind="Class">Entity</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#collides.collides-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
|
||||||
<li class="tsd-description">
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Determines when the pipe is colliding with another entity</p>
|
|
||||||
</div>
|
|
||||||
<div class="tsd-parameters">
|
|
||||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
||||||
<ul class="tsd-parameter-list">
|
|
||||||
<li>
|
|
||||||
<h5>o: <a href="Entity.Entity.html" class="tsd-signature-type" data-tsd-kind="Class">Entity</a></h5>
|
|
||||||
<div class="tsd-comment tsd-typography"><p>other entity</p>
|
|
||||||
</div></li></ul></div>
|
|
||||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><aside class="tsd-sources">
|
|
||||||
<p>Implementation of <a href="../interfaces/Collidable.Collidable.html">Collidable</a>.<a href="../interfaces/Collidable.Collidable.html#collides">collides</a></p>
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Pipe.ts#L68">Pipe.ts:68</a></li></ul></aside></li></ul></section>
|
|
||||||
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="draw" class="tsd-anchor"></a>
|
|
||||||
<h3 class="tsd-anchor-link"><span>draw</span><a href="#draw" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
||||||
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
|
|
||||||
<li class="tsd-signature tsd-anchor-link" id="draw.draw-1">draw<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#draw.draw-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
|
||||||
<li class="tsd-description">
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Draws the pipe.</p>
|
|
||||||
</div>
|
|
||||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
||||||
<p>Overrides <a href="Entity.Entity.html">Entity</a>.<a href="Entity.Entity.html#draw">draw</a></p>
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Pipe.ts#L48">Pipe.ts:48</a></li></ul></aside></li></ul></section>
|
|
||||||
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="move" class="tsd-anchor"></a>
|
|
||||||
<h3 class="tsd-anchor-link"><span>move</span><a href="#move" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
||||||
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
|
|
||||||
<li class="tsd-signature tsd-anchor-link" id="move.move-1">move<span class="tsd-signature-symbol">(</span>speed<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#move.move-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
|
||||||
<li class="tsd-description">
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Moves the pipe to the lift with the given speed</p>
|
|
||||||
</div>
|
|
||||||
<div class="tsd-parameters">
|
|
||||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
||||||
<ul class="tsd-parameter-list">
|
|
||||||
<li>
|
|
||||||
<h5>speed: <span class="tsd-signature-type">number</span></h5>
|
|
||||||
<div class="tsd-comment tsd-typography"><p>how fast the pipe moves</p>
|
|
||||||
</div></li></ul></div>
|
|
||||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Pipe.ts#L60">Pipe.ts:60</a></li></ul></aside></li></ul></section>
|
|
||||||
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="update" class="tsd-anchor"></a>
|
|
||||||
<h3 class="tsd-anchor-link"><span>update</span><a href="#update" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
||||||
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
|
|
||||||
<li class="tsd-signature tsd-anchor-link" id="update.update-1">update<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#update.update-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
|
||||||
<li class="tsd-description">
|
|
||||||
<div class="tsd-comment tsd-typography"><p>YAGNI.</p>
|
|
||||||
</div>
|
|
||||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
||||||
<p>Overrides <a href="Entity.Entity.html">Entity</a>.<a href="Entity.Entity.html#update">update</a></p>
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Pipe.ts#L43">Pipe.ts:43</a></li></ul></aside></li></ul></section></section></div>
|
|
||||||
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
|
|
||||||
<div class="tsd-navigation settings">
|
|
||||||
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
|
|
||||||
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg> Settings</h3></summary>
|
|
||||||
<div class="tsd-accordion-details">
|
|
||||||
<div class="tsd-filter-visibility">
|
|
||||||
<h4 class="uppercase">Member Visibility</h4><form>
|
|
||||||
<ul id="tsd-filter-options">
|
|
||||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li>
|
|
||||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-private" name="private"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Private</span></label></li>
|
|
||||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li>
|
|
||||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></form></div>
|
|
||||||
<div class="tsd-theme-toggle">
|
|
||||||
<h4 class="uppercase">Theme</h4><select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div>
|
|
||||||
<nav class="tsd-navigation primary">
|
|
||||||
<details class="tsd-index-accordion" open><summary class="tsd-accordion-summary">
|
|
||||||
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg> Modules</h3></summary>
|
|
||||||
<div class="tsd-accordion-details">
|
|
||||||
<ul>
|
|
||||||
<li class="current"><a href="../modules.html">Raspberry <wbr/>Rocketeer <wbr/>Docs</a>
|
|
||||||
<ul>
|
|
||||||
<li class="tsd-kind-module"><a href="../modules/Collidable.html">Collidable</a></li>
|
|
||||||
<li class="tsd-kind-module"><a href="../modules/Entity.html">Entity</a></li>
|
|
||||||
<li class="tsd-kind-module"><a href="../modules/Obstacle.html">Obstacle</a></li>
|
|
||||||
<li class="current selected tsd-kind-module"><a href="../modules/Pipe.html">Pipe</a></li>
|
|
||||||
<li class="tsd-kind-module"><a href="../modules/Position.html">Position</a></li>
|
|
||||||
<li class="tsd-kind-module"><a href="../modules/Raspberry.html">Raspberry</a></li></ul></li></ul></div></details></nav>
|
|
||||||
<nav class="tsd-navigation secondary menu-sticky">
|
|
||||||
<ul>
|
|
||||||
<li class="current tsd-kind-class tsd-parent-kind-module"><a href="Pipe.Pipe.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-128-path"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)" id="icon-128-text"></path></svg><span>Pipe</span></a>
|
|
||||||
<ul>
|
|
||||||
<li class="tsd-kind-constructor tsd-parent-kind-class"><a href="Pipe.Pipe.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-512-path"></use><use href="#icon-512-text"></use></svg>constructor</a></li>
|
|
||||||
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><a href="Pipe.Pipe.html#_image" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>_image</a></li>
|
|
||||||
<li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><a href="Pipe.Pipe.html#height" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg>height</a></li>
|
|
||||||
<li class="tsd-kind-accessor tsd-parent-kind-class"><a href="Pipe.Pipe.html#image" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg>image</a></li>
|
|
||||||
<li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><a href="Pipe.Pipe.html#position" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg>position</a></li>
|
|
||||||
<li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><a href="Pipe.Pipe.html#showHitbox" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg>show<wbr/>Hitbox</a></li>
|
|
||||||
<li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><a href="Pipe.Pipe.html#width" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg>width</a></li>
|
|
||||||
<li class="tsd-kind-method tsd-parent-kind-class"><a href="Pipe.Pipe.html#collides" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg>collides</a></li>
|
|
||||||
<li class="tsd-kind-method tsd-parent-kind-class"><a href="Pipe.Pipe.html#draw" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg>draw</a></li>
|
|
||||||
<li class="tsd-kind-method tsd-parent-kind-class"><a href="Pipe.Pipe.html#move" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg>move</a></li>
|
|
||||||
<li class="tsd-kind-method tsd-parent-kind-class"><a href="Pipe.Pipe.html#update" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg>update</a></li></ul></li></ul></nav></div></div>
|
|
||||||
<div class="container tsd-generator">
|
|
||||||
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div>
|
|
||||||
<div class="overlay"></div><script src="../assets/main.js"></script></body></html>
|
|
||||||
|
|
@ -1,170 +0,0 @@
|
||||||
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Position | Raspberry Rocketeer Docs</title><meta name="description" content="Documentation for Raspberry Rocketeer Docs"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
|
|
||||||
<div class="tsd-toolbar-contents container">
|
|
||||||
<div class="table-cell" id="tsd-search" data-base="..">
|
|
||||||
<div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
|
|
||||||
<div class="field">
|
|
||||||
<div id="tsd-toolbar-links"></div></div>
|
|
||||||
<ul class="results">
|
|
||||||
<li class="state loading">Preparing search index...</li>
|
|
||||||
<li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">Raspberry Rocketeer Docs</a></div>
|
|
||||||
<div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
|
|
||||||
<div class="container container-main">
|
|
||||||
<div class="col-8 col-content">
|
|
||||||
<div class="tsd-page-title">
|
|
||||||
<ul class="tsd-breadcrumb">
|
|
||||||
<li><a href="../modules.html">Raspberry Rocketeer Docs</a></li>
|
|
||||||
<li><a href="../modules/Position.html">Position</a></li>
|
|
||||||
<li><a href="Position.Position.html">Position</a></li></ul>
|
|
||||||
<h1>Class Position</h1></div>
|
|
||||||
<section class="tsd-panel tsd-comment">
|
|
||||||
<div class="tsd-comment tsd-typography"><p>2D Point.</p>
|
|
||||||
</div></section>
|
|
||||||
<section class="tsd-panel tsd-hierarchy">
|
|
||||||
<h4>Hierarchy</h4>
|
|
||||||
<ul class="tsd-hierarchy">
|
|
||||||
<li><span class="target">Position</span></li></ul></section><aside class="tsd-sources">
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Position.ts#L4">Position.ts:4</a></li></ul></aside>
|
|
||||||
<section class="tsd-panel-group tsd-index-group">
|
|
||||||
<section class="tsd-panel tsd-index-panel">
|
|
||||||
<details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
|
|
||||||
<h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex=0><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M1.5 5.50969L8 11.6609L14.5 5.50969L12.5466 3.66086L8 7.96494L3.45341 3.66086L1.5 5.50969Z" fill="var(--color-text)"></path></svg> Index</h5></summary>
|
|
||||||
<div class="tsd-accordion-details">
|
|
||||||
<section class="tsd-index-section">
|
|
||||||
<h3 class="tsd-index-heading">Constructors</h3>
|
|
||||||
<div class="tsd-index-list"><a href="Position.Position.html#constructor" class="tsd-index-link tsd-kind-constructor tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#4D7FFF" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-512-path"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)" id="icon-512-text"></path></svg><span>constructor</span></a>
|
|
||||||
</div></section>
|
|
||||||
<section class="tsd-index-section">
|
|
||||||
<h3 class="tsd-index-heading">Properties</h3>
|
|
||||||
<div class="tsd-index-list"><a href="Position.Position.html#_x" class="tsd-index-link tsd-kind-property tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#FF984D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-1024-path"></rect><path d="M9.354 16V7.24H12.174C12.99 7.24 13.638 7.476 14.118 7.948C14.606 8.412 14.85 9.036 14.85 9.82C14.85 10.604 14.606 11.232 14.118 11.704C13.638 12.168 12.99 12.4 12.174 12.4H10.434V16H9.354ZM10.434 11.428H12.174C12.646 11.428 13.022 11.284 13.302 10.996C13.59 10.7 13.734 10.308 13.734 9.82C13.734 9.324 13.59 8.932 13.302 8.644C13.022 8.356 12.646 8.212 12.174 8.212H10.434V11.428Z" fill="var(--color-text)" id="icon-1024-text"></path></svg><span>_x</span></a>
|
|
||||||
<a href="Position.Position.html#_y" class="tsd-index-link tsd-kind-property tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>_y</span></a>
|
|
||||||
</div></section>
|
|
||||||
<section class="tsd-index-section">
|
|
||||||
<h3 class="tsd-index-heading">Accessors</h3>
|
|
||||||
<div class="tsd-index-list"><a href="Position.Position.html#x" class="tsd-index-link tsd-kind-accessor tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#FF4D4D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-262144-path"></rect><path d="M8.85 16L11.13 7.24H12.582L14.85 16H13.758L13.182 13.672H10.53L9.954 16H8.85ZM10.746 12.76H12.954L12.282 10.06C12.154 9.548 12.054 9.12 11.982 8.776C11.91 8.432 11.866 8.208 11.85 8.104C11.834 8.208 11.79 8.432 11.718 8.776C11.646 9.12 11.546 9.544 11.418 10.048L10.746 12.76Z" fill="var(--color-text)" id="icon-262144-text"></path></svg><span>x</span></a>
|
|
||||||
<a href="Position.Position.html#y" class="tsd-index-link tsd-kind-accessor tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg><span>y</span></a>
|
|
||||||
</div></section></div></details></section></section>
|
|
||||||
<section class="tsd-panel-group tsd-member-group">
|
|
||||||
<h2>Constructors</h2>
|
|
||||||
<section class="tsd-panel tsd-member tsd-kind-constructor tsd-parent-kind-class"><a id="constructor" class="tsd-anchor"></a>
|
|
||||||
<h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none" id="icon-anchor-a"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5" id="icon-anchor-b"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5" id="icon-anchor-c"></path></svg></a></h3>
|
|
||||||
<ul class="tsd-signatures tsd-kind-constructor tsd-parent-kind-class">
|
|
||||||
<li class="tsd-signature tsd-anchor-link" id="constructor.new_Position">new <wbr/>Position<span class="tsd-signature-symbol">(</span>x<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, y<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="Position.Position.html" class="tsd-signature-type" data-tsd-kind="Class">Position</a><a href="#constructor.new_Position" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
|
||||||
<li class="tsd-description">
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Constructs the position.</p>
|
|
||||||
</div>
|
|
||||||
<div class="tsd-parameters">
|
|
||||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
||||||
<ul class="tsd-parameter-list">
|
|
||||||
<li>
|
|
||||||
<h5>x: <span class="tsd-signature-type">number</span></h5>
|
|
||||||
<div class="tsd-comment tsd-typography"><p>x-Position</p>
|
|
||||||
</div></li>
|
|
||||||
<li>
|
|
||||||
<h5>y: <span class="tsd-signature-type">number</span></h5>
|
|
||||||
<div class="tsd-comment tsd-typography"><p>y-Position</p>
|
|
||||||
</div></li></ul></div>
|
|
||||||
<h4 class="tsd-returns-title">Returns <a href="Position.Position.html" class="tsd-signature-type" data-tsd-kind="Class">Position</a></h4><aside class="tsd-sources">
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Position.ts#L55">Position.ts:55</a></li></ul></aside></li></ul></section></section>
|
|
||||||
<section class="tsd-panel-group tsd-member-group">
|
|
||||||
<h2>Properties</h2>
|
|
||||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-private"><a id="_x" class="tsd-anchor"></a>
|
|
||||||
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>_x</span><a href="#_x" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
||||||
<div class="tsd-signature">_x<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
|
|
||||||
<div class="tsd-comment tsd-typography"><p>X coordinate.</p>
|
|
||||||
</div><aside class="tsd-sources">
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Position.ts#L9">Position.ts:9</a></li></ul></aside></section>
|
|
||||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-private"><a id="_y" class="tsd-anchor"></a>
|
|
||||||
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>_y</span><a href="#_y" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
||||||
<div class="tsd-signature">_y<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Y coordinate.</p>
|
|
||||||
</div><aside class="tsd-sources">
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Position.ts#L15">Position.ts:15</a></li></ul></aside></section></section>
|
|
||||||
<section class="tsd-panel-group tsd-member-group">
|
|
||||||
<h2>Accessors</h2>
|
|
||||||
<section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="x" class="tsd-anchor"></a>
|
|
||||||
<h3 class="tsd-anchor-link"><span>x</span><a href="#x" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
||||||
<ul class="tsd-signatures tsd-kind-accessor tsd-parent-kind-class">
|
|
||||||
<li class="tsd-signature" id="x.x-1"><span class="tsd-signature-symbol">get</span> x<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li>
|
|
||||||
<li class="tsd-description">
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Get x.</p>
|
|
||||||
</div>
|
|
||||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources">
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Position.ts#L22">Position.ts:22</a></li></ul></aside></li>
|
|
||||||
<li class="tsd-signature" id="x.x-2"><span class="tsd-signature-symbol">set</span> x<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
|
|
||||||
<li class="tsd-description">
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Set x.</p>
|
|
||||||
</div>
|
|
||||||
<div class="tsd-parameters">
|
|
||||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
||||||
<ul class="tsd-parameter-list">
|
|
||||||
<li>
|
|
||||||
<h5>value: <span class="tsd-signature-type">number</span></h5></li></ul></div>
|
|
||||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Position.ts#L30">Position.ts:30</a></li></ul></aside></li></ul></section>
|
|
||||||
<section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="y" class="tsd-anchor"></a>
|
|
||||||
<h3 class="tsd-anchor-link"><span>y</span><a href="#y" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
||||||
<ul class="tsd-signatures tsd-kind-accessor tsd-parent-kind-class">
|
|
||||||
<li class="tsd-signature" id="y.y-1"><span class="tsd-signature-symbol">get</span> y<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li>
|
|
||||||
<li class="tsd-description">
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Get y.</p>
|
|
||||||
</div>
|
|
||||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources">
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Position.ts#L37">Position.ts:37</a></li></ul></aside></li>
|
|
||||||
<li class="tsd-signature" id="y.y-2"><span class="tsd-signature-symbol">set</span> y<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
|
|
||||||
<li class="tsd-description">
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Set y.</p>
|
|
||||||
</div>
|
|
||||||
<div class="tsd-parameters">
|
|
||||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
||||||
<ul class="tsd-parameter-list">
|
|
||||||
<li>
|
|
||||||
<h5>value: <span class="tsd-signature-type">number</span></h5></li></ul></div>
|
|
||||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Position.ts#L45">Position.ts:45</a></li></ul></aside></li></ul></section></section></div>
|
|
||||||
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
|
|
||||||
<div class="tsd-navigation settings">
|
|
||||||
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
|
|
||||||
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg> Settings</h3></summary>
|
|
||||||
<div class="tsd-accordion-details">
|
|
||||||
<div class="tsd-filter-visibility">
|
|
||||||
<h4 class="uppercase">Member Visibility</h4><form>
|
|
||||||
<ul id="tsd-filter-options">
|
|
||||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li>
|
|
||||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-private" name="private"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Private</span></label></li>
|
|
||||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li>
|
|
||||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></form></div>
|
|
||||||
<div class="tsd-theme-toggle">
|
|
||||||
<h4 class="uppercase">Theme</h4><select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div>
|
|
||||||
<nav class="tsd-navigation primary">
|
|
||||||
<details class="tsd-index-accordion" open><summary class="tsd-accordion-summary">
|
|
||||||
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg> Modules</h3></summary>
|
|
||||||
<div class="tsd-accordion-details">
|
|
||||||
<ul>
|
|
||||||
<li class="current"><a href="../modules.html">Raspberry <wbr/>Rocketeer <wbr/>Docs</a>
|
|
||||||
<ul>
|
|
||||||
<li class="tsd-kind-module"><a href="../modules/Collidable.html">Collidable</a></li>
|
|
||||||
<li class="tsd-kind-module"><a href="../modules/Entity.html">Entity</a></li>
|
|
||||||
<li class="tsd-kind-module"><a href="../modules/Obstacle.html">Obstacle</a></li>
|
|
||||||
<li class="tsd-kind-module"><a href="../modules/Pipe.html">Pipe</a></li>
|
|
||||||
<li class="current selected tsd-kind-module"><a href="../modules/Position.html">Position</a></li>
|
|
||||||
<li class="tsd-kind-module"><a href="../modules/Raspberry.html">Raspberry</a></li></ul></li></ul></div></details></nav>
|
|
||||||
<nav class="tsd-navigation secondary menu-sticky">
|
|
||||||
<ul>
|
|
||||||
<li class="current tsd-kind-class tsd-parent-kind-module"><a href="Position.Position.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-128-path"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)" id="icon-128-text"></path></svg><span>Position</span></a>
|
|
||||||
<ul>
|
|
||||||
<li class="tsd-kind-constructor tsd-parent-kind-class"><a href="Position.Position.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-512-path"></use><use href="#icon-512-text"></use></svg>constructor</a></li>
|
|
||||||
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><a href="Position.Position.html#_x" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>_x</a></li>
|
|
||||||
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><a href="Position.Position.html#_y" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>_y</a></li>
|
|
||||||
<li class="tsd-kind-accessor tsd-parent-kind-class"><a href="Position.Position.html#x" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg>x</a></li>
|
|
||||||
<li class="tsd-kind-accessor tsd-parent-kind-class"><a href="Position.Position.html#y" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg>y</a></li></ul></li></ul></nav></div></div>
|
|
||||||
<div class="container tsd-generator">
|
|
||||||
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div>
|
|
||||||
<div class="overlay"></div><script src="../assets/main.js"></script></body></html>
|
|
||||||
|
|
@ -1,475 +0,0 @@
|
||||||
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Raspberry | Raspberry Rocketeer Docs</title><meta name="description" content="Documentation for Raspberry Rocketeer Docs"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
|
|
||||||
<div class="tsd-toolbar-contents container">
|
|
||||||
<div class="table-cell" id="tsd-search" data-base="..">
|
|
||||||
<div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
|
|
||||||
<div class="field">
|
|
||||||
<div id="tsd-toolbar-links"></div></div>
|
|
||||||
<ul class="results">
|
|
||||||
<li class="state loading">Preparing search index...</li>
|
|
||||||
<li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">Raspberry Rocketeer Docs</a></div>
|
|
||||||
<div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
|
|
||||||
<div class="container container-main">
|
|
||||||
<div class="col-8 col-content">
|
|
||||||
<div class="tsd-page-title">
|
|
||||||
<ul class="tsd-breadcrumb">
|
|
||||||
<li><a href="../modules.html">Raspberry Rocketeer Docs</a></li>
|
|
||||||
<li><a href="../modules/Raspberry.html">Raspberry</a></li>
|
|
||||||
<li><a href="Raspberry.Raspberry.html">Raspberry</a></li></ul>
|
|
||||||
<h1>Class Raspberry</h1></div>
|
|
||||||
<section class="tsd-panel tsd-comment">
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Raspberry class.</p>
|
|
||||||
</div></section>
|
|
||||||
<section class="tsd-panel tsd-hierarchy">
|
|
||||||
<h4>Hierarchy</h4>
|
|
||||||
<ul class="tsd-hierarchy">
|
|
||||||
<li><a href="Entity.Entity.html" class="tsd-signature-type" data-tsd-kind="Class">Entity</a>
|
|
||||||
<ul class="tsd-hierarchy">
|
|
||||||
<li><span class="target">Raspberry</span></li></ul></li></ul></section><aside class="tsd-sources">
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Raspberry.ts#L4">Raspberry.ts:4</a></li></ul></aside>
|
|
||||||
<section class="tsd-panel-group tsd-index-group">
|
|
||||||
<section class="tsd-panel tsd-index-panel">
|
|
||||||
<details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
|
|
||||||
<h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex=0><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M1.5 5.50969L8 11.6609L14.5 5.50969L12.5466 3.66086L8 7.96494L3.45341 3.66086L1.5 5.50969Z" fill="var(--color-text)"></path></svg> Index</h5></summary>
|
|
||||||
<div class="tsd-accordion-details">
|
|
||||||
<section class="tsd-index-section">
|
|
||||||
<h3 class="tsd-index-heading">Constructors</h3>
|
|
||||||
<div class="tsd-index-list"><a href="Raspberry.Raspberry.html#constructor" class="tsd-index-link tsd-kind-constructor tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#4D7FFF" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-512-path"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)" id="icon-512-text"></path></svg><span>constructor</span></a>
|
|
||||||
</div></section>
|
|
||||||
<section class="tsd-index-section">
|
|
||||||
<h3 class="tsd-index-heading">Properties</h3>
|
|
||||||
<div class="tsd-index-list"><a href="Raspberry.Raspberry.html#_image" class="tsd-index-link tsd-kind-property tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#FF984D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-1024-path"></rect><path d="M9.354 16V7.24H12.174C12.99 7.24 13.638 7.476 14.118 7.948C14.606 8.412 14.85 9.036 14.85 9.82C14.85 10.604 14.606 11.232 14.118 11.704C13.638 12.168 12.99 12.4 12.174 12.4H10.434V16H9.354ZM10.434 11.428H12.174C12.646 11.428 13.022 11.284 13.302 10.996C13.59 10.7 13.734 10.308 13.734 9.82C13.734 9.324 13.59 8.932 13.302 8.644C13.022 8.356 12.646 8.212 12.174 8.212H10.434V11.428Z" fill="var(--color-text)" id="icon-1024-text"></path></svg><span>_image</span></a>
|
|
||||||
<a href="Raspberry.Raspberry.html#_velocity" class="tsd-index-link tsd-kind-property tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>_velocity</span></a>
|
|
||||||
<a href="Raspberry.Raspberry.html#gravity" class="tsd-index-link tsd-kind-property tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>gravity</span></a>
|
|
||||||
<a href="Raspberry.Raspberry.html#lift" class="tsd-index-link tsd-kind-property tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>lift</span></a>
|
|
||||||
<a href="Raspberry.Raspberry.html#FILL" class="tsd-index-link tsd-kind-property tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>FILL</span></a>
|
|
||||||
<a href="Raspberry.Raspberry.html#HEIGHT" class="tsd-index-link tsd-kind-property tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>HEIGHT</span></a>
|
|
||||||
<a href="Raspberry.Raspberry.html#WIDTH" class="tsd-index-link tsd-kind-property tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>WIDTH</span></a>
|
|
||||||
<a href="Raspberry.Raspberry.html#maxVelocity" class="tsd-index-link tsd-kind-property tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>max<wbr/>Velocity</span></a>
|
|
||||||
<a href="Raspberry.Raspberry.html#position" class="tsd-index-link tsd-kind-property tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>position</span></a>
|
|
||||||
</div></section>
|
|
||||||
<section class="tsd-index-section">
|
|
||||||
<h3 class="tsd-index-heading">Accessors</h3>
|
|
||||||
<div class="tsd-index-list"><a href="Raspberry.Raspberry.html#height-1" class="tsd-index-link tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#FF4D4D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-262144-path"></rect><path d="M8.85 16L11.13 7.24H12.582L14.85 16H13.758L13.182 13.672H10.53L9.954 16H8.85ZM10.746 12.76H12.954L12.282 10.06C12.154 9.548 12.054 9.12 11.982 8.776C11.91 8.432 11.866 8.208 11.85 8.104C11.834 8.208 11.79 8.432 11.718 8.776C11.646 9.12 11.546 9.544 11.418 10.048L10.746 12.76Z" fill="var(--color-text)" id="icon-262144-text"></path></svg><span>height</span></a>
|
|
||||||
<a href="Raspberry.Raspberry.html#image" class="tsd-index-link tsd-kind-accessor tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg><span>image</span></a>
|
|
||||||
<a href="Raspberry.Raspberry.html#position-1" class="tsd-index-link tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg><span>position</span></a>
|
|
||||||
<a href="Raspberry.Raspberry.html#showHitbox" class="tsd-index-link tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg><span>show<wbr/>Hitbox</span></a>
|
|
||||||
<a href="Raspberry.Raspberry.html#velocity" class="tsd-index-link tsd-kind-accessor tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg><span>velocity</span></a>
|
|
||||||
<a href="Raspberry.Raspberry.html#width-1" class="tsd-index-link tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg><span>width</span></a>
|
|
||||||
</div></section>
|
|
||||||
<section class="tsd-index-section">
|
|
||||||
<h3 class="tsd-index-heading">Methods</h3>
|
|
||||||
<div class="tsd-index-list"><a href="Raspberry.Raspberry.html#applyGravity" class="tsd-index-link tsd-kind-method tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#FF4DB8" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-2048-path"></rect><path d="M9.162 16V7.24H10.578L11.514 10.072C11.602 10.328 11.674 10.584 11.73 10.84C11.794 11.088 11.842 11.28 11.874 11.416C11.906 11.28 11.954 11.088 12.018 10.84C12.082 10.584 12.154 10.324 12.234 10.06L13.122 7.24H14.538V16H13.482V12.82C13.482 12.468 13.49 12.068 13.506 11.62C13.53 11.172 13.558 10.716 13.59 10.252C13.622 9.78 13.654 9.332 13.686 8.908C13.726 8.476 13.762 8.1 13.794 7.78L12.366 12.16H11.334L9.894 7.78C9.934 8.092 9.97 8.456 10.002 8.872C10.042 9.28 10.078 9.716 10.11 10.18C10.142 10.636 10.166 11.092 10.182 11.548C10.206 12.004 10.218 12.428 10.218 12.82V16H9.162Z" fill="var(--color-text)" id="icon-2048-text"></path></svg><span>apply<wbr/>Gravity</span></a>
|
|
||||||
<a href="Raspberry.Raspberry.html#boost" class="tsd-index-link tsd-kind-method tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>boost</span></a>
|
|
||||||
<a href="Raspberry.Raspberry.html#boundaryBottom" class="tsd-index-link tsd-kind-method tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>boundary<wbr/>Bottom</span></a>
|
|
||||||
<a href="Raspberry.Raspberry.html#boundaryTop" class="tsd-index-link tsd-kind-method tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>boundary<wbr/>Top</span></a>
|
|
||||||
<a href="Raspberry.Raspberry.html#draw" class="tsd-index-link tsd-kind-method tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>draw</span></a>
|
|
||||||
<a href="Raspberry.Raspberry.html#drawHitBox" class="tsd-index-link tsd-kind-method tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>draw<wbr/>Hit<wbr/>Box</span></a>
|
|
||||||
<a href="Raspberry.Raspberry.html#drawObject" class="tsd-index-link tsd-kind-method tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>draw<wbr/>Object</span></a>
|
|
||||||
<a href="Raspberry.Raspberry.html#drawRocket" class="tsd-index-link tsd-kind-method tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>draw<wbr/>Rocket</span></a>
|
|
||||||
<a href="Raspberry.Raspberry.html#forceBoundaries" class="tsd-index-link tsd-kind-method tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>force<wbr/>Boundaries</span></a>
|
|
||||||
<a href="Raspberry.Raspberry.html#setPose" class="tsd-index-link tsd-kind-method tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>set<wbr/>Pose</span></a>
|
|
||||||
<a href="Raspberry.Raspberry.html#update" class="tsd-index-link tsd-kind-method tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>update</span></a>
|
|
||||||
</div></section></div></details></section></section>
|
|
||||||
<section class="tsd-panel-group tsd-member-group">
|
|
||||||
<h2>Constructors</h2>
|
|
||||||
<section class="tsd-panel tsd-member tsd-kind-constructor tsd-parent-kind-class"><a id="constructor" class="tsd-anchor"></a>
|
|
||||||
<h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none" id="icon-anchor-a"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5" id="icon-anchor-b"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5" id="icon-anchor-c"></path></svg></a></h3>
|
|
||||||
<ul class="tsd-signatures tsd-kind-constructor tsd-parent-kind-class">
|
|
||||||
<li class="tsd-signature tsd-anchor-link" id="constructor.new_Raspberry">new <wbr/>Raspberry<span class="tsd-signature-symbol">(</span>image<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="Raspberry.Raspberry.html" class="tsd-signature-type" data-tsd-kind="Class">Raspberry</a><a href="#constructor.new_Raspberry" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
|
||||||
<li class="tsd-description">
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Constructs the Raspberry with fixed sizes.</p>
|
|
||||||
</div>
|
|
||||||
<div class="tsd-parameters">
|
|
||||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
||||||
<ul class="tsd-parameter-list">
|
|
||||||
<li>
|
|
||||||
<h5>image: <span class="tsd-signature-type">string</span></h5>
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Path to image</p>
|
|
||||||
</div></li></ul></div>
|
|
||||||
<h4 class="tsd-returns-title">Returns <a href="Raspberry.Raspberry.html" class="tsd-signature-type" data-tsd-kind="Class">Raspberry</a></h4><aside class="tsd-sources">
|
|
||||||
<p>Overrides <a href="Entity.Entity.html">Entity</a>.<a href="Entity.Entity.html#constructor">constructor</a></p>
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Raspberry.ts#L97">Raspberry.ts:97</a></li></ul></aside></li></ul></section></section>
|
|
||||||
<section class="tsd-panel-group tsd-member-group">
|
|
||||||
<h2>Properties</h2>
|
|
||||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-private"><a id="_image" class="tsd-anchor"></a>
|
|
||||||
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>_image</span><a href="#_image" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
||||||
<div class="tsd-signature">_image<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Image</span></div>
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Image for the raspberry.</p>
|
|
||||||
</div><aside class="tsd-sources">
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Raspberry.ts#L27">Raspberry.ts:27</a></li></ul></aside></section>
|
|
||||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-private"><a id="_velocity" class="tsd-anchor"></a>
|
|
||||||
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>_velocity</span><a href="#_velocity" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
||||||
<div class="tsd-signature">_velocity<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 0</span></div>
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Current speed.</p>
|
|
||||||
</div><aside class="tsd-sources">
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Raspberry.ts#L21">Raspberry.ts:21</a></li></ul></aside></section>
|
|
||||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-private"><a id="gravity" class="tsd-anchor"></a>
|
|
||||||
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <code class="tsd-tag ts-flagReadonly">Readonly</code> <span>gravity</span><a href="#gravity" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
||||||
<div class="tsd-signature">gravity<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 1.314159265358979323846264338</span></div>
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Gravity applied.</p>
|
|
||||||
</div><aside class="tsd-sources">
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Raspberry.ts#L15">Raspberry.ts:15</a></li></ul></aside></section>
|
|
||||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-private"><a id="lift" class="tsd-anchor"></a>
|
|
||||||
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <code class="tsd-tag ts-flagReadonly">Readonly</code> <span>lift</span><a href="#lift" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
||||||
<div class="tsd-signature">lift<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = -20</span></div>
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Amount of lift applied when boosting.</p>
|
|
||||||
</div><aside class="tsd-sources">
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Raspberry.ts#L9">Raspberry.ts:9</a></li></ul></aside></section>
|
|
||||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-private"><a id="FILL" class="tsd-anchor"></a>
|
|
||||||
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <code class="tsd-tag ts-flagPrivate">Private</code> <code class="tsd-tag ts-flagReadonly">Readonly</code> <span>FILL</span><a href="#FILL" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
||||||
<div class="tsd-signature">FILL<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 0</span></div>
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Color.</p>
|
|
||||||
</div><aside class="tsd-sources">
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Raspberry.ts#L57">Raspberry.ts:57</a></li></ul></aside></section>
|
|
||||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-private"><a id="HEIGHT" class="tsd-anchor"></a>
|
|
||||||
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <code class="tsd-tag ts-flagPrivate">Private</code> <code class="tsd-tag ts-flagReadonly">Readonly</code> <span>HEIGHT</span><a href="#HEIGHT" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
||||||
<div class="tsd-signature">HEIGHT<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 70</span></div>
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Height.</p>
|
|
||||||
</div><aside class="tsd-sources">
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Raspberry.ts#L51">Raspberry.ts:51</a></li></ul></aside></section>
|
|
||||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-private"><a id="WIDTH" class="tsd-anchor"></a>
|
|
||||||
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <code class="tsd-tag ts-flagPrivate">Private</code> <code class="tsd-tag ts-flagReadonly">Readonly</code> <span>WIDTH</span><a href="#WIDTH" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
||||||
<div class="tsd-signature">WIDTH<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 180</span></div>
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Width.</p>
|
|
||||||
</div><aside class="tsd-sources">
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Raspberry.ts#L45">Raspberry.ts:45</a></li></ul></aside></section>
|
|
||||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-private"><a id="maxVelocity" class="tsd-anchor"></a>
|
|
||||||
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <code class="tsd-tag ts-flagPrivate">Private</code> <code class="tsd-tag ts-flagReadonly">Readonly</code> <span>max<wbr/>Velocity</span><a href="#maxVelocity" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
||||||
<div class="tsd-signature">max<wbr/>Velocity<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 100</span></div>
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Maximum velocity, so the raspberry doesn't get to infinite speed when boosting.</p>
|
|
||||||
</div><aside class="tsd-sources">
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Raspberry.ts#L39">Raspberry.ts:39</a></li></ul></aside></section>
|
|
||||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-private"><a id="position" class="tsd-anchor"></a>
|
|
||||||
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <code class="tsd-tag ts-flagPrivate">Private</code> <span>position</span><a href="#position" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
||||||
<div class="tsd-signature">position<span class="tsd-signature-symbol">:</span> <a href="Position.Position.html" class="tsd-signature-type" data-tsd-kind="Class">Position</a></div>
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Position.</p>
|
|
||||||
</div><aside class="tsd-sources">
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Raspberry.ts#L33">Raspberry.ts:33</a></li></ul></aside></section></section>
|
|
||||||
<section class="tsd-panel-group tsd-member-group">
|
|
||||||
<h2>Accessors</h2>
|
|
||||||
<section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><a id="height-1" class="tsd-anchor"></a>
|
|
||||||
<h3 class="tsd-anchor-link"><span>height</span><a href="#height-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
||||||
<ul class="tsd-signatures tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited">
|
|
||||||
<li class="tsd-signature" id="height-1.height-2"><span class="tsd-signature-symbol">get</span> height<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li>
|
|
||||||
<li class="tsd-description">
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Get height.</p>
|
|
||||||
</div>
|
|
||||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources">
|
|
||||||
<p>Inherited from Entity.height</p>
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Entity.ts#L70">Entity.ts:70</a></li></ul></aside></li>
|
|
||||||
<li class="tsd-signature" id="height-1.height-3"><span class="tsd-signature-symbol">set</span> height<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
|
|
||||||
<li class="tsd-description">
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Set height.</p>
|
|
||||||
</div>
|
|
||||||
<div class="tsd-parameters">
|
|
||||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
||||||
<ul class="tsd-parameter-list">
|
|
||||||
<li>
|
|
||||||
<h5>value: <span class="tsd-signature-type">number</span></h5></li></ul></div>
|
|
||||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
||||||
<p>Inherited from Entity.height</p>
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Entity.ts#L78">Entity.ts:78</a></li></ul></aside></li></ul></section>
|
|
||||||
<section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="image" class="tsd-anchor"></a>
|
|
||||||
<h3 class="tsd-anchor-link"><span>image</span><a href="#image" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
||||||
<ul class="tsd-signatures tsd-kind-accessor tsd-parent-kind-class">
|
|
||||||
<li class="tsd-signature" id="image.image-1"><span class="tsd-signature-symbol">get</span> image<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Image</span></li>
|
|
||||||
<li class="tsd-description">
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Gets the image.</p>
|
|
||||||
</div>
|
|
||||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Image</span></h4><aside class="tsd-sources">
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Raspberry.ts#L79">Raspberry.ts:79</a></li></ul></aside></li>
|
|
||||||
<li class="tsd-signature" id="image.image-2"><span class="tsd-signature-symbol">set</span> image<span class="tsd-signature-symbol">(</span>path<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
|
|
||||||
<li class="tsd-description">
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Sets the image by path.</p>
|
|
||||||
</div>
|
|
||||||
<div class="tsd-parameters">
|
|
||||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
||||||
<ul class="tsd-parameter-list">
|
|
||||||
<li>
|
|
||||||
<h5>path: <span class="tsd-signature-type">any</span></h5></li></ul></div>
|
|
||||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Raspberry.ts#L87">Raspberry.ts:87</a></li></ul></aside></li></ul></section>
|
|
||||||
<section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><a id="position-1" class="tsd-anchor"></a>
|
|
||||||
<h3 class="tsd-anchor-link"><span>position</span><a href="#position-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
||||||
<ul class="tsd-signatures tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited">
|
|
||||||
<li class="tsd-signature" id="position-1.position-2"><span class="tsd-signature-symbol">get</span> position<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="Position.Position.html" class="tsd-signature-type" data-tsd-kind="Class">Position</a></li>
|
|
||||||
<li class="tsd-description">
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Get position.</p>
|
|
||||||
</div>
|
|
||||||
<h4 class="tsd-returns-title">Returns <a href="Position.Position.html" class="tsd-signature-type" data-tsd-kind="Class">Position</a></h4><aside class="tsd-sources">
|
|
||||||
<p>Inherited from Entity.position</p>
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Entity.ts#L40">Entity.ts:40</a></li></ul></aside></li>
|
|
||||||
<li class="tsd-signature" id="position-1.position-3"><span class="tsd-signature-symbol">set</span> position<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><a href="Position.Position.html" class="tsd-signature-type" data-tsd-kind="Class">Position</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
|
|
||||||
<li class="tsd-description">
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Set position.</p>
|
|
||||||
</div>
|
|
||||||
<div class="tsd-parameters">
|
|
||||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
||||||
<ul class="tsd-parameter-list">
|
|
||||||
<li>
|
|
||||||
<h5>value: <a href="Position.Position.html" class="tsd-signature-type" data-tsd-kind="Class">Position</a></h5></li></ul></div>
|
|
||||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
||||||
<p>Inherited from Entity.position</p>
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Entity.ts#L48">Entity.ts:48</a></li></ul></aside></li></ul></section>
|
|
||||||
<section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><a id="showHitbox" class="tsd-anchor"></a>
|
|
||||||
<h3 class="tsd-anchor-link"><span>show<wbr/>Hitbox</span><a href="#showHitbox" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
||||||
<ul class="tsd-signatures tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited">
|
|
||||||
<li class="tsd-signature" id="showHitbox.showHitbox-1"><span class="tsd-signature-symbol">get</span> showHitbox<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
|
|
||||||
<li class="tsd-description">
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Get the hitbox's visibility.</p>
|
|
||||||
</div>
|
|
||||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><aside class="tsd-sources">
|
|
||||||
<p>Inherited from Entity.showHitbox</p>
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Entity.ts#L85">Entity.ts:85</a></li></ul></aside></li>
|
|
||||||
<li class="tsd-signature" id="showHitbox.showHitbox-2"><span class="tsd-signature-symbol">set</span> showHitbox<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
|
|
||||||
<li class="tsd-description">
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Set the hitbox's visibility.</p>
|
|
||||||
</div>
|
|
||||||
<div class="tsd-parameters">
|
|
||||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
||||||
<ul class="tsd-parameter-list">
|
|
||||||
<li>
|
|
||||||
<h5>value: <span class="tsd-signature-type">boolean</span></h5></li></ul></div>
|
|
||||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
||||||
<p>Inherited from Entity.showHitbox</p>
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Entity.ts#L93">Entity.ts:93</a></li></ul></aside></li></ul></section>
|
|
||||||
<section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="velocity" class="tsd-anchor"></a>
|
|
||||||
<h3 class="tsd-anchor-link"><span>velocity</span><a href="#velocity" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
||||||
<ul class="tsd-signatures tsd-kind-accessor tsd-parent-kind-class">
|
|
||||||
<li class="tsd-signature" id="velocity.velocity-1"><span class="tsd-signature-symbol">get</span> velocity<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li>
|
|
||||||
<li class="tsd-description">
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Gets the velocity.</p>
|
|
||||||
</div>
|
|
||||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources">
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Raspberry.ts#L64">Raspberry.ts:64</a></li></ul></aside></li>
|
|
||||||
<li class="tsd-signature" id="velocity.velocity-2"><span class="tsd-signature-symbol">set</span> velocity<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
|
|
||||||
<li class="tsd-description">
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Sets the velocity.</p>
|
|
||||||
</div>
|
|
||||||
<div class="tsd-parameters">
|
|
||||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
||||||
<ul class="tsd-parameter-list">
|
|
||||||
<li>
|
|
||||||
<h5>value: <span class="tsd-signature-type">number</span></h5></li></ul></div>
|
|
||||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Raspberry.ts#L72">Raspberry.ts:72</a></li></ul></aside></li></ul></section>
|
|
||||||
<section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><a id="width-1" class="tsd-anchor"></a>
|
|
||||||
<h3 class="tsd-anchor-link"><span>width</span><a href="#width-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
||||||
<ul class="tsd-signatures tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited">
|
|
||||||
<li class="tsd-signature" id="width-1.width-2"><span class="tsd-signature-symbol">get</span> width<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li>
|
|
||||||
<li class="tsd-description">
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Get width.</p>
|
|
||||||
</div>
|
|
||||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources">
|
|
||||||
<p>Inherited from Entity.width</p>
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Entity.ts#L55">Entity.ts:55</a></li></ul></aside></li>
|
|
||||||
<li class="tsd-signature" id="width-1.width-3"><span class="tsd-signature-symbol">set</span> width<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
|
|
||||||
<li class="tsd-description">
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Set width.</p>
|
|
||||||
</div>
|
|
||||||
<div class="tsd-parameters">
|
|
||||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
||||||
<ul class="tsd-parameter-list">
|
|
||||||
<li>
|
|
||||||
<h5>value: <span class="tsd-signature-type">number</span></h5></li></ul></div>
|
|
||||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
||||||
<p>Inherited from Entity.width</p>
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Entity.ts#L63">Entity.ts:63</a></li></ul></aside></li></ul></section></section>
|
|
||||||
<section class="tsd-panel-group tsd-member-group">
|
|
||||||
<h2>Methods</h2>
|
|
||||||
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-private"><a id="applyGravity" class="tsd-anchor"></a>
|
|
||||||
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>apply<wbr/>Gravity</span><a href="#applyGravity" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
||||||
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-private">
|
|
||||||
<li class="tsd-signature tsd-anchor-link" id="applyGravity.applyGravity-1">apply<wbr/>Gravity<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#applyGravity.applyGravity-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
|
||||||
<li class="tsd-description">
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Lets the Raspberry fall to the ground</p>
|
|
||||||
</div>
|
|
||||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Raspberry.ts#L114">Raspberry.ts:114</a></li></ul></aside></li></ul></section>
|
|
||||||
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="boost" class="tsd-anchor"></a>
|
|
||||||
<h3 class="tsd-anchor-link"><span>boost</span><a href="#boost" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
||||||
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
|
|
||||||
<li class="tsd-signature tsd-anchor-link" id="boost.boost-1">boost<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#boost.boost-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
|
||||||
<li class="tsd-description">
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Lets the raspberry jump.</p>
|
|
||||||
</div>
|
|
||||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Raspberry.ts#L153">Raspberry.ts:153</a></li></ul></aside></li></ul></section>
|
|
||||||
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-private"><a id="boundaryBottom" class="tsd-anchor"></a>
|
|
||||||
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>boundary<wbr/>Bottom</span><a href="#boundaryBottom" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
||||||
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-private">
|
|
||||||
<li class="tsd-signature tsd-anchor-link" id="boundaryBottom.boundaryBottom-1">boundary<wbr/>Bottom<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#boundaryBottom.boundaryBottom-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
|
||||||
<li class="tsd-description"><code class="tsd-tag ts-flagPrivate">Private</code>
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Forces the boundaries at the canvas' bottom.</p>
|
|
||||||
</div>
|
|
||||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Raspberry.ts#L143">Raspberry.ts:143</a></li></ul></aside></li></ul></section>
|
|
||||||
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-private"><a id="boundaryTop" class="tsd-anchor"></a>
|
|
||||||
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>boundary<wbr/>Top</span><a href="#boundaryTop" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
||||||
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-private">
|
|
||||||
<li class="tsd-signature tsd-anchor-link" id="boundaryTop.boundaryTop-1">boundary<wbr/>Top<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#boundaryTop.boundaryTop-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
|
||||||
<li class="tsd-description"><code class="tsd-tag ts-flagPrivate">Private</code>
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Forces the boundaries at the canvas' top.</p>
|
|
||||||
</div>
|
|
||||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Raspberry.ts#L132">Raspberry.ts:132</a></li></ul></aside></li></ul></section>
|
|
||||||
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="draw" class="tsd-anchor"></a>
|
|
||||||
<h3 class="tsd-anchor-link"><span>draw</span><a href="#draw" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
||||||
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
|
|
||||||
<li class="tsd-signature tsd-anchor-link" id="draw.draw-1">draw<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#draw.draw-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
|
||||||
<li class="tsd-description">
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Draws raspberry.</p>
|
|
||||||
</div>
|
|
||||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
||||||
<p>Overrides <a href="Entity.Entity.html">Entity</a>.<a href="Entity.Entity.html#draw">draw</a></p>
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Raspberry.ts#L160">Raspberry.ts:160</a></li></ul></aside></li></ul></section>
|
|
||||||
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-private"><a id="drawHitBox" class="tsd-anchor"></a>
|
|
||||||
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>draw<wbr/>Hit<wbr/>Box</span><a href="#drawHitBox" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
||||||
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-private">
|
|
||||||
<li class="tsd-signature tsd-anchor-link" id="drawHitBox.drawHitBox-1">draw<wbr/>Hit<wbr/>Box<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#drawHitBox.drawHitBox-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
|
||||||
<li class="tsd-description">
|
|
||||||
<div class="tsd-comment tsd-typography"><p>If enabled, draws the hitbox.</p>
|
|
||||||
</div>
|
|
||||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Raspberry.ts#L188">Raspberry.ts:188</a></li></ul></aside></li></ul></section>
|
|
||||||
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-private"><a id="drawObject" class="tsd-anchor"></a>
|
|
||||||
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>draw<wbr/>Object</span><a href="#drawObject" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
||||||
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-private">
|
|
||||||
<li class="tsd-signature tsd-anchor-link" id="drawObject.drawObject-1">draw<wbr/>Object<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#drawObject.drawObject-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
|
||||||
<li class="tsd-description"><code class="tsd-tag ts-flagPrivate">Private</code>
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Draws the rocket.</p>
|
|
||||||
</div>
|
|
||||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Raspberry.ts#L172">Raspberry.ts:172</a></li></ul></aside></li></ul></section>
|
|
||||||
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-private"><a id="drawRocket" class="tsd-anchor"></a>
|
|
||||||
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>draw<wbr/>Rocket</span><a href="#drawRocket" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
||||||
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-private">
|
|
||||||
<li class="tsd-signature tsd-anchor-link" id="drawRocket.drawRocket-1">draw<wbr/>Rocket<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#drawRocket.drawRocket-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
|
||||||
<li class="tsd-description">
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Handles the drawing of the object.</p>
|
|
||||||
</div>
|
|
||||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Raspberry.ts#L180">Raspberry.ts:180</a></li></ul></aside></li></ul></section>
|
|
||||||
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-private"><a id="forceBoundaries" class="tsd-anchor"></a>
|
|
||||||
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>force<wbr/>Boundaries</span><a href="#forceBoundaries" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
||||||
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-private">
|
|
||||||
<li class="tsd-signature tsd-anchor-link" id="forceBoundaries.forceBoundaries-1">force<wbr/>Boundaries<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#forceBoundaries.forceBoundaries-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
|
||||||
<li class="tsd-description"><code class="tsd-tag ts-flagPrivate">Private</code>
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Limits the raspberry's movement to the shown canvas.</p>
|
|
||||||
</div>
|
|
||||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Raspberry.ts#L123">Raspberry.ts:123</a></li></ul></aside></li></ul></section>
|
|
||||||
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-private"><a id="setPose" class="tsd-anchor"></a>
|
|
||||||
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>set<wbr/>Pose</span><a href="#setPose" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
||||||
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-private">
|
|
||||||
<li class="tsd-signature tsd-anchor-link" id="setPose.setPose-1">set<wbr/>Pose<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#setPose.setPose-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
|
||||||
<li class="tsd-description"><code class="tsd-tag ts-flagPrivate">Private</code>
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Rotation and position of the rocket.</p>
|
|
||||||
</div>
|
|
||||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Raspberry.ts#L198">Raspberry.ts:198</a></li></ul></aside></li></ul></section>
|
|
||||||
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="update" class="tsd-anchor"></a>
|
|
||||||
<h3 class="tsd-anchor-link"><span>update</span><a href="#update" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
||||||
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
|
|
||||||
<li class="tsd-signature tsd-anchor-link" id="update.update-1">update<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#update.update-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
|
||||||
<li class="tsd-description">
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Applies gravity and keeps the raspberry within the canvas.</p>
|
|
||||||
</div>
|
|
||||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
||||||
<p>Overrides <a href="Entity.Entity.html">Entity</a>.<a href="Entity.Entity.html#update">update</a></p>
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Raspberry.ts#L106">Raspberry.ts:106</a></li></ul></aside></li></ul></section></section></div>
|
|
||||||
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
|
|
||||||
<div class="tsd-navigation settings">
|
|
||||||
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
|
|
||||||
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg> Settings</h3></summary>
|
|
||||||
<div class="tsd-accordion-details">
|
|
||||||
<div class="tsd-filter-visibility">
|
|
||||||
<h4 class="uppercase">Member Visibility</h4><form>
|
|
||||||
<ul id="tsd-filter-options">
|
|
||||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li>
|
|
||||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-private" name="private"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Private</span></label></li>
|
|
||||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li>
|
|
||||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></form></div>
|
|
||||||
<div class="tsd-theme-toggle">
|
|
||||||
<h4 class="uppercase">Theme</h4><select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div>
|
|
||||||
<nav class="tsd-navigation primary">
|
|
||||||
<details class="tsd-index-accordion" open><summary class="tsd-accordion-summary">
|
|
||||||
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg> Modules</h3></summary>
|
|
||||||
<div class="tsd-accordion-details">
|
|
||||||
<ul>
|
|
||||||
<li class="current"><a href="../modules.html">Raspberry <wbr/>Rocketeer <wbr/>Docs</a>
|
|
||||||
<ul>
|
|
||||||
<li class="tsd-kind-module"><a href="../modules/Collidable.html">Collidable</a></li>
|
|
||||||
<li class="tsd-kind-module"><a href="../modules/Entity.html">Entity</a></li>
|
|
||||||
<li class="tsd-kind-module"><a href="../modules/Obstacle.html">Obstacle</a></li>
|
|
||||||
<li class="tsd-kind-module"><a href="../modules/Pipe.html">Pipe</a></li>
|
|
||||||
<li class="tsd-kind-module"><a href="../modules/Position.html">Position</a></li>
|
|
||||||
<li class="current selected tsd-kind-module"><a href="../modules/Raspberry.html">Raspberry</a></li></ul></li></ul></div></details></nav>
|
|
||||||
<nav class="tsd-navigation secondary menu-sticky">
|
|
||||||
<ul>
|
|
||||||
<li class="current tsd-kind-class tsd-parent-kind-module"><a href="Raspberry.Raspberry.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-128-path"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)" id="icon-128-text"></path></svg><span>Raspberry</span></a>
|
|
||||||
<ul>
|
|
||||||
<li class="tsd-kind-constructor tsd-parent-kind-class"><a href="Raspberry.Raspberry.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-512-path"></use><use href="#icon-512-text"></use></svg>constructor</a></li>
|
|
||||||
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><a href="Raspberry.Raspberry.html#_image" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>_image</a></li>
|
|
||||||
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><a href="Raspberry.Raspberry.html#_velocity" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>_velocity</a></li>
|
|
||||||
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><a href="Raspberry.Raspberry.html#gravity" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>gravity</a></li>
|
|
||||||
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><a href="Raspberry.Raspberry.html#lift" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>lift</a></li>
|
|
||||||
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><a href="Raspberry.Raspberry.html#FILL" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>FILL</a></li>
|
|
||||||
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><a href="Raspberry.Raspberry.html#HEIGHT" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>HEIGHT</a></li>
|
|
||||||
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><a href="Raspberry.Raspberry.html#WIDTH" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>WIDTH</a></li>
|
|
||||||
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><a href="Raspberry.Raspberry.html#maxVelocity" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>max<wbr/>Velocity</a></li>
|
|
||||||
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><a href="Raspberry.Raspberry.html#position" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>position</a></li>
|
|
||||||
<li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><a href="Raspberry.Raspberry.html#height-1" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg>height</a></li>
|
|
||||||
<li class="tsd-kind-accessor tsd-parent-kind-class"><a href="Raspberry.Raspberry.html#image" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg>image</a></li>
|
|
||||||
<li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><a href="Raspberry.Raspberry.html#position-1" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg>position</a></li>
|
|
||||||
<li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><a href="Raspberry.Raspberry.html#showHitbox" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg>show<wbr/>Hitbox</a></li>
|
|
||||||
<li class="tsd-kind-accessor tsd-parent-kind-class"><a href="Raspberry.Raspberry.html#velocity" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg>velocity</a></li>
|
|
||||||
<li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><a href="Raspberry.Raspberry.html#width-1" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg>width</a></li>
|
|
||||||
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-private"><a href="Raspberry.Raspberry.html#applyGravity" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg>apply<wbr/>Gravity</a></li>
|
|
||||||
<li class="tsd-kind-method tsd-parent-kind-class"><a href="Raspberry.Raspberry.html#boost" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg>boost</a></li>
|
|
||||||
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-private"><a href="Raspberry.Raspberry.html#boundaryBottom" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg>boundary<wbr/>Bottom</a></li>
|
|
||||||
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-private"><a href="Raspberry.Raspberry.html#boundaryTop" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg>boundary<wbr/>Top</a></li>
|
|
||||||
<li class="tsd-kind-method tsd-parent-kind-class"><a href="Raspberry.Raspberry.html#draw" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg>draw</a></li>
|
|
||||||
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-private"><a href="Raspberry.Raspberry.html#drawHitBox" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg>draw<wbr/>Hit<wbr/>Box</a></li>
|
|
||||||
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-private"><a href="Raspberry.Raspberry.html#drawObject" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg>draw<wbr/>Object</a></li>
|
|
||||||
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-private"><a href="Raspberry.Raspberry.html#drawRocket" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg>draw<wbr/>Rocket</a></li>
|
|
||||||
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-private"><a href="Raspberry.Raspberry.html#forceBoundaries" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg>force<wbr/>Boundaries</a></li>
|
|
||||||
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-private"><a href="Raspberry.Raspberry.html#setPose" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg>set<wbr/>Pose</a></li>
|
|
||||||
<li class="tsd-kind-method tsd-parent-kind-class"><a href="Raspberry.Raspberry.html#update" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg>update</a></li></ul></li></ul></nav></div></div>
|
|
||||||
<div class="container tsd-generator">
|
|
||||||
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div>
|
|
||||||
<div class="overlay"></div><script src="../assets/main.js"></script></body></html>
|
|
||||||
|
|
@ -1,95 +0,0 @@
|
||||||
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Collidable | Raspberry Rocketeer Docs</title><meta name="description" content="Documentation for Raspberry Rocketeer Docs"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
|
|
||||||
<div class="tsd-toolbar-contents container">
|
|
||||||
<div class="table-cell" id="tsd-search" data-base="..">
|
|
||||||
<div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
|
|
||||||
<div class="field">
|
|
||||||
<div id="tsd-toolbar-links"></div></div>
|
|
||||||
<ul class="results">
|
|
||||||
<li class="state loading">Preparing search index...</li>
|
|
||||||
<li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">Raspberry Rocketeer Docs</a></div>
|
|
||||||
<div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
|
|
||||||
<div class="container container-main">
|
|
||||||
<div class="col-8 col-content">
|
|
||||||
<div class="tsd-page-title">
|
|
||||||
<ul class="tsd-breadcrumb">
|
|
||||||
<li><a href="../modules.html">Raspberry Rocketeer Docs</a></li>
|
|
||||||
<li><a href="../modules/Collidable.html">Collidable</a></li>
|
|
||||||
<li><a href="Collidable.Collidable.html">Collidable</a></li></ul>
|
|
||||||
<h1>Interface Collidable</h1></div>
|
|
||||||
<section class="tsd-panel tsd-comment">
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Collide-able objects.</p>
|
|
||||||
</div></section>
|
|
||||||
<section class="tsd-panel tsd-hierarchy">
|
|
||||||
<h4>Hierarchy</h4>
|
|
||||||
<ul class="tsd-hierarchy">
|
|
||||||
<li><span class="target">Collidable</span></li></ul></section>
|
|
||||||
<section class="tsd-panel">
|
|
||||||
<h4>Implemented by</h4>
|
|
||||||
<ul class="tsd-hierarchy">
|
|
||||||
<li><a href="../classes/Obstacle.Obstacle.html" class="tsd-signature-type" data-tsd-kind="Class">Obstacle</a></li>
|
|
||||||
<li><a href="../classes/Pipe.Pipe.html" class="tsd-signature-type" data-tsd-kind="Class">Pipe</a></li></ul></section><aside class="tsd-sources">
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Collidable.ts#L4">Collidable.ts:4</a></li></ul></aside>
|
|
||||||
<section class="tsd-panel-group tsd-index-group">
|
|
||||||
<section class="tsd-panel tsd-index-panel">
|
|
||||||
<details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
|
|
||||||
<h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex=0><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M1.5 5.50969L8 11.6609L14.5 5.50969L12.5466 3.66086L8 7.96494L3.45341 3.66086L1.5 5.50969Z" fill="var(--color-text)"></path></svg> Index</h5></summary>
|
|
||||||
<div class="tsd-accordion-details">
|
|
||||||
<section class="tsd-index-section">
|
|
||||||
<h3 class="tsd-index-heading">Methods</h3>
|
|
||||||
<div class="tsd-index-list"><a href="Collidable.Collidable.html#collides" class="tsd-index-link tsd-kind-method tsd-parent-kind-interface"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#FF4DB8" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-2048-path"></rect><path d="M9.162 16V7.24H10.578L11.514 10.072C11.602 10.328 11.674 10.584 11.73 10.84C11.794 11.088 11.842 11.28 11.874 11.416C11.906 11.28 11.954 11.088 12.018 10.84C12.082 10.584 12.154 10.324 12.234 10.06L13.122 7.24H14.538V16H13.482V12.82C13.482 12.468 13.49 12.068 13.506 11.62C13.53 11.172 13.558 10.716 13.59 10.252C13.622 9.78 13.654 9.332 13.686 8.908C13.726 8.476 13.762 8.1 13.794 7.78L12.366 12.16H11.334L9.894 7.78C9.934 8.092 9.97 8.456 10.002 8.872C10.042 9.28 10.078 9.716 10.11 10.18C10.142 10.636 10.166 11.092 10.182 11.548C10.206 12.004 10.218 12.428 10.218 12.82V16H9.162Z" fill="var(--color-text)" id="icon-2048-text"></path></svg><span>collides</span></a>
|
|
||||||
</div></section></div></details></section></section>
|
|
||||||
<section class="tsd-panel-group tsd-member-group">
|
|
||||||
<h2>Methods</h2>
|
|
||||||
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="collides" class="tsd-anchor"></a>
|
|
||||||
<h3 class="tsd-anchor-link"><span>collides</span><a href="#collides" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none" id="icon-anchor-a"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5" id="icon-anchor-b"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5" id="icon-anchor-c"></path></svg></a></h3>
|
|
||||||
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface">
|
|
||||||
<li class="tsd-signature tsd-anchor-link" id="collides.collides-1">collides<span class="tsd-signature-symbol">(</span>o<span class="tsd-signature-symbol">: </span><a href="../classes/Entity.Entity.html" class="tsd-signature-type" data-tsd-kind="Class">Entity</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#collides.collides-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
|
||||||
<li class="tsd-description">
|
|
||||||
<div class="tsd-comment tsd-typography"><p>Determines when two entities collide</p>
|
|
||||||
</div>
|
|
||||||
<div class="tsd-parameters">
|
|
||||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
||||||
<ul class="tsd-parameter-list">
|
|
||||||
<li>
|
|
||||||
<h5>o: <a href="../classes/Entity.Entity.html" class="tsd-signature-type" data-tsd-kind="Class">Entity</a></h5>
|
|
||||||
<div class="tsd-comment tsd-typography"><p>other entity</p>
|
|
||||||
</div></li></ul></div>
|
|
||||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><aside class="tsd-sources">
|
|
||||||
<ul>
|
|
||||||
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Collidable.ts#L9">Collidable.ts:9</a></li></ul></aside></li></ul></section></section></div>
|
|
||||||
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
|
|
||||||
<div class="tsd-navigation settings">
|
|
||||||
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
|
|
||||||
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg> Settings</h3></summary>
|
|
||||||
<div class="tsd-accordion-details">
|
|
||||||
<div class="tsd-filter-visibility">
|
|
||||||
<h4 class="uppercase">Member Visibility</h4><form>
|
|
||||||
<ul id="tsd-filter-options">
|
|
||||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li>
|
|
||||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-private" name="private"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Private</span></label></li>
|
|
||||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li>
|
|
||||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></form></div>
|
|
||||||
<div class="tsd-theme-toggle">
|
|
||||||
<h4 class="uppercase">Theme</h4><select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div>
|
|
||||||
<nav class="tsd-navigation primary">
|
|
||||||
<details class="tsd-index-accordion" open><summary class="tsd-accordion-summary">
|
|
||||||
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg> Modules</h3></summary>
|
|
||||||
<div class="tsd-accordion-details">
|
|
||||||
<ul>
|
|
||||||
<li class="current"><a href="../modules.html">Raspberry <wbr/>Rocketeer <wbr/>Docs</a>
|
|
||||||
<ul>
|
|
||||||
<li class="current selected tsd-kind-module"><a href="../modules/Collidable.html">Collidable</a></li>
|
|
||||||
<li class="tsd-kind-module"><a href="../modules/Entity.html">Entity</a></li>
|
|
||||||
<li class="tsd-kind-module"><a href="../modules/Obstacle.html">Obstacle</a></li>
|
|
||||||
<li class="tsd-kind-module"><a href="../modules/Pipe.html">Pipe</a></li>
|
|
||||||
<li class="tsd-kind-module"><a href="../modules/Position.html">Position</a></li>
|
|
||||||
<li class="tsd-kind-module"><a href="../modules/Raspberry.html">Raspberry</a></li></ul></li></ul></div></details></nav>
|
|
||||||
<nav class="tsd-navigation secondary menu-sticky">
|
|
||||||
<ul>
|
|
||||||
<li class="current tsd-kind-interface tsd-parent-kind-module"><a href="Collidable.Collidable.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-interface)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-256-path"></rect><path d="M9.51 16V15.016H11.298V8.224H9.51V7.24H14.19V8.224H12.402V15.016H14.19V16H9.51Z" fill="var(--color-text)" id="icon-256-text"></path></svg><span>Collidable</span></a>
|
|
||||||
<ul>
|
|
||||||
<li class="tsd-kind-method tsd-parent-kind-interface"><a href="Collidable.Collidable.html#collides" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg>collides</a></li></ul></li></ul></nav></div></div>
|
|
||||||
<div class="container tsd-generator">
|
|
||||||
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div>
|
|
||||||
<div class="overlay"></div><script src="../assets/main.js"></script></body></html>
|
|
||||||
|
|
@ -1,56 +0,0 @@
|
||||||
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Raspberry Rocketeer Docs</title><meta name="description" content="Documentation for Raspberry Rocketeer Docs"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="assets/style.css"/><link rel="stylesheet" href="assets/highlight.css"/><script async src="assets/search.js" id="search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
|
|
||||||
<div class="tsd-toolbar-contents container">
|
|
||||||
<div class="table-cell" id="tsd-search" data-base=".">
|
|
||||||
<div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
|
|
||||||
<div class="field">
|
|
||||||
<div id="tsd-toolbar-links"></div></div>
|
|
||||||
<ul class="results">
|
|
||||||
<li class="state loading">Preparing search index...</li>
|
|
||||||
<li class="state failure">The search index is not available</li></ul><a href="index.html" class="title">Raspberry Rocketeer Docs</a></div>
|
|
||||||
<div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
|
|
||||||
<div class="container container-main">
|
|
||||||
<div class="col-8 col-content">
|
|
||||||
<div class="tsd-page-title">
|
|
||||||
<h2>Raspberry Rocketeer Docs</h2></div>
|
|
||||||
<section class="tsd-panel-group tsd-index-group">
|
|
||||||
<section class="tsd-panel tsd-index-panel">
|
|
||||||
<h3 class="tsd-index-heading uppercase">Index</h3>
|
|
||||||
<section class="tsd-index-section">
|
|
||||||
<h3 class="tsd-index-heading">Modules</h3>
|
|
||||||
<div class="tsd-index-list"><a href="modules/Collidable.html" class="tsd-index-link tsd-kind-module"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-namespace)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-4-path"></rect><path d="M9.33 16V7.24H10.77L13.446 14.74C13.43 14.54 13.41 14.296 13.386 14.008C13.37 13.712 13.354 13.404 13.338 13.084C13.33 12.756 13.326 12.448 13.326 12.16V7.24H14.37V16H12.93L10.266 8.5C10.282 8.692 10.298 8.936 10.314 9.232C10.33 9.52 10.342 9.828 10.35 10.156C10.366 10.476 10.374 10.784 10.374 11.08V16H9.33Z" fill="var(--color-text)" id="icon-4-text"></path></svg><span>Collidable</span></a>
|
|
||||||
<a href="modules/Entity.html" class="tsd-index-link tsd-kind-module"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-4-path"></use><use href="#icon-4-text"></use></svg><span>Entity</span></a>
|
|
||||||
<a href="modules/Obstacle.html" class="tsd-index-link tsd-kind-module"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-4-path"></use><use href="#icon-4-text"></use></svg><span>Obstacle</span></a>
|
|
||||||
<a href="modules/Pipe.html" class="tsd-index-link tsd-kind-module"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-4-path"></use><use href="#icon-4-text"></use></svg><span>Pipe</span></a>
|
|
||||||
<a href="modules/Position.html" class="tsd-index-link tsd-kind-module"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-4-path"></use><use href="#icon-4-text"></use></svg><span>Position</span></a>
|
|
||||||
<a href="modules/Raspberry.html" class="tsd-index-link tsd-kind-module"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-4-path"></use><use href="#icon-4-text"></use></svg><span>Raspberry</span></a>
|
|
||||||
</div></section></section></section></div>
|
|
||||||
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
|
|
||||||
<div class="tsd-navigation settings">
|
|
||||||
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
|
|
||||||
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg> Settings</h3></summary>
|
|
||||||
<div class="tsd-accordion-details">
|
|
||||||
<div class="tsd-filter-visibility">
|
|
||||||
<h4 class="uppercase">Member Visibility</h4><form>
|
|
||||||
<ul id="tsd-filter-options">
|
|
||||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li>
|
|
||||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-private" name="private"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Private</span></label></li>
|
|
||||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li>
|
|
||||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></form></div>
|
|
||||||
<div class="tsd-theme-toggle">
|
|
||||||
<h4 class="uppercase">Theme</h4><select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div>
|
|
||||||
<nav class="tsd-navigation primary">
|
|
||||||
<details class="tsd-index-accordion" open><summary class="tsd-accordion-summary">
|
|
||||||
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg> Modules</h3></summary>
|
|
||||||
<div class="tsd-accordion-details">
|
|
||||||
<ul>
|
|
||||||
<li class="current selected"><a href="modules.html">Raspberry <wbr/>Rocketeer <wbr/>Docs</a>
|
|
||||||
<ul>
|
|
||||||
<li class="tsd-kind-module"><a href="modules/Collidable.html">Collidable</a></li>
|
|
||||||
<li class="tsd-kind-module"><a href="modules/Entity.html">Entity</a></li>
|
|
||||||
<li class="tsd-kind-module"><a href="modules/Obstacle.html">Obstacle</a></li>
|
|
||||||
<li class="tsd-kind-module"><a href="modules/Pipe.html">Pipe</a></li>
|
|
||||||
<li class="tsd-kind-module"><a href="modules/Position.html">Position</a></li>
|
|
||||||
<li class="tsd-kind-module"><a href="modules/Raspberry.html">Raspberry</a></li></ul></li></ul></div></details></nav></div></div>
|
|
||||||
<div class="container tsd-generator">
|
|
||||||
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div>
|
|
||||||
<div class="overlay"></div><script src="assets/main.js"></script></body></html>
|
|
||||||
|
|
@ -1,59 +0,0 @@
|
||||||
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Collidable | Raspberry Rocketeer Docs</title><meta name="description" content="Documentation for Raspberry Rocketeer Docs"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
|
|
||||||
<div class="tsd-toolbar-contents container">
|
|
||||||
<div class="table-cell" id="tsd-search" data-base="..">
|
|
||||||
<div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
|
|
||||||
<div class="field">
|
|
||||||
<div id="tsd-toolbar-links"></div></div>
|
|
||||||
<ul class="results">
|
|
||||||
<li class="state loading">Preparing search index...</li>
|
|
||||||
<li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">Raspberry Rocketeer Docs</a></div>
|
|
||||||
<div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
|
|
||||||
<div class="container container-main">
|
|
||||||
<div class="col-8 col-content">
|
|
||||||
<div class="tsd-page-title">
|
|
||||||
<ul class="tsd-breadcrumb">
|
|
||||||
<li><a href="../modules.html">Raspberry Rocketeer Docs</a></li>
|
|
||||||
<li><a href="Collidable.html">Collidable</a></li></ul>
|
|
||||||
<h1>Module Collidable</h1></div>
|
|
||||||
<section class="tsd-panel-group">
|
|
||||||
<section class="tsd-panel tsd-typography"></section></section>
|
|
||||||
<section class="tsd-panel-group tsd-index-group">
|
|
||||||
<section class="tsd-panel tsd-index-panel">
|
|
||||||
<h3 class="tsd-index-heading uppercase">Index</h3>
|
|
||||||
<section class="tsd-index-section">
|
|
||||||
<h3 class="tsd-index-heading">Interfaces</h3>
|
|
||||||
<div class="tsd-index-list"><a href="../interfaces/Collidable.Collidable.html" class="tsd-index-link tsd-kind-interface tsd-parent-kind-module"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-interface)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-256-path"></rect><path d="M9.51 16V15.016H11.298V8.224H9.51V7.24H14.19V8.224H12.402V15.016H14.19V16H9.51Z" fill="var(--color-text)" id="icon-256-text"></path></svg><span>Collidable</span></a>
|
|
||||||
</div></section></section></section></div>
|
|
||||||
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
|
|
||||||
<div class="tsd-navigation settings">
|
|
||||||
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
|
|
||||||
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg> Settings</h3></summary>
|
|
||||||
<div class="tsd-accordion-details">
|
|
||||||
<div class="tsd-filter-visibility">
|
|
||||||
<h4 class="uppercase">Member Visibility</h4><form>
|
|
||||||
<ul id="tsd-filter-options">
|
|
||||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li>
|
|
||||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-private" name="private"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Private</span></label></li>
|
|
||||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li>
|
|
||||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></form></div>
|
|
||||||
<div class="tsd-theme-toggle">
|
|
||||||
<h4 class="uppercase">Theme</h4><select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div>
|
|
||||||
<nav class="tsd-navigation primary">
|
|
||||||
<details class="tsd-index-accordion" open><summary class="tsd-accordion-summary">
|
|
||||||
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg> Modules</h3></summary>
|
|
||||||
<div class="tsd-accordion-details">
|
|
||||||
<ul>
|
|
||||||
<li class="current"><a href="../modules.html">Raspberry <wbr/>Rocketeer <wbr/>Docs</a>
|
|
||||||
<ul>
|
|
||||||
<li class="current selected tsd-kind-module"><a href="Collidable.html">Collidable</a></li>
|
|
||||||
<li class="tsd-kind-module"><a href="Entity.html">Entity</a></li>
|
|
||||||
<li class="tsd-kind-module"><a href="Obstacle.html">Obstacle</a></li>
|
|
||||||
<li class="tsd-kind-module"><a href="Pipe.html">Pipe</a></li>
|
|
||||||
<li class="tsd-kind-module"><a href="Position.html">Position</a></li>
|
|
||||||
<li class="tsd-kind-module"><a href="Raspberry.html">Raspberry</a></li></ul></li></ul></div></details></nav>
|
|
||||||
<nav class="tsd-navigation secondary menu-sticky">
|
|
||||||
<ul>
|
|
||||||
<li class="tsd-kind-interface tsd-parent-kind-module"><a href="../interfaces/Collidable.Collidable.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg>Collidable</a></li></ul></nav></div></div>
|
|
||||||
<div class="container tsd-generator">
|
|
||||||
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div>
|
|
||||||
<div class="overlay"></div><script src="../assets/main.js"></script></body></html>
|
|
||||||
|
|
@ -1,59 +0,0 @@
|
||||||
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Entity | Raspberry Rocketeer Docs</title><meta name="description" content="Documentation for Raspberry Rocketeer Docs"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
|
|
||||||
<div class="tsd-toolbar-contents container">
|
|
||||||
<div class="table-cell" id="tsd-search" data-base="..">
|
|
||||||
<div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
|
|
||||||
<div class="field">
|
|
||||||
<div id="tsd-toolbar-links"></div></div>
|
|
||||||
<ul class="results">
|
|
||||||
<li class="state loading">Preparing search index...</li>
|
|
||||||
<li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">Raspberry Rocketeer Docs</a></div>
|
|
||||||
<div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
|
|
||||||
<div class="container container-main">
|
|
||||||
<div class="col-8 col-content">
|
|
||||||
<div class="tsd-page-title">
|
|
||||||
<ul class="tsd-breadcrumb">
|
|
||||||
<li><a href="../modules.html">Raspberry Rocketeer Docs</a></li>
|
|
||||||
<li><a href="Entity.html">Entity</a></li></ul>
|
|
||||||
<h1>Module Entity</h1></div>
|
|
||||||
<section class="tsd-panel-group">
|
|
||||||
<section class="tsd-panel tsd-typography"></section></section>
|
|
||||||
<section class="tsd-panel-group tsd-index-group">
|
|
||||||
<section class="tsd-panel tsd-index-panel">
|
|
||||||
<h3 class="tsd-index-heading uppercase">Index</h3>
|
|
||||||
<section class="tsd-index-section">
|
|
||||||
<h3 class="tsd-index-heading">Classes</h3>
|
|
||||||
<div class="tsd-index-list"><a href="../classes/Entity.Entity.html" class="tsd-index-link tsd-kind-class tsd-parent-kind-module"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-128-path"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)" id="icon-128-text"></path></svg><span>Entity</span></a>
|
|
||||||
</div></section></section></section></div>
|
|
||||||
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
|
|
||||||
<div class="tsd-navigation settings">
|
|
||||||
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
|
|
||||||
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg> Settings</h3></summary>
|
|
||||||
<div class="tsd-accordion-details">
|
|
||||||
<div class="tsd-filter-visibility">
|
|
||||||
<h4 class="uppercase">Member Visibility</h4><form>
|
|
||||||
<ul id="tsd-filter-options">
|
|
||||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li>
|
|
||||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-private" name="private"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Private</span></label></li>
|
|
||||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li>
|
|
||||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></form></div>
|
|
||||||
<div class="tsd-theme-toggle">
|
|
||||||
<h4 class="uppercase">Theme</h4><select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div>
|
|
||||||
<nav class="tsd-navigation primary">
|
|
||||||
<details class="tsd-index-accordion" open><summary class="tsd-accordion-summary">
|
|
||||||
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg> Modules</h3></summary>
|
|
||||||
<div class="tsd-accordion-details">
|
|
||||||
<ul>
|
|
||||||
<li class="current"><a href="../modules.html">Raspberry <wbr/>Rocketeer <wbr/>Docs</a>
|
|
||||||
<ul>
|
|
||||||
<li class="tsd-kind-module"><a href="Collidable.html">Collidable</a></li>
|
|
||||||
<li class="current selected tsd-kind-module"><a href="Entity.html">Entity</a></li>
|
|
||||||
<li class="tsd-kind-module"><a href="Obstacle.html">Obstacle</a></li>
|
|
||||||
<li class="tsd-kind-module"><a href="Pipe.html">Pipe</a></li>
|
|
||||||
<li class="tsd-kind-module"><a href="Position.html">Position</a></li>
|
|
||||||
<li class="tsd-kind-module"><a href="Raspberry.html">Raspberry</a></li></ul></li></ul></div></details></nav>
|
|
||||||
<nav class="tsd-navigation secondary menu-sticky">
|
|
||||||
<ul>
|
|
||||||
<li class="tsd-kind-class tsd-parent-kind-module"><a href="../classes/Entity.Entity.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg>Entity</a></li></ul></nav></div></div>
|
|
||||||
<div class="container tsd-generator">
|
|
||||||
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div>
|
|
||||||
<div class="overlay"></div><script src="../assets/main.js"></script></body></html>
|
|
||||||
|
|
@ -1,59 +0,0 @@
|
||||||
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Obstacle | Raspberry Rocketeer Docs</title><meta name="description" content="Documentation for Raspberry Rocketeer Docs"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
|
|
||||||
<div class="tsd-toolbar-contents container">
|
|
||||||
<div class="table-cell" id="tsd-search" data-base="..">
|
|
||||||
<div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
|
|
||||||
<div class="field">
|
|
||||||
<div id="tsd-toolbar-links"></div></div>
|
|
||||||
<ul class="results">
|
|
||||||
<li class="state loading">Preparing search index...</li>
|
|
||||||
<li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">Raspberry Rocketeer Docs</a></div>
|
|
||||||
<div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
|
|
||||||
<div class="container container-main">
|
|
||||||
<div class="col-8 col-content">
|
|
||||||
<div class="tsd-page-title">
|
|
||||||
<ul class="tsd-breadcrumb">
|
|
||||||
<li><a href="../modules.html">Raspberry Rocketeer Docs</a></li>
|
|
||||||
<li><a href="Obstacle.html">Obstacle</a></li></ul>
|
|
||||||
<h1>Module Obstacle</h1></div>
|
|
||||||
<section class="tsd-panel-group">
|
|
||||||
<section class="tsd-panel tsd-typography"></section></section>
|
|
||||||
<section class="tsd-panel-group tsd-index-group">
|
|
||||||
<section class="tsd-panel tsd-index-panel">
|
|
||||||
<h3 class="tsd-index-heading uppercase">Index</h3>
|
|
||||||
<section class="tsd-index-section">
|
|
||||||
<h3 class="tsd-index-heading">Classes</h3>
|
|
||||||
<div class="tsd-index-list"><a href="../classes/Obstacle.Obstacle.html" class="tsd-index-link tsd-kind-class tsd-parent-kind-module"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-128-path"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)" id="icon-128-text"></path></svg><span>Obstacle</span></a>
|
|
||||||
</div></section></section></section></div>
|
|
||||||
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
|
|
||||||
<div class="tsd-navigation settings">
|
|
||||||
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
|
|
||||||
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg> Settings</h3></summary>
|
|
||||||
<div class="tsd-accordion-details">
|
|
||||||
<div class="tsd-filter-visibility">
|
|
||||||
<h4 class="uppercase">Member Visibility</h4><form>
|
|
||||||
<ul id="tsd-filter-options">
|
|
||||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li>
|
|
||||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-private" name="private"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Private</span></label></li>
|
|
||||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li>
|
|
||||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></form></div>
|
|
||||||
<div class="tsd-theme-toggle">
|
|
||||||
<h4 class="uppercase">Theme</h4><select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div>
|
|
||||||
<nav class="tsd-navigation primary">
|
|
||||||
<details class="tsd-index-accordion" open><summary class="tsd-accordion-summary">
|
|
||||||
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg> Modules</h3></summary>
|
|
||||||
<div class="tsd-accordion-details">
|
|
||||||
<ul>
|
|
||||||
<li class="current"><a href="../modules.html">Raspberry <wbr/>Rocketeer <wbr/>Docs</a>
|
|
||||||
<ul>
|
|
||||||
<li class="tsd-kind-module"><a href="Collidable.html">Collidable</a></li>
|
|
||||||
<li class="tsd-kind-module"><a href="Entity.html">Entity</a></li>
|
|
||||||
<li class="current selected tsd-kind-module"><a href="Obstacle.html">Obstacle</a></li>
|
|
||||||
<li class="tsd-kind-module"><a href="Pipe.html">Pipe</a></li>
|
|
||||||
<li class="tsd-kind-module"><a href="Position.html">Position</a></li>
|
|
||||||
<li class="tsd-kind-module"><a href="Raspberry.html">Raspberry</a></li></ul></li></ul></div></details></nav>
|
|
||||||
<nav class="tsd-navigation secondary menu-sticky">
|
|
||||||
<ul>
|
|
||||||
<li class="tsd-kind-class tsd-parent-kind-module"><a href="../classes/Obstacle.Obstacle.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg>Obstacle</a></li></ul></nav></div></div>
|
|
||||||
<div class="container tsd-generator">
|
|
||||||
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div>
|
|
||||||
<div class="overlay"></div><script src="../assets/main.js"></script></body></html>
|
|
||||||
|
|
@ -1,59 +0,0 @@
|
||||||
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Pipe | Raspberry Rocketeer Docs</title><meta name="description" content="Documentation for Raspberry Rocketeer Docs"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
|
|
||||||
<div class="tsd-toolbar-contents container">
|
|
||||||
<div class="table-cell" id="tsd-search" data-base="..">
|
|
||||||
<div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
|
|
||||||
<div class="field">
|
|
||||||
<div id="tsd-toolbar-links"></div></div>
|
|
||||||
<ul class="results">
|
|
||||||
<li class="state loading">Preparing search index...</li>
|
|
||||||
<li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">Raspberry Rocketeer Docs</a></div>
|
|
||||||
<div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
|
|
||||||
<div class="container container-main">
|
|
||||||
<div class="col-8 col-content">
|
|
||||||
<div class="tsd-page-title">
|
|
||||||
<ul class="tsd-breadcrumb">
|
|
||||||
<li><a href="../modules.html">Raspberry Rocketeer Docs</a></li>
|
|
||||||
<li><a href="Pipe.html">Pipe</a></li></ul>
|
|
||||||
<h1>Module Pipe</h1></div>
|
|
||||||
<section class="tsd-panel-group">
|
|
||||||
<section class="tsd-panel tsd-typography"></section></section>
|
|
||||||
<section class="tsd-panel-group tsd-index-group">
|
|
||||||
<section class="tsd-panel tsd-index-panel">
|
|
||||||
<h3 class="tsd-index-heading uppercase">Index</h3>
|
|
||||||
<section class="tsd-index-section">
|
|
||||||
<h3 class="tsd-index-heading">Classes</h3>
|
|
||||||
<div class="tsd-index-list"><a href="../classes/Pipe.Pipe.html" class="tsd-index-link tsd-kind-class tsd-parent-kind-module"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-128-path"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)" id="icon-128-text"></path></svg><span>Pipe</span></a>
|
|
||||||
</div></section></section></section></div>
|
|
||||||
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
|
|
||||||
<div class="tsd-navigation settings">
|
|
||||||
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
|
|
||||||
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg> Settings</h3></summary>
|
|
||||||
<div class="tsd-accordion-details">
|
|
||||||
<div class="tsd-filter-visibility">
|
|
||||||
<h4 class="uppercase">Member Visibility</h4><form>
|
|
||||||
<ul id="tsd-filter-options">
|
|
||||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li>
|
|
||||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-private" name="private"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Private</span></label></li>
|
|
||||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li>
|
|
||||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></form></div>
|
|
||||||
<div class="tsd-theme-toggle">
|
|
||||||
<h4 class="uppercase">Theme</h4><select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div>
|
|
||||||
<nav class="tsd-navigation primary">
|
|
||||||
<details class="tsd-index-accordion" open><summary class="tsd-accordion-summary">
|
|
||||||
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg> Modules</h3></summary>
|
|
||||||
<div class="tsd-accordion-details">
|
|
||||||
<ul>
|
|
||||||
<li class="current"><a href="../modules.html">Raspberry <wbr/>Rocketeer <wbr/>Docs</a>
|
|
||||||
<ul>
|
|
||||||
<li class="tsd-kind-module"><a href="Collidable.html">Collidable</a></li>
|
|
||||||
<li class="tsd-kind-module"><a href="Entity.html">Entity</a></li>
|
|
||||||
<li class="tsd-kind-module"><a href="Obstacle.html">Obstacle</a></li>
|
|
||||||
<li class="current selected tsd-kind-module"><a href="Pipe.html">Pipe</a></li>
|
|
||||||
<li class="tsd-kind-module"><a href="Position.html">Position</a></li>
|
|
||||||
<li class="tsd-kind-module"><a href="Raspberry.html">Raspberry</a></li></ul></li></ul></div></details></nav>
|
|
||||||
<nav class="tsd-navigation secondary menu-sticky">
|
|
||||||
<ul>
|
|
||||||
<li class="tsd-kind-class tsd-parent-kind-module"><a href="../classes/Pipe.Pipe.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg>Pipe</a></li></ul></nav></div></div>
|
|
||||||
<div class="container tsd-generator">
|
|
||||||
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div>
|
|
||||||
<div class="overlay"></div><script src="../assets/main.js"></script></body></html>
|
|
||||||
|
|
@ -1,59 +0,0 @@
|
||||||
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Position | Raspberry Rocketeer Docs</title><meta name="description" content="Documentation for Raspberry Rocketeer Docs"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
|
|
||||||
<div class="tsd-toolbar-contents container">
|
|
||||||
<div class="table-cell" id="tsd-search" data-base="..">
|
|
||||||
<div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
|
|
||||||
<div class="field">
|
|
||||||
<div id="tsd-toolbar-links"></div></div>
|
|
||||||
<ul class="results">
|
|
||||||
<li class="state loading">Preparing search index...</li>
|
|
||||||
<li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">Raspberry Rocketeer Docs</a></div>
|
|
||||||
<div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
|
|
||||||
<div class="container container-main">
|
|
||||||
<div class="col-8 col-content">
|
|
||||||
<div class="tsd-page-title">
|
|
||||||
<ul class="tsd-breadcrumb">
|
|
||||||
<li><a href="../modules.html">Raspberry Rocketeer Docs</a></li>
|
|
||||||
<li><a href="Position.html">Position</a></li></ul>
|
|
||||||
<h1>Module Position</h1></div>
|
|
||||||
<section class="tsd-panel-group">
|
|
||||||
<section class="tsd-panel tsd-typography"></section></section>
|
|
||||||
<section class="tsd-panel-group tsd-index-group">
|
|
||||||
<section class="tsd-panel tsd-index-panel">
|
|
||||||
<h3 class="tsd-index-heading uppercase">Index</h3>
|
|
||||||
<section class="tsd-index-section">
|
|
||||||
<h3 class="tsd-index-heading">Classes</h3>
|
|
||||||
<div class="tsd-index-list"><a href="../classes/Position.Position.html" class="tsd-index-link tsd-kind-class tsd-parent-kind-module"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-128-path"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)" id="icon-128-text"></path></svg><span>Position</span></a>
|
|
||||||
</div></section></section></section></div>
|
|
||||||
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
|
|
||||||
<div class="tsd-navigation settings">
|
|
||||||
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
|
|
||||||
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg> Settings</h3></summary>
|
|
||||||
<div class="tsd-accordion-details">
|
|
||||||
<div class="tsd-filter-visibility">
|
|
||||||
<h4 class="uppercase">Member Visibility</h4><form>
|
|
||||||
<ul id="tsd-filter-options">
|
|
||||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li>
|
|
||||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-private" name="private"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Private</span></label></li>
|
|
||||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li>
|
|
||||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></form></div>
|
|
||||||
<div class="tsd-theme-toggle">
|
|
||||||
<h4 class="uppercase">Theme</h4><select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div>
|
|
||||||
<nav class="tsd-navigation primary">
|
|
||||||
<details class="tsd-index-accordion" open><summary class="tsd-accordion-summary">
|
|
||||||
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg> Modules</h3></summary>
|
|
||||||
<div class="tsd-accordion-details">
|
|
||||||
<ul>
|
|
||||||
<li class="current"><a href="../modules.html">Raspberry <wbr/>Rocketeer <wbr/>Docs</a>
|
|
||||||
<ul>
|
|
||||||
<li class="tsd-kind-module"><a href="Collidable.html">Collidable</a></li>
|
|
||||||
<li class="tsd-kind-module"><a href="Entity.html">Entity</a></li>
|
|
||||||
<li class="tsd-kind-module"><a href="Obstacle.html">Obstacle</a></li>
|
|
||||||
<li class="tsd-kind-module"><a href="Pipe.html">Pipe</a></li>
|
|
||||||
<li class="current selected tsd-kind-module"><a href="Position.html">Position</a></li>
|
|
||||||
<li class="tsd-kind-module"><a href="Raspberry.html">Raspberry</a></li></ul></li></ul></div></details></nav>
|
|
||||||
<nav class="tsd-navigation secondary menu-sticky">
|
|
||||||
<ul>
|
|
||||||
<li class="tsd-kind-class tsd-parent-kind-module"><a href="../classes/Position.Position.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg>Position</a></li></ul></nav></div></div>
|
|
||||||
<div class="container tsd-generator">
|
|
||||||
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div>
|
|
||||||
<div class="overlay"></div><script src="../assets/main.js"></script></body></html>
|
|
||||||
|
|
@ -1,59 +0,0 @@
|
||||||
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Raspberry | Raspberry Rocketeer Docs</title><meta name="description" content="Documentation for Raspberry Rocketeer Docs"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
|
|
||||||
<div class="tsd-toolbar-contents container">
|
|
||||||
<div class="table-cell" id="tsd-search" data-base="..">
|
|
||||||
<div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
|
|
||||||
<div class="field">
|
|
||||||
<div id="tsd-toolbar-links"></div></div>
|
|
||||||
<ul class="results">
|
|
||||||
<li class="state loading">Preparing search index...</li>
|
|
||||||
<li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">Raspberry Rocketeer Docs</a></div>
|
|
||||||
<div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
|
|
||||||
<div class="container container-main">
|
|
||||||
<div class="col-8 col-content">
|
|
||||||
<div class="tsd-page-title">
|
|
||||||
<ul class="tsd-breadcrumb">
|
|
||||||
<li><a href="../modules.html">Raspberry Rocketeer Docs</a></li>
|
|
||||||
<li><a href="Raspberry.html">Raspberry</a></li></ul>
|
|
||||||
<h1>Module Raspberry</h1></div>
|
|
||||||
<section class="tsd-panel-group">
|
|
||||||
<section class="tsd-panel tsd-typography"></section></section>
|
|
||||||
<section class="tsd-panel-group tsd-index-group">
|
|
||||||
<section class="tsd-panel tsd-index-panel">
|
|
||||||
<h3 class="tsd-index-heading uppercase">Index</h3>
|
|
||||||
<section class="tsd-index-section">
|
|
||||||
<h3 class="tsd-index-heading">Classes</h3>
|
|
||||||
<div class="tsd-index-list"><a href="../classes/Raspberry.Raspberry.html" class="tsd-index-link tsd-kind-class tsd-parent-kind-module"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-128-path"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)" id="icon-128-text"></path></svg><span>Raspberry</span></a>
|
|
||||||
</div></section></section></section></div>
|
|
||||||
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
|
|
||||||
<div class="tsd-navigation settings">
|
|
||||||
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
|
|
||||||
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg> Settings</h3></summary>
|
|
||||||
<div class="tsd-accordion-details">
|
|
||||||
<div class="tsd-filter-visibility">
|
|
||||||
<h4 class="uppercase">Member Visibility</h4><form>
|
|
||||||
<ul id="tsd-filter-options">
|
|
||||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li>
|
|
||||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-private" name="private"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Private</span></label></li>
|
|
||||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li>
|
|
||||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></form></div>
|
|
||||||
<div class="tsd-theme-toggle">
|
|
||||||
<h4 class="uppercase">Theme</h4><select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div>
|
|
||||||
<nav class="tsd-navigation primary">
|
|
||||||
<details class="tsd-index-accordion" open><summary class="tsd-accordion-summary">
|
|
||||||
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg> Modules</h3></summary>
|
|
||||||
<div class="tsd-accordion-details">
|
|
||||||
<ul>
|
|
||||||
<li class="current"><a href="../modules.html">Raspberry <wbr/>Rocketeer <wbr/>Docs</a>
|
|
||||||
<ul>
|
|
||||||
<li class="tsd-kind-module"><a href="Collidable.html">Collidable</a></li>
|
|
||||||
<li class="tsd-kind-module"><a href="Entity.html">Entity</a></li>
|
|
||||||
<li class="tsd-kind-module"><a href="Obstacle.html">Obstacle</a></li>
|
|
||||||
<li class="tsd-kind-module"><a href="Pipe.html">Pipe</a></li>
|
|
||||||
<li class="tsd-kind-module"><a href="Position.html">Position</a></li>
|
|
||||||
<li class="current selected tsd-kind-module"><a href="Raspberry.html">Raspberry</a></li></ul></li></ul></div></details></nav>
|
|
||||||
<nav class="tsd-navigation secondary menu-sticky">
|
|
||||||
<ul>
|
|
||||||
<li class="tsd-kind-class tsd-parent-kind-module"><a href="../classes/Raspberry.Raspberry.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg>Raspberry</a></li></ul></nav></div></div>
|
|
||||||
<div class="container tsd-generator">
|
|
||||||
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div>
|
|
||||||
<div class="overlay"></div><script src="../assets/main.js"></script></body></html>
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
> 1%
|
|
||||||
last 2 versions
|
|
||||||
not dead
|
|
||||||
not ie 11
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
node_modules
|
|
||||||
.gitignore
|
|
||||||
README.md
|
|
||||||
|
|
@ -1,19 +0,0 @@
|
||||||
module.exports = {
|
|
||||||
root: true,
|
|
||||||
env: {
|
|
||||||
node: true
|
|
||||||
},
|
|
||||||
'extends': [
|
|
||||||
'plugin:vue/vue3-essential',
|
|
||||||
'eslint:recommended',
|
|
||||||
'@vue/typescript/recommended'
|
|
||||||
],
|
|
||||||
parserOptions: {
|
|
||||||
ecmaVersion: 2020
|
|
||||||
},
|
|
||||||
rules: {
|
|
||||||
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
|
|
||||||
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
|
|
||||||
'vue/multi-word-component-names': 'off',
|
|
||||||
}
|
|
||||||
}
|
|
||||||
247
frontend/.gitignore
vendored
|
|
@ -1,24 +1,235 @@
|
||||||
.DS_Store
|
# Project exclude paths
|
||||||
node_modules
|
/frontend/node_modules/
|
||||||
/dist
|
|
||||||
|
|
||||||
|
# Created by https://www.toptal.com/developers/gitignore/api/node,phpstorm+all
|
||||||
|
# Edit at https://www.toptal.com/developers/gitignore?templates=node,phpstorm+all
|
||||||
|
|
||||||
# local env files
|
### Node ###
|
||||||
.env.local
|
# Logs
|
||||||
.env.*.local
|
logs
|
||||||
|
*.log
|
||||||
# Log files
|
|
||||||
npm-debug.log*
|
npm-debug.log*
|
||||||
yarn-debug.log*
|
yarn-debug.log*
|
||||||
yarn-error.log*
|
yarn-error.log*
|
||||||
pnpm-debug.log*
|
lerna-debug.log*
|
||||||
|
.pnpm-debug.log*
|
||||||
|
|
||||||
# Editor directories and files
|
# Diagnostic reports (https://nodejs.org/api/report.html)
|
||||||
.idea
|
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
|
||||||
.vscode
|
|
||||||
*.suo
|
# Runtime data
|
||||||
*.ntvs*
|
pids
|
||||||
*.njsproj
|
*.pid
|
||||||
*.sln
|
*.seed
|
||||||
*.sw?
|
*.pid.lock
|
||||||
/public/game/
|
|
||||||
|
# Directory for instrumented libs generated by jscoverage/JSCover
|
||||||
|
lib-cov
|
||||||
|
|
||||||
|
# Coverage directory used by tools like istanbul
|
||||||
|
coverage
|
||||||
|
*.lcov
|
||||||
|
|
||||||
|
# nyc test coverage
|
||||||
|
.nyc_output
|
||||||
|
|
||||||
|
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
|
||||||
|
.grunt
|
||||||
|
|
||||||
|
# Bower dependency directory (https://bower.io/)
|
||||||
|
bower_components
|
||||||
|
|
||||||
|
# node-waf configuration
|
||||||
|
.lock-wscript
|
||||||
|
|
||||||
|
# Compiled binary addons (https://nodejs.org/api/addons.html)
|
||||||
|
build/Release
|
||||||
|
|
||||||
|
# Dependency directories
|
||||||
|
node_modules/
|
||||||
|
jspm_packages/
|
||||||
|
|
||||||
|
# Snowpack dependency directory (https://snowpack.dev/)
|
||||||
|
web_modules/
|
||||||
|
|
||||||
|
# TypeScript cache
|
||||||
|
*.tsbuildinfo
|
||||||
|
|
||||||
|
# Optional npm cache directory
|
||||||
|
.npm
|
||||||
|
|
||||||
|
# Optional eslint cache
|
||||||
|
.eslintcache
|
||||||
|
|
||||||
|
# Optional stylelint cache
|
||||||
|
.stylelintcache
|
||||||
|
|
||||||
|
# Microbundle cache
|
||||||
|
.rpt2_cache/
|
||||||
|
.rts2_cache_cjs/
|
||||||
|
.rts2_cache_es/
|
||||||
|
.rts2_cache_umd/
|
||||||
|
|
||||||
|
# Optional REPL history
|
||||||
|
.node_repl_history
|
||||||
|
|
||||||
|
# Output of 'npm pack'
|
||||||
|
*.tgz
|
||||||
|
|
||||||
|
# Yarn Integrity file
|
||||||
|
.yarn-integrity
|
||||||
|
|
||||||
|
# dotenv environment variable files
|
||||||
|
.env
|
||||||
|
.env.development.local
|
||||||
|
.env.test.local
|
||||||
|
.env.production.local
|
||||||
|
.env.local
|
||||||
|
|
||||||
|
# parcel-bundler cache (https://parceljs.org/)
|
||||||
|
.cache
|
||||||
|
.parcel-cache
|
||||||
|
|
||||||
|
# Next.js build output
|
||||||
|
.next
|
||||||
|
out
|
||||||
|
|
||||||
|
# Nuxt.js build / generate output
|
||||||
|
.nuxt
|
||||||
|
dist
|
||||||
|
|
||||||
|
# Gatsby files
|
||||||
|
.cache/
|
||||||
|
# Comment in the public line in if your project uses Gatsby and not Next.js
|
||||||
|
# https://nextjs.org/blog/next-9-1#public-directory-support
|
||||||
|
# public
|
||||||
|
|
||||||
|
# vuepress build output
|
||||||
|
.vuepress/dist
|
||||||
|
|
||||||
|
# vuepress v2.x temp and cache directory
|
||||||
|
.temp
|
||||||
|
|
||||||
|
# Docusaurus cache and generated files
|
||||||
|
.docusaurus
|
||||||
|
|
||||||
|
# Serverless directories
|
||||||
|
.serverless/
|
||||||
|
|
||||||
|
# FuseBox cache
|
||||||
|
.fusebox/
|
||||||
|
|
||||||
|
# DynamoDB Local files
|
||||||
|
.dynamodb/
|
||||||
|
|
||||||
|
# TernJS port file
|
||||||
|
.tern-port
|
||||||
|
|
||||||
|
# Stores VSCode versions used for testing VSCode extensions
|
||||||
|
.vscode-test
|
||||||
|
|
||||||
|
# yarn v2
|
||||||
|
.yarn/cache
|
||||||
|
.yarn/unplugged
|
||||||
|
.yarn/build-state.yml
|
||||||
|
.yarn/install-state.gz
|
||||||
|
.pnp.*
|
||||||
|
|
||||||
|
### Node Patch ###
|
||||||
|
# Serverless Webpack directories
|
||||||
|
.webpack/
|
||||||
|
|
||||||
|
# Optional stylelint cache
|
||||||
|
|
||||||
|
# SvelteKit build / generate output
|
||||||
|
.svelte-kit
|
||||||
|
|
||||||
|
### PhpStorm+all ###
|
||||||
|
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
|
||||||
|
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
||||||
|
|
||||||
|
# User-specific stuff
|
||||||
|
.idea/**/workspace.xml
|
||||||
|
.idea/**/tasks.xml
|
||||||
|
.idea/**/usage.statistics.xml
|
||||||
|
.idea/**/dictionaries
|
||||||
|
.idea/**/shelf
|
||||||
|
|
||||||
|
# AWS User-specific
|
||||||
|
.idea/**/aws.xml
|
||||||
|
|
||||||
|
# Generated files
|
||||||
|
.idea/**/contentModel.xml
|
||||||
|
|
||||||
|
# Sensitive or high-churn files
|
||||||
|
.idea/**/dataSources/
|
||||||
|
.idea/**/dataSources.ids
|
||||||
|
.idea/**/dataSources.local.xml
|
||||||
|
.idea/**/sqlDataSources.xml
|
||||||
|
.idea/**/dynamic.xml
|
||||||
|
.idea/**/uiDesigner.xml
|
||||||
|
.idea/**/dbnavigator.xml
|
||||||
|
|
||||||
|
# Gradle
|
||||||
|
.idea/**/gradle.xml
|
||||||
|
.idea/**/libraries
|
||||||
|
|
||||||
|
# Gradle and Maven with auto-import
|
||||||
|
# When using Gradle or Maven with auto-import, you should exclude module files,
|
||||||
|
# since they will be recreated, and may cause churn. Uncomment if using
|
||||||
|
# auto-import.
|
||||||
|
# .idea/artifacts
|
||||||
|
# .idea/compiler.xml
|
||||||
|
# .idea/jarRepositories.xml
|
||||||
|
# .idea/modules.xml
|
||||||
|
# .idea/*.iml
|
||||||
|
# .idea/modules
|
||||||
|
# *.iml
|
||||||
|
# *.ipr
|
||||||
|
|
||||||
|
# CMake
|
||||||
|
cmake-build-*/
|
||||||
|
|
||||||
|
# Mongo Explorer plugin
|
||||||
|
.idea/**/mongoSettings.xml
|
||||||
|
|
||||||
|
# File-based project format
|
||||||
|
*.iws
|
||||||
|
|
||||||
|
# IntelliJ
|
||||||
|
out/
|
||||||
|
|
||||||
|
# mpeltonen/sbt-idea plugin
|
||||||
|
.idea_modules/
|
||||||
|
|
||||||
|
# JIRA plugin
|
||||||
|
atlassian-ide-plugin.xml
|
||||||
|
|
||||||
|
# Cursive Clojure plugin
|
||||||
|
.idea/replstate.xml
|
||||||
|
|
||||||
|
# SonarLint plugin
|
||||||
|
.idea/sonarlint/
|
||||||
|
|
||||||
|
# Crashlytics plugin (for Android Studio and IntelliJ)
|
||||||
|
com_crashlytics_export_strings.xml
|
||||||
|
crashlytics.properties
|
||||||
|
crashlytics-build.properties
|
||||||
|
fabric.properties
|
||||||
|
|
||||||
|
# Editor-based Rest Client
|
||||||
|
.idea/httpRequests
|
||||||
|
|
||||||
|
# Android studio 3.1+ serialized cache file
|
||||||
|
.idea/caches/build_file_checksums.ser
|
||||||
|
|
||||||
|
### PhpStorm+all Patch ###
|
||||||
|
# Ignore everything but code style settings and run configurations
|
||||||
|
# that are supposed to be shared within teams.
|
||||||
|
|
||||||
|
.idea/*
|
||||||
|
|
||||||
|
!.idea/codeStyles
|
||||||
|
!.idea/runConfigurations
|
||||||
|
|
||||||
|
# End of https://www.toptal.com/developers/gitignore/api/node,phpstorm+all
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
FROM node:18
|
|
||||||
|
|
||||||
COPY . /app
|
|
||||||
WORKDIR /app
|
|
||||||
|
|
||||||
RUN npm install
|
|
||||||
|
|
||||||
EXPOSE 8080
|
|
||||||
|
|
||||||
ENTRYPOINT ["npm", "run", "serve"]
|
|
||||||
|
|
||||||
|
|
@ -1,24 +1,48 @@
|
||||||
# raspberryrocketeer
|
```mermaid
|
||||||
|
classDiagram
|
||||||
|
Entity <|-- Raspberry
|
||||||
|
Entity <|-- Obstacle
|
||||||
|
Entity <|-- Pipe
|
||||||
|
Entity: -number fill
|
||||||
|
Entity: +Position position
|
||||||
|
Entity: +number width
|
||||||
|
Entity: +number height
|
||||||
|
Entity: +abstract update()
|
||||||
|
Entity: +draw()
|
||||||
|
Entity: -detectCollision(Entity other)
|
||||||
|
|
||||||
## Project setup
|
class Raspberry{
|
||||||
```
|
-number lift
|
||||||
npm install
|
-number gravity
|
||||||
```
|
-static number maxVelocity
|
||||||
|
+number velocity
|
||||||
|
|
||||||
### Compiles and hot-reloads for development
|
-applyGravity()
|
||||||
```
|
-forceBoundaries()
|
||||||
npm run serve
|
-boost()
|
||||||
```
|
+update()
|
||||||
|
}
|
||||||
|
|
||||||
### Compiles and minifies for production
|
class Obstacle{
|
||||||
```
|
-Entity pipeTop
|
||||||
npm run build
|
-Entity pipeBottom
|
||||||
```
|
-number distanceBetweenPipes
|
||||||
|
-number padding
|
||||||
|
-number speed
|
||||||
|
-static number startX
|
||||||
|
|
||||||
### Lints and fixes files
|
-randomRange()
|
||||||
```
|
+resetPosition()
|
||||||
npm run lint
|
+update()
|
||||||
```
|
+draw()
|
||||||
|
}
|
||||||
|
|
||||||
### Customize configuration
|
class Pipe {
|
||||||
See [Configuration Reference](https://cli.vuejs.org/config/).
|
+update()
|
||||||
|
}
|
||||||
|
|
||||||
|
class Position{
|
||||||
|
+int x
|
||||||
|
+int y
|
||||||
|
}
|
||||||
|
```
|
||||||
131
frontend/game.ts
Normal file
|
|
@ -0,0 +1,131 @@
|
||||||
|
// TODO: Refactor
|
||||||
|
const pipeImagePath: string = "resources/raspberry-low-res.png";
|
||||||
|
const obstacleWidth: number = 88;
|
||||||
|
let obstacleOffset: number;
|
||||||
|
const backgroundImagePath: string = "resources/raspberry-low-res.png";
|
||||||
|
let backgroundImage: any;
|
||||||
|
const raspberryImagePath: string = "resources/raspberry-rocket.png";
|
||||||
|
|
||||||
|
let obstacles: Obstacle[] = [];
|
||||||
|
let raspberry: Raspberry;
|
||||||
|
let paused: boolean;
|
||||||
|
let score: number;
|
||||||
|
let hasAlreadyScored: boolean;
|
||||||
|
|
||||||
|
function setup() {
|
||||||
|
backgroundImage = loadImage(backgroundImagePath);
|
||||||
|
createCanvas(2000, 1000);
|
||||||
|
obstacleOffset = width / 3;
|
||||||
|
|
||||||
|
textSize(150);
|
||||||
|
textFont("resources/JetBrains-Mono-Regular.ttf");
|
||||||
|
|
||||||
|
setupGame();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets up everything needed for the game
|
||||||
|
*/
|
||||||
|
function setupGame() {
|
||||||
|
paused = true;
|
||||||
|
|
||||||
|
score = 0;
|
||||||
|
raspberry = new Raspberry();
|
||||||
|
raspberry.image = raspberryImagePath;
|
||||||
|
|
||||||
|
// Create all obstacles
|
||||||
|
// TODO: Loop
|
||||||
|
obstacles = [];
|
||||||
|
obstacles.push(new Obstacle(
|
||||||
|
new Position(width, 0),
|
||||||
|
obstacleWidth,
|
||||||
|
height,
|
||||||
|
pipeImagePath,
|
||||||
|
));
|
||||||
|
obstacles.push(new Obstacle(
|
||||||
|
new Position(width + obstacleOffset, 0),
|
||||||
|
obstacleWidth,
|
||||||
|
height,
|
||||||
|
pipeImagePath,
|
||||||
|
));
|
||||||
|
obstacles.push(new Obstacle(
|
||||||
|
new Position(width + obstacleOffset * 2, 0),
|
||||||
|
obstacleWidth,
|
||||||
|
height,
|
||||||
|
pipeImagePath,
|
||||||
|
));
|
||||||
|
|
||||||
|
// Randomize position of all Obstacles
|
||||||
|
obstacles.forEach((obstacle) => obstacle.randomizeHeight());
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO: Split into funciton
|
||||||
|
function draw() {
|
||||||
|
background(backgroundImage)
|
||||||
|
if (!paused) {
|
||||||
|
raspberry.update();
|
||||||
|
}
|
||||||
|
raspberry.draw();
|
||||||
|
|
||||||
|
// Reset Obstacles Position
|
||||||
|
obstacles.forEach((obstacle) => {
|
||||||
|
if (!paused) {
|
||||||
|
obstacle.update();
|
||||||
|
checkObstacleReset(obstacle);
|
||||||
|
}
|
||||||
|
|
||||||
|
obstacle.draw();
|
||||||
|
});
|
||||||
|
|
||||||
|
// Check for collisions with pipes and set score
|
||||||
|
if (!paused) {
|
||||||
|
if (obstacles[0].collides(raspberry)) {
|
||||||
|
setupGame();
|
||||||
|
}
|
||||||
|
checkRaspberryScore();
|
||||||
|
obstacles[0].draw();
|
||||||
|
}
|
||||||
|
|
||||||
|
push();
|
||||||
|
fill(200, 100, 60);
|
||||||
|
text(score, width / 2, height / 10, width, height);
|
||||||
|
pop();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if obstacle positions should be reset and reset if so
|
||||||
|
* @param obstacle obstacle to check
|
||||||
|
*/
|
||||||
|
function checkObstacleReset(obstacle: Obstacle) {
|
||||||
|
if (obstacle.position.x < -obstacleWidth) {
|
||||||
|
obstacle.resetPosition();
|
||||||
|
obstacles.shift();
|
||||||
|
obstacles.push(obstacle);
|
||||||
|
hasAlreadyScored = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if the raspberry should score and set score
|
||||||
|
*/
|
||||||
|
function checkRaspberryScore() {
|
||||||
|
if ((obstacles[0].position.x + obstacles[0].width / 2) < (raspberry.position.x + raspberry.width / 2)
|
||||||
|
&& !hasAlreadyScored) {
|
||||||
|
score += 1;
|
||||||
|
hasAlreadyScored = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function keyPressed() {
|
||||||
|
// Jump
|
||||||
|
if (key.toLowerCase() == "k") {
|
||||||
|
raspberry.boost();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Pause the Game
|
||||||
|
if (key == "Escape") {
|
||||||
|
paused = !paused;
|
||||||
|
} else if (paused) {
|
||||||
|
paused = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,239 +0,0 @@
|
||||||
const PIPE_IMAGE_PATH: string = "resources/raspberry-low-res.png";
|
|
||||||
const BACKGROUND_IMAGE_PATH: string = "resources/raspberry-low-res.png";
|
|
||||||
const RASPBERRY_IMAGE_PATH: string = "resources/raspberry-rocket.png";
|
|
||||||
const OBSTACLE_WIDTH: number = 88;
|
|
||||||
const OBSTACLE_COUNT: number = 3;
|
|
||||||
const BOOST_KEYS = ["k", " "];
|
|
||||||
let obstacleOffset: number;
|
|
||||||
let backgroundImage: any;
|
|
||||||
|
|
||||||
let obstacles: Obstacle[] = [];
|
|
||||||
let raspberry: Raspberry;
|
|
||||||
let paused: boolean;
|
|
||||||
let score: number = 0;
|
|
||||||
let hasAlreadyScored: boolean = false;
|
|
||||||
let hasDied: boolean = false;
|
|
||||||
let ready: boolean = true;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* p5 setup function.
|
|
||||||
*/
|
|
||||||
function setup() {
|
|
||||||
backgroundImage = loadImage(BACKGROUND_IMAGE_PATH);
|
|
||||||
createCanvas(1200, 750);
|
|
||||||
setupObstacleConsts();
|
|
||||||
setupFont();
|
|
||||||
setupGame();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets up the constants needed for the game.
|
|
||||||
*/
|
|
||||||
function setupObstacleConsts() {
|
|
||||||
obstacleOffset = width / OBSTACLE_COUNT;
|
|
||||||
Obstacle.distanceBetweenPipes = height / 2.5
|
|
||||||
Obstacle.startX = width;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Set up the font.
|
|
||||||
*/
|
|
||||||
function setupFont() {
|
|
||||||
textSize(150);
|
|
||||||
textFont(loadFont("resources/PressStart2P-Regular.ttf"));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets up everything needed for the game.
|
|
||||||
*/
|
|
||||||
function setupGame() {
|
|
||||||
paused = true;
|
|
||||||
raspberry = new Raspberry(RASPBERRY_IMAGE_PATH);
|
|
||||||
setupObstacles();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Clears the obstacles and reinitializes them.
|
|
||||||
*/
|
|
||||||
function setupObstacles() {
|
|
||||||
obstacles = [];
|
|
||||||
instantiateObstacles(OBSTACLE_COUNT);
|
|
||||||
obstacles.forEach((obstacle) => obstacle.randomizeHeight());
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Instantiates a certain amount of obstacles.
|
|
||||||
* @param number
|
|
||||||
*/
|
|
||||||
function instantiateObstacles(number: number) {
|
|
||||||
for (let i = 0; i < number; i++) {
|
|
||||||
obstacles.push(
|
|
||||||
new Obstacle(new Position(width + obstacleOffset * i, 0), OBSTACLE_WIDTH, height, PIPE_IMAGE_PATH));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Draws and updates the game.
|
|
||||||
*/
|
|
||||||
function draw() {
|
|
||||||
update();
|
|
||||||
gameLoop();
|
|
||||||
drawGame();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Draws the game's elements.
|
|
||||||
*/
|
|
||||||
function drawGame() {
|
|
||||||
background(backgroundImage);
|
|
||||||
drawEntities();
|
|
||||||
displayScore();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Draws the game's enities.
|
|
||||||
*/
|
|
||||||
function drawEntities() {
|
|
||||||
raspberry.draw();
|
|
||||||
drawObstacles();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Operations for the game's functionality.
|
|
||||||
*/
|
|
||||||
function gameLoop() {
|
|
||||||
if (!paused) {
|
|
||||||
collisionCheck(obstacles[0]);
|
|
||||||
checkRaspberryScore();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Checks the collision between an obstacle and the raspberry.
|
|
||||||
* @param o
|
|
||||||
*/
|
|
||||||
function collisionCheck(o: Obstacle) {
|
|
||||||
if (o.collides(raspberry)) {
|
|
||||||
die();
|
|
||||||
setupGame();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Timeouts key events.
|
|
||||||
*/
|
|
||||||
function die() {
|
|
||||||
ready = false;
|
|
||||||
hasDied = true;
|
|
||||||
setTimeout(() => ready = true, 1000);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Displays the game score.
|
|
||||||
*/
|
|
||||||
function displayScore() {
|
|
||||||
push();
|
|
||||||
fill(200, 100, 60);
|
|
||||||
text(score, width / 2, height / 10, width, height);
|
|
||||||
pop();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Updates all objects.
|
|
||||||
*/
|
|
||||||
function update() {
|
|
||||||
if (!paused) {
|
|
||||||
raspberry.update();
|
|
||||||
}
|
|
||||||
obstacles.forEach((obstacle: Obstacle) => {
|
|
||||||
if (!paused) {
|
|
||||||
obstacle.update();
|
|
||||||
// Reset Obstacles Position
|
|
||||||
checkObstacleReset(obstacle);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Draws the obstacles.
|
|
||||||
*/
|
|
||||||
function drawObstacles() {
|
|
||||||
obstacles.forEach((obstacle) => {
|
|
||||||
obstacle.draw();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if obstacle positions should be reset and reset if so
|
|
||||||
* @param obstacle obstacle to check
|
|
||||||
*/
|
|
||||||
function checkObstacleReset(obstacle: Obstacle) {
|
|
||||||
if (obstacle.position.x < -OBSTACLE_WIDTH) {
|
|
||||||
obstacle.resetPosition();
|
|
||||||
obstacles.shift();
|
|
||||||
obstacles.push(obstacle);
|
|
||||||
hasAlreadyScored = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if the raspberry should score and set score
|
|
||||||
*/
|
|
||||||
function checkRaspberryScore() {
|
|
||||||
if ((obstacles[0].position.x + obstacles[0].width / 2) < (raspberry.position.x + raspberry.width / 2)
|
|
||||||
&& !hasAlreadyScored) {
|
|
||||||
score += 1;
|
|
||||||
hasAlreadyScored = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Resets the score if game is started
|
|
||||||
*/
|
|
||||||
function resetScore(): void {
|
|
||||||
if (hasDied) {
|
|
||||||
hasDied = false;
|
|
||||||
score = 0;
|
|
||||||
hasAlreadyScored = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Handler for key events.
|
|
||||||
*/
|
|
||||||
function keyPressed() {
|
|
||||||
if (!ready) return;
|
|
||||||
// Jump
|
|
||||||
if (BOOST_KEYS.includes(key.toLowerCase())) {
|
|
||||||
playerInput();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Pause the Game
|
|
||||||
if (key == "Escape") {
|
|
||||||
paused = !paused;
|
|
||||||
} else if (paused) {
|
|
||||||
paused = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Mouse clicked event.
|
|
||||||
*/
|
|
||||||
function mouseClicked() {
|
|
||||||
if (!ready) return;
|
|
||||||
|
|
||||||
if (paused) {
|
|
||||||
paused = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
playerInput();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Handles input for the player, when a key is pressed, or the mouse is clicked.
|
|
||||||
*/
|
|
||||||
function playerInput() {
|
|
||||||
resetScore();
|
|
||||||
raspberry.boost();
|
|
||||||
}
|
|
||||||
4
frontend/game/global.d.ts
vendored
|
|
@ -1,4 +0,0 @@
|
||||||
// This file will add both p5 instanced and global intellisense
|
|
||||||
import module = require('p5');
|
|
||||||
export = module;
|
|
||||||
export as namespace p5;
|
|
||||||
|
|
@ -1,202 +0,0 @@
|
||||||
/**
|
|
||||||
* Raspberry class.
|
|
||||||
*/
|
|
||||||
class Raspberry extends Entity {
|
|
||||||
/**
|
|
||||||
* Amount of lift applied when boosting.
|
|
||||||
* @private
|
|
||||||
*/
|
|
||||||
private readonly lift: number = -15;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gravity applied.
|
|
||||||
* @private
|
|
||||||
*/
|
|
||||||
private readonly gravity: number = 0.45;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Current speed.
|
|
||||||
* @private
|
|
||||||
*/
|
|
||||||
private _velocity: number = 0;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Image for the raspberry.
|
|
||||||
* @private
|
|
||||||
*/
|
|
||||||
private _image: p5.Image;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Position.
|
|
||||||
* @private
|
|
||||||
*/
|
|
||||||
private static position: Position;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Maximum velocity, so the raspberry doesn't get to infinite speed when boosting.
|
|
||||||
* @private
|
|
||||||
*/
|
|
||||||
private static readonly maxVelocity: number = 75;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Width.
|
|
||||||
* @private
|
|
||||||
*/
|
|
||||||
private static readonly WIDTH: number = 180;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Height.
|
|
||||||
* @private
|
|
||||||
*/
|
|
||||||
private static readonly HEIGHT: number = 70;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Color.
|
|
||||||
* @private
|
|
||||||
*/
|
|
||||||
private static readonly FILL: number = 0;
|
|
||||||
|
|
||||||
//region Getter & Setter
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the velocity.
|
|
||||||
*/
|
|
||||||
get velocity(): number {
|
|
||||||
return this._velocity;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the velocity.
|
|
||||||
* @param value
|
|
||||||
*/
|
|
||||||
set velocity(value: number) {
|
|
||||||
this._velocity = (Math.abs(this.velocity) > Raspberry.maxVelocity) ? -Raspberry.maxVelocity : value;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the image.
|
|
||||||
*/
|
|
||||||
get image(): p5.Image {
|
|
||||||
return this._image;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the image by path.
|
|
||||||
* @param {string} path
|
|
||||||
*/
|
|
||||||
set image(path: any) {
|
|
||||||
this._image = loadImage(path);
|
|
||||||
}
|
|
||||||
|
|
||||||
//endregion
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructs the Raspberry with fixed sizes.
|
|
||||||
* @param image Path to image
|
|
||||||
*/
|
|
||||||
constructor(image: string) {
|
|
||||||
Raspberry.position = new Position(width / 6, height / 2);
|
|
||||||
super(Raspberry.position, Raspberry.WIDTH, Raspberry.HEIGHT, Raspberry.FILL);
|
|
||||||
this.image = image;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Applies gravity and keeps the raspberry within the canvas.
|
|
||||||
*/
|
|
||||||
public update(): void {
|
|
||||||
this.applyGravity();
|
|
||||||
this.forceBoundaries();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Lets the Raspberry fall to the ground
|
|
||||||
*/
|
|
||||||
private applyGravity(): void {
|
|
||||||
this.velocity += this.gravity;
|
|
||||||
this.position.y += this.velocity;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Limits the raspberry's movement to the shown canvas.
|
|
||||||
* @private
|
|
||||||
*/
|
|
||||||
private forceBoundaries(): void {
|
|
||||||
this.boundaryTop();
|
|
||||||
this.boundaryBottom();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Forces the boundaries at the canvas' top.
|
|
||||||
* @private
|
|
||||||
*/
|
|
||||||
private boundaryTop(): void {
|
|
||||||
if (this.position.y < 0) {
|
|
||||||
this.position.y = 0;
|
|
||||||
this.velocity = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Forces the boundaries at the canvas' bottom.
|
|
||||||
* @private
|
|
||||||
*/
|
|
||||||
private boundaryBottom(): void {
|
|
||||||
if (this.position.y + this.height > height) {
|
|
||||||
this.position.y = height - this.height;
|
|
||||||
this.velocity = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Lets the raspberry jump.
|
|
||||||
*/
|
|
||||||
public boost(): void {
|
|
||||||
this.velocity += this.lift;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Draws raspberry.
|
|
||||||
*/
|
|
||||||
public draw(): void {
|
|
||||||
push();
|
|
||||||
noFill();
|
|
||||||
this.setPose();
|
|
||||||
this.drawObject();
|
|
||||||
pop();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Draws the rocket.
|
|
||||||
* @private
|
|
||||||
*/
|
|
||||||
private drawObject() {
|
|
||||||
this.drawHitBox();
|
|
||||||
this.drawRocket();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Handles the drawing of the object.
|
|
||||||
*/
|
|
||||||
private drawRocket() {
|
|
||||||
image(this.image, 0, 0, this.width, this.height);
|
|
||||||
rect(0, 0, this.width, this.height);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* If enabled, draws the hitbox.
|
|
||||||
*/
|
|
||||||
private drawHitBox() {
|
|
||||||
if (!this.showHitbox) {
|
|
||||||
noStroke();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Rotation and position of the rocket.
|
|
||||||
* @private
|
|
||||||
*/
|
|
||||||
private setPose() {
|
|
||||||
translate(this.position.x, this.position.y);
|
|
||||||
rotate((PI / 2) * (this.velocity / Raspberry.maxVelocity));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
||||||
{
|
|
||||||
"compilerOptions": {
|
|
||||||
"noImplicitAny": true,
|
|
||||||
"outFile": "../public/game.js",
|
|
||||||
"preserveConstEnums": true,
|
|
||||||
"removeComments": true,
|
|
||||||
"rootDir": ".",
|
|
||||||
"sourceMap": true,
|
|
||||||
"target": "es5",
|
|
||||||
"moduleResolution": "node",
|
|
||||||
"lib": [
|
|
||||||
"dom",
|
|
||||||
"es5",
|
|
||||||
"scripthost"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
5
frontend/global.d.ts
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
// This file will add both p5 instanced and global intellisence
|
||||||
|
import * as p5Global from 'p5/global'
|
||||||
|
import module = require('p5');
|
||||||
|
export = module;
|
||||||
|
export as namespace p5;
|
||||||
16
frontend/index.html
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>Raspberyy Rocketeer</title>
|
||||||
|
<script src="build/build.js"></script>
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.4.0/p5.min.js"
|
||||||
|
integrity="sha512-N4kV7GkNv7QR7RX9YF/olywyIgIwNvfEe2nZtfyj73HdjCUkAfOBDbcuJ/cTaN04JKRnw1YG1wnUyNKMsNgg3g=="
|
||||||
|
crossorigin="anonymous"
|
||||||
|
referrerpolicy="no-referrer">
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<main></main>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -1,6 +1,3 @@
|
||||||
/**
|
|
||||||
* Collide-able objects.
|
|
||||||
*/
|
|
||||||
interface Collidable {
|
interface Collidable {
|
||||||
/**
|
/**
|
||||||
* Determines when two entities collide
|
* Determines when two entities collide
|
||||||
|
|
@ -1,102 +1,46 @@
|
||||||
/**
|
|
||||||
* General rectangular entities.
|
|
||||||
*/
|
|
||||||
abstract class Entity {
|
abstract class Entity {
|
||||||
/**
|
|
||||||
* Position.
|
|
||||||
* @private
|
|
||||||
*/
|
|
||||||
private _position: Position;
|
private _position: Position;
|
||||||
|
|
||||||
/**
|
|
||||||
* Width.
|
|
||||||
* @private
|
|
||||||
*/
|
|
||||||
private _width: number;
|
private _width: number;
|
||||||
|
|
||||||
/**
|
|
||||||
* Height.
|
|
||||||
* @private
|
|
||||||
*/
|
|
||||||
private _height: number;
|
private _height: number;
|
||||||
|
|
||||||
/**
|
|
||||||
* Color.
|
|
||||||
* @private
|
|
||||||
*/
|
|
||||||
private fill: number;
|
private fill: number;
|
||||||
|
|
||||||
/**
|
|
||||||
* Whether the hitbox (rectangular surrounding) is shown, or not.
|
|
||||||
* @private
|
|
||||||
*/
|
|
||||||
private _showHitbox: boolean;
|
private _showHitbox: boolean;
|
||||||
|
|
||||||
//region Getter & Setter
|
//region Getter & Setter
|
||||||
|
|
||||||
/**
|
|
||||||
* Get position.
|
|
||||||
*/
|
|
||||||
get position(): Position {
|
get position(): Position {
|
||||||
return this._position;
|
return this._position;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Set position.
|
|
||||||
* @param value
|
|
||||||
*/
|
|
||||||
set position(value: Position) {
|
set position(value: Position) {
|
||||||
this._position = value;
|
this._position = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get width.
|
|
||||||
*/
|
|
||||||
get width(): number {
|
get width(): number {
|
||||||
return this._width;
|
return this._width;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Set width.
|
|
||||||
* @param value
|
|
||||||
*/
|
|
||||||
set width(value: number) {
|
set width(value: number) {
|
||||||
this._width = value;
|
this._width = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get height.
|
|
||||||
*/
|
|
||||||
get height(): number {
|
get height(): number {
|
||||||
return this._height;
|
return this._height;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Set height.
|
|
||||||
* @param value
|
|
||||||
*/
|
|
||||||
set height(value: number) {
|
set height(value: number) {
|
||||||
this._height = value;
|
this._height = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the hitbox's visibility.
|
|
||||||
*/
|
|
||||||
get showHitbox(): boolean {
|
get showHitbox(): boolean {
|
||||||
return this._showHitbox;
|
return this._showHitbox;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Set the hitbox's visibility.
|
|
||||||
* @param value
|
|
||||||
*/
|
|
||||||
set showHitbox(value: boolean) {
|
set showHitbox(value: boolean) {
|
||||||
this._showHitbox = value;
|
this._showHitbox = value;
|
||||||
}
|
}
|
||||||
//endregion
|
//endregion
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructs the Entity.
|
* Constructs the Entity
|
||||||
* @param position starting Position
|
* @param position starting Position
|
||||||
* @param width entity width
|
* @param width entity width
|
||||||
* @param height entity height
|
* @param height entity height
|
||||||
|
|
@ -110,14 +54,8 @@ abstract class Entity {
|
||||||
this._showHitbox = false;
|
this._showHitbox = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Updates the entity.
|
|
||||||
*/
|
|
||||||
public abstract update(): void;
|
public abstract update(): void;
|
||||||
|
|
||||||
/**
|
|
||||||
* Draws the entity.
|
|
||||||
*/
|
|
||||||
public draw(): void {
|
public draw(): void {
|
||||||
push();
|
push();
|
||||||
fill(this.fill);
|
fill(this.fill);
|
||||||
|
|
@ -1,25 +1,15 @@
|
||||||
/**
|
|
||||||
* Obstacle of the game. Built from 2 pipes, one at the bottom, one at the top.
|
|
||||||
*/
|
|
||||||
class Obstacle extends Entity implements Collidable {
|
class Obstacle extends Entity implements Collidable {
|
||||||
private pipeTop: Pipe;
|
private pipeTop: Pipe;
|
||||||
private pipeBottom: Pipe;
|
private pipeBottom: Pipe;
|
||||||
|
private static distanceBetweenPipes: number;
|
||||||
private readonly padding: number = 150;
|
private readonly padding: number = 150;
|
||||||
private readonly speed: number = 3;
|
private readonly speed: number = 3;
|
||||||
|
|
||||||
private static _distanceBetweenPipes: number;
|
private static startX: number;
|
||||||
private static _startX: number;
|
|
||||||
|
|
||||||
static set startX(value: number) {
|
|
||||||
this._startX = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
static set distanceBetweenPipes(value: number) {
|
|
||||||
this._distanceBetweenPipes = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructs the Obstacle with the given image.
|
* Constructs the Obstacle with the given image
|
||||||
|
* (fill is not used here)
|
||||||
* @param position starting position of the obstacle
|
* @param position starting position of the obstacle
|
||||||
* @param obstacleWidth width of the obstacle
|
* @param obstacleWidth width of the obstacle
|
||||||
* @param obstacleHeight height of the obstacle
|
* @param obstacleHeight height of the obstacle
|
||||||
|
|
@ -27,20 +17,14 @@ class Obstacle extends Entity implements Collidable {
|
||||||
*/
|
*/
|
||||||
constructor(position: Position, obstacleWidth: number, obstacleHeight: number, pipeImagePath: string) {
|
constructor(position: Position, obstacleWidth: number, obstacleHeight: number, pipeImagePath: string) {
|
||||||
super(position, obstacleWidth, obstacleHeight, 0);
|
super(position, obstacleWidth, obstacleHeight, 0);
|
||||||
this.createPipes(position, obstacleHeight, obstacleWidth, pipeImagePath);
|
this.pipeTop = new Pipe(position.x, obstacleWidth, obstacleHeight);
|
||||||
}
|
this.pipeBottom = new Pipe(position.x, obstacleWidth, obstacleHeight);
|
||||||
|
this.pipeTop.image = pipeImagePath;
|
||||||
|
this.pipeBottom.image = pipeImagePath;
|
||||||
|
|
||||||
/**
|
Obstacle.distanceBetweenPipes = height / 2.5;
|
||||||
* Creates the pipes.
|
//TODO: Put into setupGame()
|
||||||
* @param position
|
Obstacle.startX = width;
|
||||||
* @param obstacleHeight
|
|
||||||
* @param obstacleWidth
|
|
||||||
* @param pipeImagePath
|
|
||||||
* @private
|
|
||||||
*/
|
|
||||||
private createPipes(position: Position, obstacleHeight: number, obstacleWidth: number, pipeImagePath: string) {
|
|
||||||
this.pipeTop = new Pipe(position.x, obstacleWidth, obstacleHeight, pipeImagePath);
|
|
||||||
this.pipeBottom = new Pipe(position.x, obstacleWidth, obstacleHeight, pipeImagePath);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -49,16 +33,19 @@ class Obstacle extends Entity implements Collidable {
|
||||||
*/
|
*/
|
||||||
public resetPosition(): void {
|
public resetPosition(): void {
|
||||||
this.randomizeHeight();
|
this.randomizeHeight();
|
||||||
this.pipeBottom.position.x = Obstacle._startX;
|
|
||||||
this.pipeTop.position.x = Obstacle._startX;
|
this.pipeBottom.position.x = Obstacle.startX;
|
||||||
|
this.pipeTop.position.x = Obstacle.startX;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Randomizes the height of the pipes
|
* Randomizes the height of the pipes
|
||||||
*/
|
*/
|
||||||
public randomizeHeight(): void {
|
public randomizeHeight(): void {
|
||||||
this.pipeTop.height = this.randomRange(this.padding, height - this.padding - Obstacle._distanceBetweenPipes);
|
this.pipeTop.height = this.randomRange(this.padding, height - this.padding - Obstacle.distanceBetweenPipes);
|
||||||
this.pipeBottom.position.y = this.pipeTop.height + Obstacle._distanceBetweenPipes;
|
//TODO: Soi des do sei?
|
||||||
|
this.pipeTop.position.y = 0;
|
||||||
|
this.pipeBottom.position.y = this.pipeTop.height + Obstacle.distanceBetweenPipes;
|
||||||
this.pipeBottom.height = height - this.pipeTop.height - this.padding;
|
this.pipeBottom.height = height - this.pipeTop.height - this.padding;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -72,8 +59,9 @@ class Obstacle extends Entity implements Collidable {
|
||||||
}
|
}
|
||||||
|
|
||||||
public update(): void {
|
public update(): void {
|
||||||
this.pipeTop.move(this.speed);
|
// TODO: Put into pipe.update
|
||||||
this.pipeBottom.move(this.speed);
|
this.pipeTop.position.x -= this.speed;
|
||||||
|
this.pipeBottom.position.x -= this.speed;
|
||||||
this.position.x = this.pipeTop.position.x;
|
this.position.x = this.pipeTop.position.x;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1,66 +1,42 @@
|
||||||
/**
|
|
||||||
* Rectangular obstacle.
|
|
||||||
*/
|
|
||||||
class Pipe extends Entity implements Collidable {
|
class Pipe extends Entity implements Collidable {
|
||||||
/**
|
private _image: any;
|
||||||
* Pipe's image.
|
|
||||||
* @private
|
|
||||||
*/
|
|
||||||
private _image: p5.Image;
|
|
||||||
|
|
||||||
//region Getter & Setter
|
//region Getter & Setter
|
||||||
/**
|
get image(): any {
|
||||||
* Gets the image.
|
|
||||||
*/
|
|
||||||
get image(): p5.Image {
|
|
||||||
return this._image;
|
return this._image;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
set image(path: string) {
|
||||||
* Sets the image.
|
|
||||||
* @param path Path to image
|
|
||||||
*/
|
|
||||||
set image(path: any) {
|
|
||||||
this._image = loadImage(path);
|
this._image = loadImage(path);
|
||||||
}
|
}
|
||||||
//endregion
|
//endregion
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructs the pipe.
|
* Constructs the pipe
|
||||||
* @param positionX starting x-Position
|
* @param positionX starting x-Position
|
||||||
* @param width pipe width
|
* @param width pipe width
|
||||||
* @param height pipe height
|
* @param height pipe height
|
||||||
* @param image path to image.
|
|
||||||
*/
|
*/
|
||||||
constructor(positionX: number, width: number, height: number, image: string) {
|
constructor(positionX: number, width: number, height: number) {
|
||||||
super(new Position(positionX, 0), width, height, 0);
|
super(new Position(positionX, 0), width, height, 0);
|
||||||
this.image = image;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
public update(): void {
|
||||||
* YAGNI.
|
}
|
||||||
*/
|
|
||||||
public update(): void {}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Draws the pipe.
|
|
||||||
*/
|
|
||||||
public draw(): void {
|
public draw(): void {
|
||||||
push();
|
push();
|
||||||
noFill();
|
|
||||||
image(this.image, this.position.x, this.position.y, this.width, this.height);
|
image(this.image, this.position.x, this.position.y, this.width, this.height);
|
||||||
rect(this.position.x, this.position.y, this.width, this.height);
|
noFill();
|
||||||
|
rect(
|
||||||
|
this.position.x,
|
||||||
|
this.position.y,
|
||||||
|
this.width,
|
||||||
|
this.height
|
||||||
|
);
|
||||||
pop();
|
pop();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Moves the pipe to the lift with the given speed
|
|
||||||
* @param speed how fast the pipe moves
|
|
||||||
*/
|
|
||||||
public move(speed: number): void {
|
|
||||||
this.position.x -= speed;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determines when the pipe is colliding with another entity
|
* Determines when the pipe is colliding with another entity
|
||||||
* @param o other entity
|
* @param o other entity
|
||||||
|
|
@ -1,54 +1,27 @@
|
||||||
/**
|
|
||||||
* 2D Point.
|
|
||||||
*/
|
|
||||||
class Position {
|
class Position {
|
||||||
/**
|
|
||||||
* X coordinate.
|
|
||||||
* @private
|
|
||||||
*/
|
|
||||||
private _x: number;
|
private _x: number;
|
||||||
|
|
||||||
/**
|
|
||||||
* Y coordinate.
|
|
||||||
* @private
|
|
||||||
*/
|
|
||||||
private _y: number;
|
private _y: number;
|
||||||
|
|
||||||
//region Getter & Setter
|
//region Getter & Setter
|
||||||
|
|
||||||
/**
|
|
||||||
* Get x.
|
|
||||||
*/
|
|
||||||
get x(): number {
|
get x(): number {
|
||||||
return this._x;
|
return this._x;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Set x.
|
|
||||||
* @param value
|
|
||||||
*/
|
|
||||||
set x(value: number) {
|
set x(value: number) {
|
||||||
this._x = value;
|
this._x = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get y.
|
|
||||||
*/
|
|
||||||
get y(): number {
|
get y(): number {
|
||||||
return this._y;
|
return this._y;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Set y.
|
|
||||||
* @param value
|
|
||||||
*/
|
|
||||||
set y(value: number) {
|
set y(value: number) {
|
||||||
this._y = value;
|
this._y = value;
|
||||||
}
|
}
|
||||||
//endregion
|
//endregion
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructs the position.
|
* Constructs the position
|
||||||
* @param x x-Position
|
* @param x x-Position
|
||||||
* @param y y-Position
|
* @param y y-Position
|
||||||
*/
|
*/
|
||||||
81
frontend/model/Raspberry.ts
Normal file
|
|
@ -0,0 +1,81 @@
|
||||||
|
class Raspberry extends Entity {
|
||||||
|
private readonly lift: number = -20;
|
||||||
|
private readonly gravity: number = 1.314159265358979323846264338;
|
||||||
|
private _velocity: number = 0;
|
||||||
|
private _image: any;
|
||||||
|
private static readonly maxVelocity: number = 100;
|
||||||
|
|
||||||
|
//region Getter & Setter
|
||||||
|
get velocity(): number {
|
||||||
|
return this._velocity;
|
||||||
|
}
|
||||||
|
|
||||||
|
set velocity(value: number) {
|
||||||
|
this._velocity = (Math.abs(this.velocity) > Raspberry.maxVelocity) ? Raspberry.maxVelocity : value;
|
||||||
|
}
|
||||||
|
|
||||||
|
get image(): any {
|
||||||
|
return this._image;
|
||||||
|
}
|
||||||
|
|
||||||
|
set image(path: string) {
|
||||||
|
this._image = loadImage(path);
|
||||||
|
}
|
||||||
|
|
||||||
|
//endregion
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructs the Raspberry with fixed sizes
|
||||||
|
*/
|
||||||
|
constructor() {
|
||||||
|
// TODO: Move literals to consta
|
||||||
|
super(new Position(width / 6, height / 2), 180, 70, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
public update(): void {
|
||||||
|
this.applyGravity();
|
||||||
|
this.forceBoundaries();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Lets the Raspberry fall to the ground
|
||||||
|
*/
|
||||||
|
private applyGravity(): void {
|
||||||
|
this.velocity += this.gravity;
|
||||||
|
this.position.y += this.velocity;
|
||||||
|
}
|
||||||
|
|
||||||
|
private forceBoundaries(): void {
|
||||||
|
if (this.position.y + this.height > height) {
|
||||||
|
this.position.y = height - this.height;
|
||||||
|
this.velocity = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.position.y < 0) {
|
||||||
|
this.position.y = 0;
|
||||||
|
this.velocity = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public boost(): void {
|
||||||
|
this.velocity += this.lift;
|
||||||
|
}
|
||||||
|
|
||||||
|
public draw(): void {
|
||||||
|
push();
|
||||||
|
noFill();
|
||||||
|
translate(this.position.x, this.position.y);
|
||||||
|
rotate((PI / 2) * (this.velocity / Raspberry.maxVelocity));
|
||||||
|
image(this.image, 0, 0, this.width, this.height);
|
||||||
|
if (!this.showHitbox) {
|
||||||
|
noStroke();
|
||||||
|
}
|
||||||
|
rect(
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
this.width,
|
||||||
|
this.height
|
||||||
|
);
|
||||||
|
pop();
|
||||||
|
}
|
||||||
|
}
|
||||||
17852
frontend/package-lock.json
generated
|
|
@ -1,20 +1,14 @@
|
||||||
{
|
{
|
||||||
"name": "raspberryrocketeer",
|
|
||||||
"version": "0.1.0",
|
|
||||||
"private": true,
|
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"serve": "vue-cli-service serve",
|
"test": "echo \"Error: no test specified\" && exit 1",
|
||||||
"build": "npm run build-game && vue-cli-service build",
|
"start": "run-p start-compile start-run",
|
||||||
"build-game": "tsc -p ./game",
|
"start-compile": "tsc --watch",
|
||||||
"lint": "vue-cli-service lint"
|
"start-run": "browser-sync start --server -w"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"bootstrap": "^5.2.3",
|
"@types/p5": "^1.4.3",
|
||||||
"vue": "^3.2.13",
|
"browser-sync": "^2.27.10",
|
||||||
"@vue/cli-service": "~5.0.0"
|
"npm-run-all": "^4.1.5",
|
||||||
},
|
"p5": "^1.5.0"
|
||||||
"devDependencies": {
|
|
||||||
"@vue/cli-plugin-typescript": "~5.0.0",
|
|
||||||
"typescript": "~4.5.5"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
Before Width: | Height: | Size: 4.2 KiB |
|
|
@ -1,519 +0,0 @@
|
||||||
var __extends = (this && this.__extends) || (function(){
|
|
||||||
var extendStatics = function(d, b){
|
|
||||||
extendStatics = Object.setPrototypeOf ||
|
|
||||||
({__proto__: []} instanceof Array && function(d, b){
|
|
||||||
d.__proto__ = b;
|
|
||||||
}) ||
|
|
||||||
function(d, b){
|
|
||||||
for(var p in b) if(Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
|
|
||||||
};
|
|
||||||
return extendStatics(d, b);
|
|
||||||
};
|
|
||||||
return function(d, b){
|
|
||||||
if(typeof b !== "function" && b !== null)
|
|
||||||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
||||||
extendStatics(d, b);
|
|
||||||
|
|
||||||
function __(){
|
|
||||||
this.constructor = d;
|
|
||||||
}
|
|
||||||
|
|
||||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
||||||
};
|
|
||||||
})();
|
|
||||||
var PIPE_IMAGE_PATH = "resources/dell-pc-min-min-small.png";
|
|
||||||
var BACKGROUND_IMAGE_PATH = "resources/htl-steyr-front.jpg";
|
|
||||||
var RASPBERRY_IMAGE_PATH = "resources/raspberry-rocket.png";
|
|
||||||
var FLOOR_IMAGE_PATH = "resources/table-min-min.png";
|
|
||||||
var FONT_PATH = "resources/PressStart2P-Regular.ttf";
|
|
||||||
var OBSTACLE_COUNT = 3;
|
|
||||||
var BOOST_KEYS = ["k", " "];
|
|
||||||
var floorHeight;
|
|
||||||
var obstacleWidth;
|
|
||||||
var obstacleOffset;
|
|
||||||
var backgroundImage;
|
|
||||||
var pipeImage;
|
|
||||||
var floorImage;
|
|
||||||
var font;
|
|
||||||
var obstacles = [];
|
|
||||||
var raspberry;
|
|
||||||
var startTime;
|
|
||||||
var playTime;
|
|
||||||
var score = 0;
|
|
||||||
var paused;
|
|
||||||
var hasAlreadyScored = false;
|
|
||||||
var hasDied = true;
|
|
||||||
var ready = true;
|
|
||||||
|
|
||||||
function preload(){
|
|
||||||
font = loadFont(FONT_PATH);
|
|
||||||
backgroundImage = loadImage(BACKGROUND_IMAGE_PATH);
|
|
||||||
pipeImage = loadImage(PIPE_IMAGE_PATH);
|
|
||||||
floorImage = loadImage(FLOOR_IMAGE_PATH);
|
|
||||||
}
|
|
||||||
|
|
||||||
function setup(){
|
|
||||||
createCanvas(1085, 600);
|
|
||||||
floorHeight = height / 5;
|
|
||||||
setupObstacleConsts();
|
|
||||||
setupFont();
|
|
||||||
setupGame();
|
|
||||||
var originalSetItem = localStorage.setItem;
|
|
||||||
localStorage.setItem = function(key, value){
|
|
||||||
var event = new Event('itemInserted');
|
|
||||||
|
|
||||||
event.value = value; // Optional..
|
|
||||||
event.key = key; // Optional..
|
|
||||||
window.dispatchEvent(event);
|
|
||||||
originalSetItem.apply(this, arguments);
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
function setupObstacleConsts(){
|
|
||||||
obstacleOffset = width / OBSTACLE_COUNT;
|
|
||||||
obstacleWidth = width / 22.727272727272727272;
|
|
||||||
Obstacle.distanceBetweenPipes = height / 2.5;
|
|
||||||
Obstacle.startX = width;
|
|
||||||
}
|
|
||||||
|
|
||||||
function setupFont(){
|
|
||||||
textSize(75);
|
|
||||||
textAlign(CENTER);
|
|
||||||
textFont(font);
|
|
||||||
}
|
|
||||||
|
|
||||||
function setupGame(){
|
|
||||||
paused = true;
|
|
||||||
raspberry = new Raspberry(RASPBERRY_IMAGE_PATH);
|
|
||||||
setupObstacles();
|
|
||||||
}
|
|
||||||
|
|
||||||
function setupObstacles(){
|
|
||||||
obstacles = [];
|
|
||||||
instantiateObstacles(OBSTACLE_COUNT);
|
|
||||||
obstacles.forEach(function(obstacle){
|
|
||||||
return obstacle.randomizeHeight();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function instantiateObstacles(number){
|
|
||||||
for(var i = 0; i < number; i++){
|
|
||||||
obstacles.push(new Obstacle(new Position(width + obstacleOffset * i, 0), obstacleWidth, height, pipeImage));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function draw(){
|
|
||||||
update();
|
|
||||||
gameLoop();
|
|
||||||
drawGame();
|
|
||||||
}
|
|
||||||
|
|
||||||
function drawGame(){
|
|
||||||
drawScenery();
|
|
||||||
drawEntities();
|
|
||||||
displayScore();
|
|
||||||
}
|
|
||||||
|
|
||||||
function drawScenery(){
|
|
||||||
background(backgroundImage);
|
|
||||||
drawFloor();
|
|
||||||
}
|
|
||||||
|
|
||||||
function drawFloor(){
|
|
||||||
push();
|
|
||||||
noFill();
|
|
||||||
image(floorImage, 0, height - floorHeight, width, floorHeight);
|
|
||||||
rect(0, height - floorHeight, width, floorHeight);
|
|
||||||
pop();
|
|
||||||
}
|
|
||||||
|
|
||||||
function drawEntities(){
|
|
||||||
raspberry.draw();
|
|
||||||
drawObstacles();
|
|
||||||
}
|
|
||||||
|
|
||||||
function drawObstacles(){
|
|
||||||
obstacles.forEach(function(obstacle){
|
|
||||||
obstacle.draw();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function gameLoop(){
|
|
||||||
if(!paused){
|
|
||||||
collisionCheck(obstacles[0]);
|
|
||||||
checkRaspberryScore();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function collisionCheck(o){
|
|
||||||
if(o.collides(raspberry)){
|
|
||||||
die();
|
|
||||||
setupGame();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function die(){
|
|
||||||
if(localStorage.getItem("frontend-ready") == "false")
|
|
||||||
return;
|
|
||||||
|
|
||||||
ready = false;
|
|
||||||
hasDied = true;
|
|
||||||
playTime = Date.now() - startTime;
|
|
||||||
exportToLocalStorage();
|
|
||||||
setTimeout(function(){
|
|
||||||
return ready = true;
|
|
||||||
}, 1000);
|
|
||||||
}
|
|
||||||
|
|
||||||
function exportToLocalStorage(){
|
|
||||||
localStorage.setItem("game-playTime", String(playTime));
|
|
||||||
localStorage.setItem("game-score", String(score));
|
|
||||||
localStorage.setItem("game-isRunning", String(!hasDied));
|
|
||||||
}
|
|
||||||
|
|
||||||
function displayScore(){
|
|
||||||
push();
|
|
||||||
fill(195, 33, 34);
|
|
||||||
text(score, 0, height / 8, width, height);
|
|
||||||
pop();
|
|
||||||
}
|
|
||||||
|
|
||||||
function update(){
|
|
||||||
if(!paused){
|
|
||||||
raspberry.update();
|
|
||||||
}
|
|
||||||
obstacles.forEach(function(obstacle){
|
|
||||||
if(!paused){
|
|
||||||
obstacle.update();
|
|
||||||
checkObstacleReset(obstacle);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function checkObstacleReset(obstacle){
|
|
||||||
if(obstacle.position.x < -obstacleWidth){
|
|
||||||
obstacle.resetPosition();
|
|
||||||
obstacles.shift();
|
|
||||||
obstacles.push(obstacle);
|
|
||||||
hasAlreadyScored = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function checkRaspberryScore(){
|
|
||||||
if((obstacles[0].position.x + obstacles[0].width / 2) < (raspberry.position.x + raspberry.width / 2)
|
|
||||||
&& !hasAlreadyScored){
|
|
||||||
score += 1;
|
|
||||||
hasAlreadyScored = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function resetScore(){
|
|
||||||
if(!hasDied || localStorage.getItem("frontend-ready") == "false")
|
|
||||||
return;
|
|
||||||
|
|
||||||
hasDied = false;
|
|
||||||
score = 0;
|
|
||||||
hasAlreadyScored = false;
|
|
||||||
startTime = Date.now();
|
|
||||||
exportToLocalStorage();
|
|
||||||
}
|
|
||||||
|
|
||||||
function keyPressed(){
|
|
||||||
if(!ready)
|
|
||||||
return;
|
|
||||||
if(BOOST_KEYS.includes(key.toLowerCase())){
|
|
||||||
resetScore();
|
|
||||||
raspberry.boost();
|
|
||||||
}
|
|
||||||
if(key == "Escape"){
|
|
||||||
paused = !paused;
|
|
||||||
} else if(paused){
|
|
||||||
paused = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var Entity = (function(){
|
|
||||||
function Entity(position, width, height, fill){
|
|
||||||
this.position = position;
|
|
||||||
this.width = width;
|
|
||||||
this.height = height;
|
|
||||||
this.fill = fill;
|
|
||||||
this._showHitbox = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
Object.defineProperty(Entity.prototype, "position", {
|
|
||||||
get: function(){
|
|
||||||
return this._position;
|
|
||||||
},
|
|
||||||
set: function(value){
|
|
||||||
this._position = value;
|
|
||||||
},
|
|
||||||
enumerable: false,
|
|
||||||
configurable: true
|
|
||||||
});
|
|
||||||
Object.defineProperty(Entity.prototype, "width", {
|
|
||||||
get: function(){
|
|
||||||
return this._width;
|
|
||||||
},
|
|
||||||
set: function(value){
|
|
||||||
this._width = value;
|
|
||||||
},
|
|
||||||
enumerable: false,
|
|
||||||
configurable: true
|
|
||||||
});
|
|
||||||
Object.defineProperty(Entity.prototype, "height", {
|
|
||||||
get: function(){
|
|
||||||
return this._height;
|
|
||||||
},
|
|
||||||
set: function(value){
|
|
||||||
this._height = value;
|
|
||||||
},
|
|
||||||
enumerable: false,
|
|
||||||
configurable: true
|
|
||||||
});
|
|
||||||
Object.defineProperty(Entity.prototype, "showHitbox", {
|
|
||||||
get: function(){
|
|
||||||
return this._showHitbox;
|
|
||||||
},
|
|
||||||
set: function(value){
|
|
||||||
this._showHitbox = value;
|
|
||||||
},
|
|
||||||
enumerable: false,
|
|
||||||
configurable: true
|
|
||||||
});
|
|
||||||
Entity.prototype.draw = function(){
|
|
||||||
push();
|
|
||||||
fill(this.fill);
|
|
||||||
rect(this.position.x, this.position.y, this.width, this.height);
|
|
||||||
pop();
|
|
||||||
};
|
|
||||||
return Entity;
|
|
||||||
}());
|
|
||||||
var Obstacle = (function(_super){
|
|
||||||
__extends(Obstacle, _super);
|
|
||||||
|
|
||||||
function Obstacle(position, obstacleWidth, obstacleHeight, image){
|
|
||||||
var _this = _super.call(this, position, obstacleWidth, obstacleHeight, 0) || this;
|
|
||||||
_this.speed = 3;
|
|
||||||
_this.padding = height / 6.6666666666666666;
|
|
||||||
_this.createPipes(position, obstacleHeight, obstacleWidth, image);
|
|
||||||
return _this;
|
|
||||||
}
|
|
||||||
|
|
||||||
Object.defineProperty(Obstacle, "startX", {
|
|
||||||
set: function(value){
|
|
||||||
this._startX = value;
|
|
||||||
},
|
|
||||||
enumerable: false,
|
|
||||||
configurable: true
|
|
||||||
});
|
|
||||||
Object.defineProperty(Obstacle, "distanceBetweenPipes", {
|
|
||||||
set: function(value){
|
|
||||||
this._distanceBetweenPipes = value;
|
|
||||||
},
|
|
||||||
enumerable: false,
|
|
||||||
configurable: true
|
|
||||||
});
|
|
||||||
Obstacle.prototype.createPipes = function(position, obstacleHeight, obstacleWidth, pipeImage){
|
|
||||||
this.pipeTop = new Pipe(position.x, obstacleWidth, obstacleHeight, pipeImage);
|
|
||||||
this.pipeBottom = new Pipe(position.x, obstacleWidth, obstacleHeight, pipeImage);
|
|
||||||
};
|
|
||||||
Obstacle.prototype.resetPosition = function(){
|
|
||||||
this.randomizeHeight();
|
|
||||||
this.pipeBottom.position.x = Obstacle._startX;
|
|
||||||
this.pipeTop.position.x = Obstacle._startX;
|
|
||||||
};
|
|
||||||
Obstacle.prototype.randomizeHeight = function(){
|
|
||||||
this.pipeTop.height = this.randomRange(this.padding, height - this.padding - Obstacle._distanceBetweenPipes);
|
|
||||||
this.pipeBottom.position.y = this.pipeTop.height + Obstacle._distanceBetweenPipes;
|
|
||||||
this.pipeBottom.height = height - this.pipeTop.height - this.padding;
|
|
||||||
};
|
|
||||||
Obstacle.prototype.randomRange = function(min, max){
|
|
||||||
return Math.random() * (max - min) + min;
|
|
||||||
};
|
|
||||||
Obstacle.prototype.update = function(){
|
|
||||||
this.pipeTop.move(this.speed);
|
|
||||||
this.pipeBottom.move(this.speed);
|
|
||||||
this.position.x = this.pipeTop.position.x;
|
|
||||||
};
|
|
||||||
Obstacle.prototype.draw = function(){
|
|
||||||
this.pipeTop.draw();
|
|
||||||
this.pipeBottom.draw();
|
|
||||||
};
|
|
||||||
Obstacle.prototype.collides = function(o){
|
|
||||||
return this.pipeTop.collides(o) || this.pipeBottom.collides(o);
|
|
||||||
};
|
|
||||||
return Obstacle;
|
|
||||||
}(Entity));
|
|
||||||
var Pipe = (function(_super){
|
|
||||||
__extends(Pipe, _super);
|
|
||||||
|
|
||||||
function Pipe(positionX, width, height, image){
|
|
||||||
var _this = _super.call(this, new Position(positionX, 0), width, height, 0) || this;
|
|
||||||
_this.image = image;
|
|
||||||
return _this;
|
|
||||||
}
|
|
||||||
|
|
||||||
Pipe.prototype.update = function(){
|
|
||||||
};
|
|
||||||
Pipe.prototype.draw = function(){
|
|
||||||
push();
|
|
||||||
noFill();
|
|
||||||
var imageAspectRatio = this.image.height / this.image.width;
|
|
||||||
var computedImageHeight = imageAspectRatio * this.width;
|
|
||||||
this.drawImage(computedImageHeight, imageAspectRatio);
|
|
||||||
rect(this.position.x, this.position.y, this.width, this.height);
|
|
||||||
pop();
|
|
||||||
};
|
|
||||||
Pipe.prototype.drawImage = function(computedImageHeight, imageAspectRatio){
|
|
||||||
if(this.height > computedImageHeight){
|
|
||||||
var maxImageYPos = Math.ceil(this.height / computedImageHeight) * computedImageHeight;
|
|
||||||
for(var imageYPosition = 0; imageYPosition < maxImageYPos; imageYPosition += computedImageHeight){
|
|
||||||
if(imageYPosition + computedImageHeight >= maxImageYPos){
|
|
||||||
this.cropLastImage(imageYPosition, computedImageHeight, imageAspectRatio);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
image(this.image, this.position.x, this.position.y + imageYPosition, this.width, computedImageHeight);
|
|
||||||
}
|
|
||||||
} else{
|
|
||||||
image(this.image, this.position.x, this.position.y, this.width, this.height);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
Pipe.prototype.cropLastImage = function(imageYPosition, computedImageHeight, imageAspectRatio){
|
|
||||||
var amountOfImages = Math.floor(imageYPosition / computedImageHeight);
|
|
||||||
var heightToEdge = this.height - (amountOfImages * computedImageHeight);
|
|
||||||
var croppedImage = this.image.get(0, 0, this.image.width, this.image.height - (heightToEdge * imageAspectRatio));
|
|
||||||
image(croppedImage, this.position.x, this.position.y + imageYPosition, this.width, heightToEdge);
|
|
||||||
};
|
|
||||||
Pipe.prototype.move = function(speed){
|
|
||||||
this.position.x -= speed;
|
|
||||||
};
|
|
||||||
Pipe.prototype.collides = function(o){
|
|
||||||
return this.position.x < (o.position.x + o.width) &&
|
|
||||||
(this.position.x + this.width) > o.position.x &&
|
|
||||||
this.position.y < (o.position.y + o.height) &&
|
|
||||||
(this.position.y + this.height) > o.position.y;
|
|
||||||
};
|
|
||||||
return Pipe;
|
|
||||||
}(Entity));
|
|
||||||
var Position = (function(){
|
|
||||||
function Position(x, y){
|
|
||||||
this._x = x;
|
|
||||||
this._y = y;
|
|
||||||
}
|
|
||||||
|
|
||||||
Object.defineProperty(Position.prototype, "x", {
|
|
||||||
get: function(){
|
|
||||||
return this._x;
|
|
||||||
},
|
|
||||||
set: function(value){
|
|
||||||
this._x = value;
|
|
||||||
},
|
|
||||||
enumerable: false,
|
|
||||||
configurable: true
|
|
||||||
});
|
|
||||||
Object.defineProperty(Position.prototype, "y", {
|
|
||||||
get: function(){
|
|
||||||
return this._y;
|
|
||||||
},
|
|
||||||
set: function(value){
|
|
||||||
this._y = value;
|
|
||||||
},
|
|
||||||
enumerable: false,
|
|
||||||
configurable: true
|
|
||||||
});
|
|
||||||
return Position;
|
|
||||||
}());
|
|
||||||
var Raspberry = (function(_super){
|
|
||||||
__extends(Raspberry, _super);
|
|
||||||
|
|
||||||
function Raspberry(image){
|
|
||||||
var _this = this;
|
|
||||||
Raspberry.position = new Position(width / 6, height / 2);
|
|
||||||
Raspberry.height = height / 14.2857142857142857;
|
|
||||||
Raspberry.width = width / 11.1111111111111111;
|
|
||||||
_this = _super.call(this, Raspberry.position, Raspberry.width, Raspberry.height, Raspberry.FILL) || this;
|
|
||||||
_this.lift = -15;
|
|
||||||
_this.gravity = 0.45;
|
|
||||||
_this._velocity = 0;
|
|
||||||
Raspberry.bottomFloorOffset = (height / 5) - (height / 15 / 2);
|
|
||||||
_this.image = image;
|
|
||||||
return _this;
|
|
||||||
}
|
|
||||||
|
|
||||||
Object.defineProperty(Raspberry.prototype, "velocity", {
|
|
||||||
get: function(){
|
|
||||||
return this._velocity;
|
|
||||||
},
|
|
||||||
set: function(value){
|
|
||||||
this._velocity = (Math.abs(this.velocity) > Raspberry.maxVelocity) ? Raspberry.maxVelocity : value;
|
|
||||||
},
|
|
||||||
enumerable: false,
|
|
||||||
configurable: true
|
|
||||||
});
|
|
||||||
Object.defineProperty(Raspberry.prototype, "image", {
|
|
||||||
get: function(){
|
|
||||||
return this._image;
|
|
||||||
},
|
|
||||||
set: function(path){
|
|
||||||
this._image = loadImage(path);
|
|
||||||
},
|
|
||||||
enumerable: false,
|
|
||||||
configurable: true
|
|
||||||
});
|
|
||||||
Raspberry.prototype.update = function(){
|
|
||||||
this.applyGravity();
|
|
||||||
this.forceBoundaries();
|
|
||||||
};
|
|
||||||
Raspberry.prototype.applyGravity = function(){
|
|
||||||
this.velocity += this.gravity;
|
|
||||||
this.position.y += this.velocity;
|
|
||||||
};
|
|
||||||
Raspberry.prototype.forceBoundaries = function(){
|
|
||||||
this.boundaryTop();
|
|
||||||
this.boundaryBottom();
|
|
||||||
};
|
|
||||||
Raspberry.prototype.boundaryTop = function(){
|
|
||||||
if(this.position.y < 0){
|
|
||||||
this.position.y = 0;
|
|
||||||
this.velocity = 0;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
Raspberry.prototype.boundaryBottom = function(){
|
|
||||||
if(this.position.y + this.height + Raspberry.bottomFloorOffset > height){
|
|
||||||
this.position.y = height - this.height - Raspberry.bottomFloorOffset;
|
|
||||||
this.velocity = 0;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
Raspberry.prototype.boost = function(){
|
|
||||||
this.velocity += this.lift;
|
|
||||||
};
|
|
||||||
Raspberry.prototype.draw = function(){
|
|
||||||
push();
|
|
||||||
noFill();
|
|
||||||
this.setPose();
|
|
||||||
this.drawObject();
|
|
||||||
pop();
|
|
||||||
};
|
|
||||||
Raspberry.prototype.drawObject = function(){
|
|
||||||
this.drawHitBox();
|
|
||||||
this.drawRocket();
|
|
||||||
};
|
|
||||||
Raspberry.prototype.drawRocket = function(){
|
|
||||||
image(this.image, 0, 0, this.width, this.height);
|
|
||||||
rect(0, 0, this.width, this.height);
|
|
||||||
};
|
|
||||||
Raspberry.prototype.drawHitBox = function(){
|
|
||||||
if(!this.showHitbox){
|
|
||||||
noStroke();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
Raspberry.prototype.setPose = function(){
|
|
||||||
translate(this.position.x, this.position.y);
|
|
||||||
rotate((PI / 2) * (this.velocity / Raspberry.maxVelocity));
|
|
||||||
};
|
|
||||||
Raspberry.maxVelocity = 75;
|
|
||||||
Raspberry.FILL = 0;
|
|
||||||
return Raspberry;
|
|
||||||
}(Entity));
|
|
||||||
//# sourceMappingURL=build.js.map
|
|
||||||
|
|
@ -1,34 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html lang="">
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
||||||
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
|
||||||
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
|
||||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
|
|
||||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
|
|
||||||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
|
|
||||||
|
|
||||||
<title><%= htmlWebpackPlugin.options.title %></title>
|
|
||||||
<script src="https://cdn.jsdelivr.net/npm/p5@1.5.0/lib/p5.js"></script>
|
|
||||||
<script src="./game.js"></script>
|
|
||||||
</head>
|
|
||||||
<body style="background-color: beige;">
|
|
||||||
<noscript>
|
|
||||||
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
|
|
||||||
</noscript>
|
|
||||||
<div class="container">
|
|
||||||
<div class="row">
|
|
||||||
<div id="app" class="offset-1 col-10"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
window.addEventListener('keydown', function(e) {
|
|
||||||
if(e.keyCode === 32 && e.target === document.body) {
|
|
||||||
e.preventDefault();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
</html>
|
|
||||||
|
Before Width: | Height: | Size: 144 KiB |
|
Before Width: | Height: | Size: 618 KiB |
|
Before Width: | Height: | Size: 6.6 KiB |
|
Before Width: | Height: | Size: 1.2 MiB |
BIN
frontend/resources/JetBrains-Mono-Regular.ttf
Normal file
|
Before Width: | Height: | Size: 99 KiB After Width: | Height: | Size: 99 KiB |
|
Before Width: | Height: | Size: 586 KiB After Width: | Height: | Size: 586 KiB |
|
|
@ -1,119 +0,0 @@
|
||||||
<template>
|
|
||||||
<div class="container everything">
|
|
||||||
<div class="row">
|
|
||||||
<Header></Header>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<UserScores :userScores="userScores"></UserScores>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<Game :class="user ? '' : 'hidden'" :user-id="this.user?.id"
|
|
||||||
@gameFinished="this.updateUserScores()" ref="game">
|
|
||||||
</Game>
|
|
||||||
<Login v-if="!user" @userChange="(event) => {this.updateUser(event);}">
|
|
||||||
</Login>
|
|
||||||
<div v-if="user" class="logout-wrapper offset-10 col-2">
|
|
||||||
<RRButton @click="logOut()" text="Logout"></RRButton>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-4">
|
|
||||||
<Leaderboard type="highscore"></Leaderboard>
|
|
||||||
</div>
|
|
||||||
<div class="offset-4 col-4">
|
|
||||||
<Leaderboard type="totalplaytime"></Leaderboard>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script lang="ts">
|
|
||||||
import {defineComponent} from 'vue';
|
|
||||||
import Leaderboard from './components/Leaderboard.vue';
|
|
||||||
import UserScores from './components/UserScores.vue';
|
|
||||||
import Game from './components/Game.vue';
|
|
||||||
import Header from './components/Header.vue';
|
|
||||||
|
|
||||||
import "bootstrap/dist/css/bootstrap.min.css";
|
|
||||||
import "bootstrap/dist/js/bootstrap.min.js";
|
|
||||||
import Login from "@/components/Login.vue";
|
|
||||||
import {Rest} from "@/model/Rest";
|
|
||||||
import {User} from "@/model/User";
|
|
||||||
import RRButton from "@/components/RRButton.vue";
|
|
||||||
|
|
||||||
export default defineComponent({
|
|
||||||
name: 'App',
|
|
||||||
components: {
|
|
||||||
RRButton,
|
|
||||||
Login,
|
|
||||||
UserScores,
|
|
||||||
Leaderboard,
|
|
||||||
Game,
|
|
||||||
Header,
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
userScores: {},
|
|
||||||
userId: -1,
|
|
||||||
user: null as User | null,
|
|
||||||
leaderboardEvent: new Event('reloadLeaderboard')
|
|
||||||
}
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
localStorage.setItem("frontend-ready", "false");
|
|
||||||
},
|
|
||||||
|
|
||||||
methods: {
|
|
||||||
async fetchFromApi(path: string, method: "GET" | "POST") {
|
|
||||||
let res: Response = await fetch(Rest.URL + path, {method: method,});
|
|
||||||
return await res.json();
|
|
||||||
},
|
|
||||||
async fetchUserScores() {
|
|
||||||
if (this.userId == -1) return;
|
|
||||||
return await this.fetchFromApi(`/user/${this.userId}/scores`, "GET");
|
|
||||||
},
|
|
||||||
async updateUserScores() {
|
|
||||||
this.userScores = await this.fetchUserScores();
|
|
||||||
},
|
|
||||||
async updateUser(user: User) {
|
|
||||||
if (user) {
|
|
||||||
this.user = user;
|
|
||||||
this.userId = user.id ?? -1;
|
|
||||||
await this.updateUserScores();
|
|
||||||
}
|
|
||||||
window.dispatchEvent(this.leaderboardEvent);
|
|
||||||
},
|
|
||||||
logOut(){
|
|
||||||
this.user = null;
|
|
||||||
this.userId = -1;
|
|
||||||
this.userScores = {};
|
|
||||||
localStorage.setItem('frontend-ready', 'false');
|
|
||||||
}
|
|
||||||
},
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style>
|
|
||||||
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');
|
|
||||||
|
|
||||||
* {
|
|
||||||
font-family: 'Press Start 2P', serif;
|
|
||||||
}
|
|
||||||
|
|
||||||
.row {
|
|
||||||
margin-top: 2em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.everything {
|
|
||||||
margin-bottom: 4em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hidden {
|
|
||||||
visibility: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
.logout-wrapper {
|
|
||||||
display: flex;
|
|
||||||
justify-content: right;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
Before Width: | Height: | Size: 6.7 KiB |
|
|
@ -1,66 +0,0 @@
|
||||||
<template>
|
|
||||||
<div class="wrapper">
|
|
||||||
<main></main>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import App from "@/App.vue";
|
|
||||||
import {Rest} from "@/model/Rest";
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: "Game",
|
|
||||||
props: {
|
|
||||||
userId: null
|
|
||||||
},
|
|
||||||
emits: ['gameFinished'],
|
|
||||||
created() {
|
|
||||||
window.addEventListener('itemInserted', event => this.localStorageHandler(event), false);
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
localStorageHandler(event) {
|
|
||||||
if (event.key !== 'game-isRunning') return;
|
|
||||||
|
|
||||||
if (event.value === 'false') { //means game is over
|
|
||||||
let playTime = this.msToHMS(Number(localStorage.getItem('game-playTime')));
|
|
||||||
let score = Number(localStorage.getItem('game-score'));
|
|
||||||
this.submitGame(score, playTime);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
msToHMS(ms) {
|
|
||||||
// 1- Convert to seconds:
|
|
||||||
let seconds = ms / 1000;
|
|
||||||
// 2- Extract hours:
|
|
||||||
const hours = parseInt(String(seconds / 3600)); // 3,600 seconds in 1 hour
|
|
||||||
seconds = seconds % 3600; // seconds remaining after extracting hours
|
|
||||||
// 3- Extract minutes:
|
|
||||||
const minutes = parseInt(String(seconds / 60)); // 60 seconds in 1 minute
|
|
||||||
// 4- Keep only seconds not extracted to minutes:
|
|
||||||
seconds = seconds % 60;
|
|
||||||
return ((hours < 10) ? "0" : "") + hours + ":" + ((minutes < 10) ? "0" : "") + minutes + ":" + ((seconds < 10) ? "0" : "") + Math.floor(seconds);
|
|
||||||
},
|
|
||||||
|
|
||||||
async submitGame(score, playTime) {
|
|
||||||
let body = {
|
|
||||||
score: score,
|
|
||||||
playtime: playTime,
|
|
||||||
date: new Date().toISOString().substring(0, 10),
|
|
||||||
userId: this.userId,
|
|
||||||
}
|
|
||||||
let header = {
|
|
||||||
Accept: "application/json",
|
|
||||||
"Content-Type": "application/json",
|
|
||||||
};
|
|
||||||
await fetch(Rest.URL + '/game/add', {method: 'POST', body: JSON.stringify(body), headers: header});
|
|
||||||
this.$emit('gameFinished');
|
|
||||||
}
|
|
||||||
},
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style>
|
|
||||||
#p5_loading {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
@ -1,18 +0,0 @@
|
||||||
<template>
|
|
||||||
<h1>Raspberry Rocketeer</h1>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script lang="ts">
|
|
||||||
export default {
|
|
||||||
name: "Header",
|
|
||||||
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
h1 {
|
|
||||||
text-align: center;
|
|
||||||
font-size: 5em;
|
|
||||||
}
|
|
||||||
|
|
||||||
</style>
|
|
||||||
|
|
@ -1,86 +0,0 @@
|
||||||
<template>
|
|
||||||
<div class="container">
|
|
||||||
<div class="row">
|
|
||||||
<h3 class="col-10"><strong>{{ this.title() }}</strong></h3>
|
|
||||||
<div class="col-1">
|
|
||||||
<RRButton @click="prevPage" text="<"></RRButton>
|
|
||||||
</div>
|
|
||||||
<div class="col-1">
|
|
||||||
<RRButton @click="nextPage" text=">"></RRButton>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row" v-if="this.page.length > 0" v-for="entry in this.page" :key="entry.rank">
|
|
||||||
<LeaderboardEntry :entry="entry"></LeaderboardEntry>
|
|
||||||
</div>
|
|
||||||
<div class="row" v-else>
|
|
||||||
Loading...
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
|
|
||||||
import LeaderboardEntry from "@/components/LeaderboardEntry.vue";
|
|
||||||
import RRButton from "@/components/RRButton.vue";
|
|
||||||
import {Rest} from "@/model/Rest";
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: "Leaderboard",
|
|
||||||
components: {
|
|
||||||
LeaderboardEntry,
|
|
||||||
RRButton,
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
pageNumber: 0,
|
|
||||||
entriesPerPage: 5,
|
|
||||||
page: []
|
|
||||||
}
|
|
||||||
},
|
|
||||||
props: {
|
|
||||||
type: "totalplaytime" | "highscore",
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
this.updatePage();
|
|
||||||
window.addEventListener('itemInserted', event => this.onItemInserted(event), false);
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
async fetchPage() {
|
|
||||||
let res = await fetch(`${Rest.URL}/leaderboard/${this.type}?pagination=true&entriesPerPage=${this.entriesPerPage}&page=${this.pageNumber}`, {method: "GET"});
|
|
||||||
return await res.json();
|
|
||||||
},
|
|
||||||
title() {
|
|
||||||
return this.type === "totalplaytime" ? "Total Playtime" : "Highscore";
|
|
||||||
},
|
|
||||||
async nextPage() {
|
|
||||||
if (this.page.length !== this.entriesPerPage) return;
|
|
||||||
|
|
||||||
this.pageNumber++;
|
|
||||||
await this.updatePage();
|
|
||||||
if (this.page.length === 0) {
|
|
||||||
this.prevPage();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
prevPage() {
|
|
||||||
if (this.pageNumber <= 0) return;
|
|
||||||
|
|
||||||
this.pageNumber--;
|
|
||||||
this.updatePage();
|
|
||||||
},
|
|
||||||
async updatePage() {
|
|
||||||
let tempPage = await this.fetchPage();
|
|
||||||
for (let i = 0; i < this.entriesPerPage; i++) {
|
|
||||||
this.page.pop();
|
|
||||||
}
|
|
||||||
for (const entry of tempPage) {
|
|
||||||
this.page.push(entry);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
onItemInserted(event) {
|
|
||||||
if (event.key === 'game-isRunning' && event.value === 'false') {
|
|
||||||
this.updatePage();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
@ -1,31 +0,0 @@
|
||||||
<template>
|
|
||||||
<div class="col-1 text-right">{{this.entry.rank}}</div>
|
|
||||||
<span class="col offset-1 text-left username">{{this.entry.username}}</span>
|
|
||||||
<div class="col-2 text-right">{{this.entry.score}}</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script lang="ts">
|
|
||||||
import {defineComponent, PropType} from 'vue';
|
|
||||||
import {Leaderboard, LeaderboardEntry} from "@/model/Leaderboard";
|
|
||||||
|
|
||||||
export default defineComponent({
|
|
||||||
name: "LeaderboardEntry",
|
|
||||||
props: {
|
|
||||||
entry: {
|
|
||||||
type: Object as PropType<LeaderboardEntry<string>>,
|
|
||||||
default: () => ({}),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
* {
|
|
||||||
font-size: 1.5em;
|
|
||||||
}
|
|
||||||
.username {
|
|
||||||
overflow: hidden;
|
|
||||||
white-space: nowrap;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
@ -1,65 +0,0 @@
|
||||||
<template>
|
|
||||||
<h2>Enter a username</h2>
|
|
||||||
<div class="form-floating mb-3">
|
|
||||||
<input class="form-control" id="floatingInput" placeholder="example name" v-model="username">
|
|
||||||
<label for="floatingInput">Username</label>
|
|
||||||
<RRButton @click="setUser()" text="Confirm"></RRButton>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import {User} from "@/model/User";
|
|
||||||
import RRButton from "@/components/RRButton.vue";
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: "Login",
|
|
||||||
components: {
|
|
||||||
RRButton
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
username: '',
|
|
||||||
}
|
|
||||||
},
|
|
||||||
emits: ['userChange'],
|
|
||||||
methods: {
|
|
||||||
async setUser() {
|
|
||||||
if (this.username === '') return;
|
|
||||||
|
|
||||||
let user;
|
|
||||||
user = await User.getByName(this.username);
|
|
||||||
if(user.errors){
|
|
||||||
user = await User.create(this.username);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(user.errors){
|
|
||||||
console.error("Something when wrong when logging in, please contact admin!")
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (user) {
|
|
||||||
this.$emit('userChange', user);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
input {
|
|
||||||
border: 3px solid black;
|
|
||||||
border-radius: 0;
|
|
||||||
background-color: beige;
|
|
||||||
margin-bottom: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
input:focus {
|
|
||||||
background: beige;
|
|
||||||
border-color: rgba(184,134,11, 0.8);
|
|
||||||
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset, 0 0 8px rgba(184,134,11, 0.6);
|
|
||||||
}
|
|
||||||
|
|
||||||
label {
|
|
||||||
margin-left: 10px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
@ -1,22 +0,0 @@
|
||||||
<template>
|
|
||||||
<button>{{ text }}</button>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script lang="ts">
|
|
||||||
export default {
|
|
||||||
name: "RRButton",
|
|
||||||
props: {
|
|
||||||
text: {
|
|
||||||
type: String
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
button {
|
|
||||||
border: 3px solid black;
|
|
||||||
background-color: beige;
|
|
||||||
width: auto;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
@ -1,34 +0,0 @@
|
||||||
<template>
|
|
||||||
<div class="container">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col text-center" >Highscore</div>
|
|
||||||
<div class="col text-center" >Total Score</div>
|
|
||||||
<div class="col text-center" >Total Playtime</div>
|
|
||||||
<div class="col text-center" >Average Score</div>
|
|
||||||
<div class="col text-center" >Games Played</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col text-center" >{{ this.userScores.highscore }}</div>
|
|
||||||
<div class="col text-center" >{{ this.userScores.totalScore }}</div>
|
|
||||||
<div class="col text-center" >{{ this.userScores.totalPlaytime }}</div>
|
|
||||||
<div class="col text-center" >{{ this.userScores.averageScore }}</div>
|
|
||||||
<div class="col text-center" >{{ this.userScores.gamesPlayed }}</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
props: {
|
|
||||||
userScores: {
|
|
||||||
type: Object
|
|
||||||
}
|
|
||||||
},
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
* {
|
|
||||||
font-size: 1.2em;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
import { createApp } from 'vue'
|
|
||||||
import App from './App.vue'
|
|
||||||
|
|
||||||
createApp(App).mount('#app')
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
export interface Game {
|
|
||||||
id?: number,
|
|
||||||
score: number,
|
|
||||||
playtime: string,
|
|
||||||
date: Date,
|
|
||||||
userId: number,
|
|
||||||
}
|
|
||||||
|
|
@ -1,10 +0,0 @@
|
||||||
export type Leaderboard<T> = LeaderboardEntry<T>[];
|
|
||||||
|
|
||||||
export type HighscoreLeaderboard = Leaderboard<number>;
|
|
||||||
export type TimeLeaderboard = Leaderboard<string>;
|
|
||||||
|
|
||||||
export interface LeaderboardEntry<T> {
|
|
||||||
username: number,
|
|
||||||
rank: number,
|
|
||||||
score: T,
|
|
||||||
}
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
export class Rest {
|
|
||||||
static readonly URL = 'http://localhost:3000';
|
|
||||||
}
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
export interface Time {
|
|
||||||
seconds: number,
|
|
||||||
minutes?: number,
|
|
||||||
hours?: number,
|
|
||||||
days?: number,
|
|
||||||
}
|
|
||||||
|
|
@ -1,34 +0,0 @@
|
||||||
import {Rest} from "@/model/Rest";
|
|
||||||
|
|
||||||
export class User {
|
|
||||||
id?: number;
|
|
||||||
name?: string;
|
|
||||||
|
|
||||||
|
|
||||||
constructor(id: number, name: string) {
|
|
||||||
this.name = name;
|
|
||||||
}
|
|
||||||
|
|
||||||
static async getByName(name: string): Promise<User> {
|
|
||||||
let res: Response = await fetch(Rest.URL + '/user/' + name, {method: 'GET'});
|
|
||||||
|
|
||||||
return await res.json();
|
|
||||||
}
|
|
||||||
|
|
||||||
static async create(name: string): Promise<User> {
|
|
||||||
let body = {
|
|
||||||
name: name
|
|
||||||
};
|
|
||||||
let header = {
|
|
||||||
Accept: "application/json",
|
|
||||||
"Content-Type": "application/json",
|
|
||||||
};
|
|
||||||
|
|
||||||
let res: Response = await fetch( Rest.URL + '/user/register', {
|
|
||||||
method: 'POST',
|
|
||||||
body: JSON.stringify(body),
|
|
||||||
headers: header,
|
|
||||||
});
|
|
||||||
return await res.json();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,10 +0,0 @@
|
||||||
import {Time} from "./Time.js";
|
|
||||||
|
|
||||||
export interface UserScores {
|
|
||||||
userId: number,
|
|
||||||
highscore: number,
|
|
||||||
totalScore: number,
|
|
||||||
totalPlaytime: Time,
|
|
||||||
averageScore: number,
|
|
||||||
gamesPlayed: number,
|
|
||||||
}
|
|
||||||
6
frontend/src/shims-vue.d.ts
vendored
|
|
@ -1,6 +0,0 @@
|
||||||
/* eslint-disable */
|
|
||||||
declare module '*.vue' {
|
|
||||||
import type { DefineComponent } from 'vue'
|
|
||||||
const component: DefineComponent<{}, {}, any>
|
|
||||||
export default component
|
|
||||||
}
|
|
||||||
|
|
@ -1,41 +1,17 @@
|
||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"target": "es5",
|
"noImplicitAny": true,
|
||||||
"module": "esnext",
|
"outFile": "./build/build.js",
|
||||||
"strict": true,
|
"preserveConstEnums": true,
|
||||||
"jsx": "preserve",
|
"removeComments": true,
|
||||||
"importHelpers": true,
|
"rootDir": ".",
|
||||||
"moduleResolution": "node",
|
|
||||||
"skipLibCheck": true,
|
|
||||||
"esModuleInterop": true,
|
|
||||||
"allowSyntheticDefaultImports": true,
|
|
||||||
"forceConsistentCasingInFileNames": true,
|
|
||||||
"useDefineForClassFields": true,
|
|
||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
"baseUrl": ".",
|
"target": "es5",
|
||||||
"types": [
|
"moduleResolution": "node",
|
||||||
"webpack-env"
|
|
||||||
],
|
|
||||||
"paths": {
|
|
||||||
"@/*": [
|
|
||||||
"src/*",
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"lib": [
|
"lib": [
|
||||||
"esnext",
|
|
||||||
"dom",
|
"dom",
|
||||||
"dom.iterable",
|
"es5",
|
||||||
"scripthost"
|
"scripthost"
|
||||||
]
|
]
|
||||||
},
|
}
|
||||||
"include": [
|
|
||||||
"src/**/*.ts",
|
|
||||||
"src/**/*.tsx",
|
|
||||||
"src/**/*.vue",
|
|
||||||
"tests/**/*.ts",
|
|
||||||
"tests/**/*.tsx"
|
|
||||||
],
|
|
||||||
"exclude": [
|
|
||||||
"node_modules"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||