This repository has been archived on 2021-02-20. You can view files and clone it, but cannot push or open issues or pull requests.
shapez.io/src/js/game/base_item.js

35 lines
764 B
JavaScript
Raw Normal View History

2020-05-09 16:45:23 +02:00
import { DrawParameters } from "../core/draw_parameters";
import { BasicSerializableObject, types } from "../savegame/serialization";
import { THEME } from "./theme";
2020-05-09 16:45:23 +02:00
/**
* Class for items on belts etc. Not an entity for performance reasons
*/
export class BaseItem extends BasicSerializableObject {
constructor() {
super();
}
static getId() {
return "base_item";
}
/** @returns {object} */
static getSchema() {
return {};
}
/**
* Draws the item at the given position
* @param {number} x
* @param {number} y
* @param {DrawParameters} parameters
* @param {number=} size
*/
draw(x, y, parameters, size) {}
getBackgroundColorAsResource() {
abstract;
2020-05-09 16:45:23 +02:00
}
}