• Content Count

  • Joined

  • Last visited

About microspace

  • Rank

Recent Profile Visitors

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

  1. microspace

    Transparency of a single tile

    But still I can't set opacity on tile inside game loop. Only on level creation.
  2. You do something like var frame = 10; player = GAME.add.sprite(0, 0, 'cardsheet', frame); That you can change sprite with player.frame = 15;
  3. microspace

    Transparency of a single tile

    Thanks for pointing in right direction var tile = this.map.getTile(10, 9, this.flour); if (tile) { tile.alpha = 0.5; }
  4. microspace

    Transparency of a single tile

    Is there a way to set transparency of a single tile inside game loop? I'm building some sort of level constructor and I want to find a way to grey out tiles.
  5. microspace

    Sprite gets separate from body

    @samme, can you please explain how to use these functions, that you listed? I tried to use game.stage.updateTransform(); after my reset function, but no result. After randomly changing the code I've found that when I disable `fresh` parameter, the glitch disappears. this.pegmanSprite.fresh = false; Who can explain why is this happening?
  6. microspace

    Sprite gets separate from body

    This glitch which I described occurs only when camera follow player.
  7. I have a sprite `player`. If I do `player.x = 200`, `player.y = 300` in a function which fires on a button click, does the movement of sprite itself take any games ticks?
  8. microspace

    Sprite gets separate from body

    Strange bug occures when I try to move sprite to initial position in game. I use this command: this.gamesprite.reset(lastSuccessfullPosition.x, lastSuccessfullPosition.y); For a moment sprite gets separate from body. At this moment body overlaps a wall and collision callback is called. For this reason every time I press reset button, sprite behaves as if it hit the wall.
  9. microspace

    Group revive revives at random position

    I do this: //bullets weapon.bulletKillType = Phaser.Weapon.KILL_WORLD_BOUNDS; weapon.bulletAngleOffset = 0; weapon.bulletSpeed = 400; weapon.fireAngle = Phaser.ANGLE_RIGHT; // shoot at right direcion by default weapon.trackSprite(player, 0, -9, false); //-65 выведено экспериментальным путём //weapon.addBulletAnimation("fly", [0, 1, 2, 3, 4, 5, 6, 7], 40, true); this code executes when bullet hits barrel: bulletHitBarrel: function(sprite, bullet) { var damage = 48; sprite.damage(damage); explosion.x = sprite.x; explosion.y = sprite.y - 30; explosion.visible = true; explosion.animations.play('EXPL'); bullet.kill(); }, I think that this is bug. Anyway I avoided it the other way (I set limit for health to not to drop below minimal level)
  10. I'm creating group of items (barrels). After killing some of items with weapon, I call items.callAll('revive');, but barrels are spawning in random position. Who came across with this problem? items = this.game.add.group(); items.enableBody = true; // inside for loop: var sprite = group.create(element.x, element.y, 'barrel');
  11. When I set this.map.setTileIndexCallback([...Array(500).keys()], this.hitWall, this, this.blockLayer); , this.map.setCollisionBetween(1, 2000, true, 'blockLayer'); is ignored by Phaser. Is it ok?