![]() ![]() A more sophisticted collision algorithm, or even the new DOTS physics, could have been used, but this is meant to be a simple example and really isn't necessary. In this system general radius is used to calculate if bullets have collided with enemies or enemies with players. As such, collision is handled by a system (CollisionSystem) and is very simplistic in nature. Since the bullets and enemies are entities and the player is a game object, making them collide with the built in physics system won't work. When enemies die, they spawn particle effects (game objects). There is an Enemy Spawner (game object) that spawns enemies (entities). In this case, the player (game objets) spawns bullets (entity). This project uses a combination of game objects and entities together. A video presentation of this project can be seen here The basics This is meant to provide a simple, targeted example. I'm also sure it's probably not the best or cleanest way to do this but it's something that could be changed if needed.The DOTS project used for the presentation Converting Your Game to DOTS and contains an example of how DOTS could be used to replace a low performance process in your games (shooting many bullets at once, in this case). To help any other new recruits to Playfab that may need a pointer as to how the Playfab API calls work - here is the C sharp code we used for calling the 'Purchase request' in an OnMouseDown function (a script attached to a 3D game object in Unity - i.e: A purchase button).Īpologies to those who already know this - I'm just trying to help out those, like myself, who needed just the slightest pointer to 'connect the dots' as to how PlayFab API calls work. ![]() There are some good, clean examples of the API functions available especially in the Union demo. It's worth mentioning to any others who come to PlayFab from Unity that the C sharp code downloadable in the Union example game (see Brendans link) is a good cross reference/companion to the C sharp code that comes with the Playful Angry Bots demo. Having checked out the resource you've mentioned I found exactly what we needed. Many thanks Brendan for your swift response via Email and forum. Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions. My understanding of Playfabs API is progressing very slowly.Ĭould anyone please help us with the steps involved, what needs to happen for our desired scenario to occur, and a pointer as to what code might achieve this? (C sharp or Unityscript please)?īluefox25 said on Thu, 16 July 2015 at 11:09 AM If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information. Using an OnMouseDown event on a game object/button to achieve this. (In the Angry Bots prefab scripts the catalogue is pulled in its entirety from the PlayFab server and then set up using arrays/lists - we only have a few purchasable items in game and would like to deal with them individually, not as part of an array. We are aiming for a simpler integration of Playfab into our game where a purchase request is made with a simple OnMouseDown() event on a single 'plane' game object that represents a 'single product purchase button'. I am picking apart the script found in the Angry Bots Playfab prefabs (as shown in the tutorials) but am finding them overly complex for our needs. Started a topic on Tue, 14 July 2015 at 5:46 AM
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |