I have a game and at the moment there is an AI player and human but I want to make it multiplayer. The game is designed where when you press the top left/right the sprite on top would move left/right and if you press the lower left/right the lower sprite would move towards the left/right. Imagine the iPhone to always be in portrait mode.
The issue is that I am using touchesBegan and I can't figure out how to make that work with possible multiple taps coming in at the same time
Related
Both the "Photo Booth" and "Measure" apps (in camera mode) on the iPad keep the home indicator at the bottom, doing only subtle changes to the UI elements, and a simple animation on orientation change. Both are camera feeds, so the effect is that the feed is always oriented the same as the camera.
I want to do something similar but I'm not sure how to set up the app (ObjC) without fully changing the orientation, and then rotating the parent view the opposite direction.
My context is a game where we use gravity so that down is always down. This works, the player can infinitely rotate their phone in the vertical plane, but it's incompatible with the normal approach to supportedInterfaceOrientations.
Is it possible to intercept the trackpad events from the magic keyboard (with trackpad) in an iOS app and process them myself while hiding the pointer and not sending these events to the UI, or is that not possible?
Think about a game for instance where the user would move their finger around on the trackpad to move a character around on screen, but you wouldn't want to show the pointer circle and the location on the screen doesn't matter or if/where they click, you are just using the change in position as they move their finger on the trackpad.
Thanks
I am using the joystick script from the standard assets here for a mobile game. On one side of the screen I have the joystick for movement, and on the other side I have two buttons for jump and attack. The problem I have is when I am using the joystick to move and then hit jump or attack, the joystick goes to the other side of the screen where I hit the button (the joystick acts like I slid my finger to the other side of the screen)
How can I alter the script so that the joystick doesn't respond to any other touch events when I already have 1 finger on the joystick?
I know this is beta version but..
I have a Canvas->Button which works fine when I tap it normally.
I have a joystick in my scene which is drawn by separate camera other than mainCamera.
now, while i am operating joystick without leaving it, if I tap on he Canvas->Button - it does not respond. When I lift finger from joystick and tap on it, it works fine.
Same goes for another Canvas->Toggle control.
It has something to do with the layering or anything else...I'm not sure?
I'm creating an app and for some reason when I'm running the app on the device and the Welcome to Game Centre drop down appears, the force applied to my SKSpriteNode seems to be greater than normal, making my sprite fly off the screen.
So I add my sprite in the scene in the initWithSize method but then once you click on the screen, the touchesBegan fires which applies a force to the sprite, and if the Game Centre drop down doesn't appear (when you first start up the app) then it will work as per normal. Problem only seems to occur when Game Centre drop down appears.
Any ideas on a solution?