Skip to content

Instantly share code, notes, and snippets.

View whatevea's full-sized avatar
👷‍♂️
CALM

Sandiph Bamrel whatevea

👷‍♂️
CALM
View GitHub Profile
function create ()
{
map = this.make.tilemap({ key: 'map' });
var groundTiles = map.addTilesetImage('ground_1x1');
var coinTiles = map.addTilesetImage('coin');
map.createLayer('Background Layer', groundTiles, 0, 0);
groundLayer = map.createLayer('Ground Layer', groundTiles, 0, 0);
coinLayer = map.createLayer('Coin Layer', coinTiles, 0, 0);
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
</body>
<script src="https://cdn.jsdelivr.net/npm/phaser@3.55.2/dist/phaser.min.js"></script>
class Dice{
constructor(scene,x,y,face){
this.scene=scene;
this.x=x;
this.y=y;
this.face=face;
this.dice=this.scene.add.sprite(this.x,this.y,"dice",this.face-1).setScale(2.3);
this.dice.setInteractive();
this.dice.on('pointerdown',this.spin);
@whatevea
whatevea / index.html
Created February 24, 2023 08:49
vYzKwyJ
<html>
<head>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<nav class="navbar bg-dark" data-bs-theme="dark">
<div class="container-fluid">
<a class="navbar-brand" href="#">
<img src="https://i.ibb.co/wrbwXXf/g2039.png">
</a>