This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { LogMng } from "@/utils/LogMng"; | |
export class YaGamesApi { | |
private static instance: YaGamesApi = null; | |
private _ysdk: any; | |
private constructor() { } | |
static getInstance(): YaGamesApi { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var io; | |
var socket; | |
module.exports.initGame = function(aIO, aSocket) { | |
console.log('initGame...'); | |
io = aIO; | |
socket = aSocket; | |
if (!io) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function applyHueShader( | |
aTexture: THREE.MeshStandardMaterial, | |
aHueDataObject: any | |
) { | |
aTexture.onBeforeCompile = shader => { | |
shader.uniforms.hueShift = aHueDataObject.hueShift; | |
let main = "void main("; | |
let out = "gl_FragColor = vec4( outgoingLight, diffuseColor.a );"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as THREE from 'three'; | |
import { ThreeLoader } from '../loaders/ThreeLoader'; | |
import { Params } from '../data/Params'; | |
import { LogMng } from '../utils/LogMng'; | |
import { MyMath } from '../utils/MyMath'; | |
import * as ShipData from '../data/ShipData'; | |
import { Config } from '../data/Config'; | |
type SlotPosData = { | |
pos: THREE.Vector3, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private testBuildMega(cx: number, cy: number, b_id: number) { | |
let worldPos = GameMath.indexPosToWorldPos(cx, cy); | |
this.scrollCameraTo(worldPos.x, worldPos.y, true); | |
Params.game2d.time.events.add(5000, () => { | |
// build huge first | |
let data = {}; | |
data = { | |
x: cx, | |
y: cy, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module PhaserGame.Client { | |
export const IMG_W_MIN = 760; | |
export const IMG_W_MAX = 760 * 1.4; | |
export const IMG_H = 760; | |
const IMG_DATA = [ | |
{ img_bg: 'heart_bg', img: 'heart' }, | |
{ img_bg: 'rocket_bg', img: 'rocket' }, | |
{ img_bg: 'star_bg', img: 'star' }, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace LoadMng { | |
export class SceneLoader { | |
private static _instance: SceneLoader; | |
private game: Phaser.Game; | |
isSelectLoaded = false; | |
isGameLoaded = false; | |
isFinalLoaded = false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
<meta http-equiv="pragma" content="no-cache" /> | |
<meta name="apple-mobile-web-app-capable" content="yes" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" /> | |
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Net; | |
using System.Windows; | |
using System.Windows.Controls; | |
using System.Windows.Data; | |
using System.Windows.Documents; | |
using System.Windows.Input; |
NewerOlder