|
Post by milliemag on May 8, 2016 5:07:16 GMT
Hey, I was wondering if it's possible to set up a match-3 puzzle game I'm working on to use the Pool Boss. I have the full Core GameKit + Pool Boss and most of the tutorials are more about setting up waves like in a shoot 'em up style. I have a bunch of parts in my script that call: (GameObject)Instantiate(whateverPrefab)
and
Destroy(gameObject).
I was wondering how I would call on the Pool Boss or Despawner through my script to handle the spawning and despawning properly so that my game doesn't take such a heavy hit on the CPU.
Any assistance would be greatly appreciated.
Thanks, Millie
|
|
|
Post by DarkTonic Dev on May 8, 2016 6:09:00 GMT
Yeah, that's super easy. It will be calls like:
PoolBoss.SpawnInPool(transform, Vector3 position, Quaternion q);
and
PoolBoss.Despawn(transform);
Pool Boss (and Core GameKit) works with any type of game. If you don't need to use anything else in Core GameKit that's fine, the other components won't affect the CPU of the rest of your game.
|
|
|
Post by milliemag on May 8, 2016 17:26:32 GMT
Awesome! Thanks! And, in that case, I'm just adding the prefabs to spawn into the Pool Boss of Level Wave Settings and then typing in 'using PoolBoss' at the top of my script, right? Or do I need to do anything else like use any specific kind of spawner in the Inspector?
|
|
|
Post by DarkTonic Dev on May 8, 2016 18:59:58 GMT
Right. Actually its:
Using Darktonic.coreganekit
|
|
|
Post by milliemag on May 8, 2016 20:20:08 GMT
Thanks! One more issue I'm having though. I'm getting an error, because the code I used is creating all of the matchable pieces as GameObjects and the Spawner/Despawner refers to Transforms and it's saying that Unity cannot implicitly convert Unity.GameObject to Unity.Transform for DarkTonic. Any suggestions on the easiest way to handle this? I only ask because I have Lists and Dictionaries attached to another script and I don't want to change the wrong parts and end up messing up the code.
|
|
|
Post by DarkTonic Dev on May 9, 2016 1:53:23 GMT
Just make sure you pass the transform to Spawn and are set to receive Transform as well.
Just add ".transform" after the game object.
Same goes for Despawn.
|
|
|
Post by milliemag on May 11, 2016 1:22:58 GMT
Thanks! I'll try it.
|
|
|
Post by DarkTonic Dev on May 11, 2016 3:37:02 GMT
Cool.
|
|