Skip to content

Instantly share code, notes, and snippets.

View shohan4556's full-sized avatar
💻
Making things that does not Exists !!

Shohanur Rahaman shohan4556

💻
Making things that does not Exists !!
View GitHub Profile
/* eslint-disable @typescript-eslint/indent */
import { scene } from 'components/controllers/SceneController';
import Phaser from 'phaser';
import { PieIndicatorConfig } from 'types';
export default class PieIndicator extends Phaser.GameObjects.Graphics {
x: number;
y: number;
radius: number;
alpha: number;
import Parcels from 'components/phaser/Parcels';
import { Damage, Parcel, SelectedPlayer, Vector2 } from 'types';
import _ from 'lodash';
import { scene } from 'components/controllers/SceneController';
import { TILE_SIZE } from 'shared_code/constants/const.game';
import Players from 'components/phaser/Players';
import GlobalState from 'contexts/GlobalState';
import GameController from 'components/controllers/GameController';
import Router from 'next/router';
import InputController from 'components/controllers/inputController';
/* eslint-disable @typescript-eslint/indent */
import { scene } from 'components/controllers/SceneController';
import Phaser from 'phaser';
export interface PieIndicatorConfig extends Phaser.GameObjects.Graphics {
x: number;
y: number;
radius: number;
alpha: number;
borderThickness: number;
const x = this.cameras.main.centerX;
const y = 500;
const radius = 200;
const borderThickness = 8;
const bgColor = 0x3c3d3c;
const borderColor = 0xf2501c;
const indicatorColor = 0xe91646;
const data = { x, y, radius, borderThickness, bgColor, borderColor, indicatorColor };
const ttlContainer = this.addTtlIndicator(this, data);
import { scene } from 'components/controllers/SceneController';
import Phaser from 'phaser';
export interface HealthBarType extends Phaser.GameObjects.Graphics {
bar: Phaser.GameObjects.Graphics;
x: number;
y: number;
value: number;
percentage: number;
getDamage: (amount: number) => void;
getCurrentHealth: () => number;
import Parcels from 'components/phaser/Parcels';
import { Vector2 } from 'types';
import _ from 'lodash';
import { scene } from 'components/controllers/SceneController';
import { GAME_CONFIG, TILE_SIZE } from 'shared_code/constants/const.game';
import Players from 'components/phaser/Players';
import GlobalState from 'contexts/GlobalState';
import GameController from 'components/controllers/GameController';
const DEFAULT_ZOOM = 1;
//? https://github.com/B2tGame/onmo-games-phaser/pull/4/files
(this.mouseUpCallback = null),
(this.mouseOutCallback = null),
(this.mouseOverCallback = null),
(this.capture = !1),
(this.active = !1),
(this.enabled = !0),
@@ -10805,9 +10802,6 @@ var momentData = JSON.parse(onmoHtmlGame.momentDatas);
(this.mouseUpCallback = null),
(this.mouseOutCallback = null),
(this.mouseOverCallback = null),
(this.touchStartCallback = null),
(this.touchMoveCallback = null),
(this.touchEndCallback = null),
(this.capture = !1),
(this.active = !1),
(this.enabled = !0),
@@ -10805,9 +10802,6 @@ var momentData = JSON.parse(onmoHtmlGame.momentDatas);
@shohan4556
shohan4556 / MyScene.ts
Created June 12, 2022 05:51 — forked from Antriel/MyScene.ts
Phaser 3 SpriteFX Outline Shader
import OutlineSpriteFX from './OutlineSpriteFx';
export default class MyScene extends Phaser.Scene {
create() {
const pipeline:OutlineSpriteFX = this.renderer.pipelines.add('OutlineSpriteFX', new OutlineSpriteFX(this.game));
pipeline.thickness = 3;
pipeline.color.setFromRGB(Phaser.Display.Color.IntegerToRGB(0xff3333));
const sprite = this.add.sprite(100, 100, 'someSprite');
contractInput {
coordinateX: '104',
coordinateY: '104',
parcelId: 'C-104-104-V',
size: 2,
boost: [ 0, 0, 0, 0 ],
parcelAddress: 'twinkle-others-smol',
district: 43
}
/Users/shohan4556/Desktop/Upwork_Projects/aavegotchi-realm-service-consumers/node_modules/@ethersproject/logger/lib/index.js:199