Search the Community

Showing results for tags 'tap'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Coding and Game Design
  • Frameworks
    • Phaser
    • Pixi.js
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered

Found 10 results

  1. Hi all It looks like the default time to register a tap on an object is indefinite. Meaning that a tap event is just simply just touch on and touch off, regardless of time between. Is this the case, or is there a setting to shorten it within the interaction manager?
  2. hi, i'm trying to implement this effect : i have a circle who's animating to incite the player to click on the screen. next the player click and release a pink player who go to an enemy ( the pink rectangle). I would like to let the player the ability to click several times to release multiple players and each time the player is inactive the animation of the circle to prompt him to click. The problem is that this animation launches several times at the same time as soon as the players are dead. How to code this to avoid this behavior? thanks for your help, because me i don't see the solution https://jsfiddle.net/espace3d/zdnk9cem/ var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', { preload:preload, create: create, update : update }); function preload() { game.load.image('circle', 'https://s3.postimg.org/bb4aql1lf/touch.png'); game.load.image('rect','https://s26.postimg.org/ci44mlog9/dalle.png') game.load.image('player','https://s26.postimg.org/ikbrd3cw9/bullet_color.png') } var player=[] var enemy var circle var tw_name var tap_ready = true var flag=true var delay_circle_timer = 1500 var counter = -1 //effect on the circle : tween start_tw = (obj,tw_action,tw_name,f) => { tap_ready = true f=true tw_action(obj,tw_name) } // declaration of tw_action tw_action= (obj,tw_name) =>{ obj.alpha=.5 obj.scale.setTo(1,1) tw_name= game.add.tween(obj.scale).to({x:1.5,y:1.5},700,Phaser.Easing.Linear.None,true,delay_circle_timer,-1) tw_name = game.add.tween(obj).to({alpha:0},700,Phaser.Easing.Linear.None,true,delay_circle_timer,-1) tw_name.onStart.add(()=> {obj.visible=true}) } //stop tween stop_tw = (tw_name,f,obj) => { if(f){ obj.visible=false game.tweens.remove(tw_name) f=false } } //launch player and start counter launch_player = (obj)=> { counter++ obj[counter].body.velocity.y=-100 } hide_player_and_start_tw = (obj) => { obj.body.enable=false obj.visible=false start_tw(circle,tw_action,tw_name,flag) } tap = () => { game.input.onTap.add(onTap); function onTap(pointer, doubleTap) { if (!doubleTap && tap_ready){ tap_ready=false //stop the tween on the circle stop_tw(tw_name,flag,circle) //launch the player launch_player(player) //delay for reset tap_ready game.time.events.add(500,() => {tap_ready = true}) } } } function create() { game.physics.startSystem(Phaser.Physics.ARCADE); circle=game.add.sprite(400,300,'circle') circle.anchor.setTo(.5) circle.inputEnabled = true enemy = game.add.sprite(400,100,'rect') enemy.anchor.setTo(.5) game.physics.arcade.enable(enemy) enemy.body.enable=true enemy.body.immovable=true for (var i = 0; i < 10; i++){ player[i]=game.add.sprite(400,600,'player') player[i].anchor.setTo(.5) game.physics.arcade.enable(player[i]) player[i].body.enable=true } //initiate first tween start_tw(circle,tw_action,tw_name,flag) } function update() { tap(circle) for (var i = 0; i < 10; i++){ game.physics.arcade.collide(player[i],enemy,hide_player_and_start_tw) } }
  3. Spaceix

    Spaceix is a simple and addictive endless runner game. Control the little rockets gliding through a beautiful exotic world. Collect coins and unlock cool in game rockets. Relaxed in the calm, zen-like background music. Hold and release so that the rockets takes off. Move away from the obstacles and pick up as many coins as you can.You get a score by traveling through the rings.The coins you pick up you can use in the game to buy rockets. Collect all the 40+ rockets. Be careful not to hit any obstacle or you will have to start again the game. Download on google play for free: https://play.google.com/store/apps/details?id=com.erkokos.spaceix .
  4. Karate Burger | Salt Chef

    My new Phaser game Karate Burger | Salt Chef. Tap around character to control him. http://www.munchiegames.com/hamburger_games/karate_burger same Phaser game in webview, generated in Android Studio with Firebase addons https://play.google.com/store/apps/details?id=com.munchiegames.karate_burger
  5. [Release] Myths N Heros

    Try my new game Myths N Hero : https://play.google.com/store/apps/details?id=com.antpixel.myth I Develop it using C2 and build to android using xdk :-D Myths N Heros is an idle games / clicker games / tap games. Myths N Heros tells the story of the earth is currently dominated by evil monsters. You are one of the several heroes who wants to save the earth from the evil monsters. In your adventure you find the ancient scroll to summon heroes from the past (Mythological heroes) like Sun Go Kong, Hercules, Gatot Kaca, and others. With their help grab your sword and slay as many evil monsters on this earth, and don't forget to collect equipment along the journey to make you and your allies stronger. ❖ How To Play ❖ - Tap/Click to attack, - Tap/Click to leveling up, - Tap/Click to summon mythological heroes, - Tap/Click to make you and your allies stronger, - Tap/Click to using your great skill, - Tap/Click to collect money, - Tap/Click to use equipment, - Tap, tap and tap to slay as many evil monsters as you can, - or just leave it and let your allies finishing your job . ❖ Plan for Future Update ❖ - More Levels, - More Monsters, - More Equipments, - More Mythological heroes, - More Skills, - Play with friends, - etc Feedbacks are most welcome : myth@antpixel.com
  6. I have a canvas with a set aspect ratio of 16:9 and I am resizing the renderer every time the window size changes game.resize = function() { var original = _default_screenWidth / _default_screenHeight; var designer = window.innerWidth / window.innerHeight; if ( window.innerWidth < _default_screenWidth || window.innerHeight < _default_screenHeight ) { if ( original > designer ) { game.renderer.resize(window.innerWidth,window.innerWidth/original); } else { game.renderer.resize(window.innerHeight*original,window.innerHeight); } _DOM.style.width = game.renderer.width; _DOM.style.height = game.renderer.height; game.stage.scale.x = game.renderer.width / _default_screenWidth; game.stage.scale.y = game.renderer.height / _default_screenHeight; } }; window.addEventListener("resize",game.resize);Problem is if I tap certain buttons (PIXI.Container) , they are not firing, only if i tap a little bit lower, so it's only the Y axis that's off. Here is the code for the button if ( Game.mobile ) { button.container.interactive = true; button.container.buttonMode = true; button.container.tap = function() { button.Press(); }; }If the window does not need any scaling then everything works fine.
  7. phaser , Circle button

    im trying to make a circle button with tap event i used hitArea property from sprite class and using pixi Circle class i did that this.sprite = game.add.sprite(50,50,"cursors"); this.sprite.anchor.set(0.5,0.5); this.sprite.hitArea = new PIXI.Circle(50,50,84); this.sprite.inputEnabled = true; this.sprite.events.onInputDown.add(function(){ console.log("clicked"); }); }; it is not working at all so i tried removing this.sprite.anchor.set(0.5,0.5); input is work fine when there is no hit Area so what should i do note : phaser version is 2.2.2
  8. how to detect double tap

    I've seen that there is a double tap rate that can be set, but does anyone know how to read this? Thanks
  9. Problems with interactivity

    I'm working with PixiJS to create a web app with OS-like functionality (source here: https://github.com/steverichey/OpenGNOP) so I obviously need to have stuff related to mouse and touch events. I've tried stuff like this (based on the examples): this.interactive = true;this.mousedown = this.touchstart = this.onClick.bind(this);this.mouseup = this.touchend = this.mouseupoutside = this.touchendoutside = this.onRelease.bind(this);But it's hit or miss. BitmapText will function normally but DisplayObjectContainers may or may not, and Graphics seem to never register clicks. Is there something I'm missing? It appears that all of these elements should support mouse and touch events.
  10. Hi all, I'm about to finish my first game made with Phaser, the very last issue left: Everything works well on desktop and iOS devices, but not Android (4.0). The game preloads, show the graphic and Play btn, but I can't tap it (at least nothing changes when I try to tap it). If I rotate the device, I see that the MainMenu screen is displayed normally (and the same for all the taps). So pretty much it reacts on the tap, but somehow doesn't display changes, only after I rotate the device.. I use Phaser 1.1.3 and Phaser.CANVAS in the game init. Any thought are welcome.