Giter VIP home page Giter VIP logo

phaser-tiled-extras's People

Contributors

nkholski avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

nagyist

phaser-tiled-extras's Issues

Triggers

  • Triggers: use body size, not anchor
  • Fix required / forbidden

Image layer

spriteTile
parallax.x = 0; fixed background position
parallax.x = 0.5; background position moves half speed
fixedToCamara = true; //never change spriteTile.x/y (fixed in only one direction?)
repeat = true => fixedToCamera =true

Bredd: x px eller repeat-x

  • position
  • property: fixed to camera
  • property: parallax.x = 0.2 (sen använda imageLayer.updateParallax(sprite) och ta x från sprite, i detta fall blir lagerpos.x = sprite.x*0.2)
  • property: parallax.y = 0.2
  • property: repeat-x, repeat-y, repeat-all
  • property: opacity
  • property:

auto load images

Load all images used by tiled that has no imagekey. Set key from imagekey-property or secondly name in Tiled.

Collision

tiledExtras.clearCollision(map,layer,x,y,w,h,coordType)
tiledExtras.updateCollision(map,layer,x,y,w,h,coordType)
defaults:
map?
layer = layer | array with layers | null => all layers
x,y = null => 0
w,h = null => game.width/height
coordType = tileMatrix, tilePosition | default = tileMatrix

Trigger tiles

Define an area and set callback to tiles in that area instead of trigger.

event-triggers

Test conditions without object touching. (Trigger on stuff like, all enemies killed)

Animation?

Add animation from previous PR to phaser

Programmatically add and test triggers

  • add triggers programmatically
  • trigger: map.checkTriggers({x: 1, y: 1, name: "torch"}), useful when doing a adventure game or something and the player select "use torch" on something in front of it and then if there is a trigger there it will evaluate if the touch will do anything with it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.