From ec5bda6e24f7b519426f0ce25c1133e5d4b330ec Mon Sep 17 00:00:00 2001 From: Hyperly Date: Thu, 18 Feb 2021 19:51:46 -0600 Subject: [PATCH] clingy is a fucking retard --- src/minigames/NightPlug.js | 55 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 src/minigames/NightPlug.js diff --git a/src/minigames/NightPlug.js b/src/minigames/NightPlug.js new file mode 100644 index 0000000..fbc18e2 --- /dev/null +++ b/src/minigames/NightPlug.js @@ -0,0 +1,55 @@ +import DoodleSprite from '../lib/DoodleSprite'; + +export const GetNightPlugFuncs = () => { + const sprites = {}; + function init () { + // Get the textures we need: + const { _appReference, timeMod } = this; + const { + plugArmDarkA, + plugArmDarkB, + plugArmLightA, + plugArmLightB, + plugSocketLightA, + plugSocketLightB, + plugBgA, + plugBgB, + plugDarknessA, + plugSocketA, + plugSocketB + } = this._appReference.loader.resources; + // Arm + sprites.arm = new DoodleSprite({ + texture: [plugArmLightA.texture, plugArmLightB.texture], + app: _appReference, + timeMod: timeMod + }); + sprites.arm.x = 0; + sprites.arm.y = 150; + this.addChild(sprites.arm); + // Background + sprites.bg = new DoodleSprite({ + texture: [plugBgA.texture, plugBgB.texture], + app: _appReference, + timeMod: timeMod + }); + sprites.bg.x = 400; + sprites.bg.y = 800; + sprites.bg.pivot.set( sprites.bg.width / 2, sprites.bg.height ); + this.addChild(sprites.bg); + // Socket + sprites.socket = new DoodleSprite({ + texture: [plugSocketLightA.texture, plugSocketLightB.texture], + app: _appReference, + timeMod: timeMod + }); + sprites.socket.x = 0; + sprites.socket.y = 150; + this.addChild(sprites.socket); + }; + + function update () {}; + return { init, update }; +}; + +export default GetNightPlugFuncs; \ No newline at end of file