Jump to content

runeater

Members
  • Content Count

    9
  • Joined

  • Last visited

About runeater

  • Rank
    Newbie

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. I just want to be able to load them into my resources object as an array, is this possible?
  2. I'm working on a small card game and I'd like to make an array of sprites to make the code more readable. What I mean is I have hearts,spades,clubs and diamonds and I'd like each to be its own array when I load my images from my assets. Below is similar to what I have: PIXI.Loader .add("hearts10","hearts10.png") .add("hearts9","hearts9.png") ... .load(start) I'd like to be able to access the cards via an array of arrays, sort of like: var current_card = new Sprite(resources.cards.hearts.10.texture);
  3. //Globals var width = 900; var height = 700; var app= PIXI.autoDetectRenderer(width,height,{backgroundColor : 0x1099bb}); var animationStages = {menu:0, highscores:1, shop:2, options:3,exit:4,play:5}; var animationStage = animationStages.menu; function start(){ document.body.appendChild(app.view); showMenu(); } function showMenu(){ var button0 = PIXI.Sprite.fromImage('Assets/buttons/play.png'); button0.interactive = true; button0.on("mousedown", startPress); button0.position.set(50, 100); app.stage.addChild(button0); } //How I am initiating this (strictly for testing) &l
  4. Although I appreciate the information it doesn't seem to fix anything, chrome allows me to do it either way. Like I said I already can get the entities to the screen I just cant get them to actually move.
  5. I am working on a small game and ran into a little snag. I create a menu of sprites and add callbacks to their onclick. When the start button is pressed I attempt to set a flag for my animation loop to change its behavior. Right now im still testing so my start function is supposed to spawn the entities (50 balls) and then move them throughout the screen, however they are failing to update their positions. I've linked the relavent code below as its ~100 lines. http://pastebin.com/vB4xgBTN Just to make things simple, startPress is the start of the game while start() is called w
  6. I'm learning how to use javascript as well as pix.js to make simple games, however I am running into an issue while scaling buttons for my menu. Below is what I am working with right now, button0 fails to show up only when I attempt to scale it button1 shows up just fine in the below code segment. Does anyone know why this may be occuring? var button0 = new PIXI.Sprite.fromImage("Assets/buttons/play.png"); var button1 = new PIXI.Sprite.fromImage("Assets/buttons/highscores.png"); var button2 = new PIXI.Sprite.fromImage("Assets/buttons/shop.png"); var button3 = new PIXI.Sprite.fromI
×
×
  • Create New...