Breaking change (if you have written code): All classes are now in the DarkTonic.CoreGameKit namespace. You will need to add "using DarkTonic.CoreGameKit;" at the top of all scripts you've written that use the Core GameKit API.
Updated NGUI package to add the namespaces.
Updated Playmaker package to add the namespaces.
Updated Behavior Designer packages to add the namespaces.
Fixed bug: Knockback damage didn't check receivers for IsGravity on the rigidbody before sending.
Fixed compile bug on Web Player.
Fixed rare bug with Pool Boss not finding prefab of previously despawned prefab.
Now the value of all Inspector fields set to "self" can be dragged like normal Unity fields. Just drag left or right on the I or F (for Int and Float) next to the value. Awesome for the new wave visualization feature!
Now Knockback settings work on Rigidbody2D as well.
Ignore Offscreen Hits now defaults to false. Since more people are probably using sprites, that old default is going to interfere more than help.
Added property "KilledBy" to Killable, which returns a reference to the other Killable that dealt lethal damage to it, if any. Resets itself to Null each time it respawns.
Added "If Parent Destroyed?" section below "If Spawner Destroyed" in Killable Despawn & Death Triggered. You can select: Die, Despawn, or Do Nothing (default). This will allow you to make giant ships or fortresses that destroy their limbs when the whole is destroyed or other cool effects!
Small setting will be lost! Removed single setting for Wave Offset in waves of Syncro Spawner and Triggered Spawner. Replaced by ability to add any number of randomly chosen Wave Offsets. You will lose any settings you had for Wave Offset, so take note of them before upgrading to this version!
Moved UndoHelper into main Editor folder. No need for extra folder when it can't be shared with our other plugins. Please delete the old one in DarkTonic\Editor folder when updating.
Fixed World Variable Listeners for Unity 4.5 - they were not working.
Fixed World Variable Listeners for Unity 4.6+ - they were not working.
Fixed Unity 4.6 example scene, it had some missing scripts.
Renamed "Wave Spawn Bonus" to "Wave Spawn Bonus & Events" because it now can fire any number of Custom Events.
Added ability to fire custom event(s) from wave start on Triggered Spawner.
Fixed Custom Event endless retrigger bug that can be set up on accident.
2D Knockback now works correctly. Previously only "knock up" worked for 2D. Now it knocks you left or right depending on the location of the other Killable compared to yours (x coordinate).
Added ability to clone Global wave.
Added ability to clone Syncro Spawner wave.
Added ability to clone Pool Boss item.
Added ability to clone Prefab Pool item.
Added missing position parameter to FireCustomEventIfValid new method.
Changed ModifyWorldVariables method in Killable to public virtual so it can be changed in a subclass.
Renamed "Respawn Settings" to "Respawn Settings & Events" in Killable's Inspector.
Added Respawn Custom Events section to Killable's Respawn Settings & Events section. Now you can select any number of Custom Events to fire each time the Killable is respawned!
Post by DarkTonic Dev on Sept 28, 2015 6:30:49 GMT
Core GameKit V 220.127.116.11 has been submitted to the Asset Store. This is the hugest update since 3.0! Since we're now actively using CGK on our next game, which is 3D and will be for PC and Xbox, we're adding tons of features that we need! Changelist:
Upgrade note: Moved our plugins into Plugins folder to help speed up compile times in your projects! Make sure and drag the entire Assets/DarkTonic folder into Assets/Plugins before upgrading to this version!
Added Mechanim Behavior "MechanimStateCustomEvent" which allows you to fire a Custom Event when a Mechanim state is entered and/or exited. Just add it to the Mechanim state in the Animator window!
Added Sort Alpha and Collapse / Expand All buttons to Custom Events section.
Fixed Playmaker custom action: Master Audio Group Set Pitch now has max of 3, not 1.
Fixed bug: Spawned method in KillableListener got called twice on first spawn.
Fixed bug: Triggered Spawners ignored Retrigger Limits and Spawner Active Mode fields and always spawned waves.
Fixed bug: "Per Hit" Damage prefabs in Killable would not spawn Damage Prefabs when invincible.
Fixed bug: No longer spawning damage prefab when getting hit while invincible on Killables.
Added Spawned and Despawned events to TriggeredSpawnerListener.
Added "Invincible after damaged" for X seconds option to Killable. This will make the Retrigger Limit section usually not needed.
Removed "Explosion Prefab" from Killable top section. This was not needed as it does the same thing (but far less options) as the Death Prefab feature.
Removed "Retrigger Limit Mode" from Killable. Use "Invincible after damaged" feature instead.
Added IsDead property to Killable. Other non-CGK scripts may want to know whether the Killable is dead (doing death animation etc) to stop their effects.
Added all Killable Listener methods as virtual methods to Killable class. Now you may never need to use a Killable Listener if you create Killable subclasses.
Added "Deal Damage Prefab" section to Killable for specifying a prefab to show for each Killable you damage.
Wave Offset is now applied on top of Random Positioning for both spawner types.
Custom Position X/Y/Z on spawners is now float, not int, for more precise positioning. Note that any values you had before will be reset to zero.
"Use Spawner Position" renamed to "Spawner Position" in Position Mode for spawners.
Added 3rd Position Mode to spawners: Other Object Position. This lets you drag in another game object and use its position to spawn.
Added option to pause Global Waves at end of each Global Wave. This way you can show a message or whatever and unpause the Global Waves when ready to proceed.
Added DestroyImmediately method to Killable, which ignores the DeathDelay. Updated Playmaker custom action "Core GameKit Killable Destroy" for this as well.
Added "Valid Receivers" dropdown to Custom Events. Choices are All, Random & Closest. For Random & Closest you get to specify a number. That way you can say the closest 3 or a random 1 Receiver will receive the event only.
Added "Vanish prefab" settings in Death & Despawn Triggers section of Killable. This prefab will be spawned if the Killable despawns without being "killed".
Added "Invince Hit prefab" settings in Invincibility section of Killable. This prefab will be spawned if the Killable gets hit while Invincible.
Renamed method "SpawnDamagePrefab" to "SpawnPrefab" since it was used by more than just Damage Prefabs. If you had a subclass of Killable and were overriding this method, you will need to change the method name to match.
No longer allow selection of 0 items in Pool Boss during runtime since you lose your selection if you do that.
Added "game status panel" section on Level Settings game object during runtime. Shows status of "game over" (or not), current level and wave, whether global waves are paused, and buttons to pause/unpause/end wave.
Syncro / Triggered Spawners and Killable now show at top whether they are active based on wave pause and "game over" status as well.
Added prominent red box saying "Despawned and inactive" at top of Killable and Triggered Spawner components while they are despawned in Pool Boss.
Now have a "visualized wave item" eye icon in the Hierarchy for each item shown under spawners in edit mode for visualization purposes.
Added TextMeshPro package for displaying World Variable values with no code!
Added new method CreateNewPoolItem to dynamically (via code) create new Pool Boss items at runtime, including creating new category.
Added optional Custom Wave Classes feature (for your own use, no base implementation) to classify Global waves as whatever you like - you specify the names. Useful to display custom icons per wave or other things.
Added property drawer for Custom Wave Classes. Decorate a string variable with CoreWaveClassAttribute to use it.
Fixed bug where changing the Prefab To Spawn in a Syncro Spawner wave would not update the visualization, if enabled.
Fixed bug where Recycle Oldest didn't work properly in PoolBoss.
Fixed bug where "Add to PoolBoss" had Inspector error when no LevelWaveSettings game object is in the Scene.
Fixed bug where TriggerEnter2D wave didn't spawn correctly on Triggered Spawners.
Added a "prefab icon" in Pool Boss so you can navigate to the prefab in Project View even when the Pool Item is collapsed.
Added a "New Item Category" dropdown above the drag area for Pool Boss so you can choose what category new items are created in when you drag them in.
Added fix for PoolBoss. Previously as pooled prefabs created the inactive clones during Awake, anything with a NavMeshAgent might log a warning about "NavMeshAgent not close enough to NavMesh". Now this is fixed, but make sure you turn off the NavMeshAgent component for each pooled prefab. PoolBoss will detect if it is there and enable it whenever it spawns.
Added ability to despawn all / kill all in Pool Boss Inspector for a single category.
Revamped Pool Boss Inspector. Now looks like the other custom Inspectors. Added a spawned prefab count widget at the category level for quick visual feedback.
Added PoolBoss.CategoryItemsDespawned and PoolBoss.CategoryItemsSpawned methods for programmers to use to get counts of items in a single category.
No longer displaying a "Kill All" button for a Pool Boss item if Killable is not on that prefab.
Added Inspector alert when having 2 wave settings of the same level / wave in syncro spawner. This is not supported and currently you had to click play to get an error in the Console.
Added LevelEnded method to LevelSettingsListener and PlaymakerLevelSettingsListener. Called when the last wave of a level is completed.
Added option for Wave Offsets in both spawner types to be chosen randomly or used in order. Defaults to the original setting of random.
Re-added missing methods to PoolBoss that were erroneously deleted in the last update.
Fixed bug in Unity 5.X where a Killable that takes lethal damage will only battle with a single other Killable even if it hits multiple at the same time.
Fixed bug where sometimes uGUI clicks would not work when using Triggered Spawner on that element.
Prefab Pools, where used, now have a gear to take you to them to edit / inspect.
Added a way to use less than all spawners for global waves (random 1-X spawners).
Make all prefab fields tell you when something is not set up in Pool Boss with option to add it with X copies in a category of your choice.
Buttons in LevelWaveSettings to refresh all / hide all / disable all Visualized waves from both spawner types so updated prefabs will have the correct clones when spawned prefabs were changed after the last visualization.
Added Visualize Wave and Hide Visualization buttons next to each Custom Event in the LevelWaveSettings Inspector. Will rebuild all clones of everything spawning from that Custom Event.
Changed some WorldVariable code to allow oldValue / newValue. To fix compile errors, please re-import all 3rd party plugin packages included in CGK if you use them.
Can now see Global Wave name when the wave is collapsed in the Inspector.
Added Level name field for Global Waves. You can see it even when the level is collapsed.
Renamed "Level Waves" to "Levels & Waves" in the LevelSettings Inspector.
Killables can now send Knockback Damage regardless of gravity setting on their Rigidbody. They only can't receive Knockback damage if not gravity.
Killables with a CharacterController now can receive Knockback Damage. It's an instant knockback though since there's no physics force to apply.
Added PoolBoss.NextPoolItemToSpawn method to get you the next item that will spawn for a Pool Item.
Documentation fix for Knockback on Killables.
Refactored Knockback code to be more understandable.
Fixed UI of Inspector for Triggered Despawner. It now shows a checkbox for each trigger you enable instead of making you "expand" them to denote active, which was really inintuitive.
Added new API method: LevelSettings.RestartGame() - it will set IsGameOver to false and go to level 1, wave 1 if you have Global Waves enabled.
Added new API method: LevelSettings.ContinueGame() - it will set IsGameOver to false and continue from where you died.
Added button to "Restart Game" to Level Settings Inspector when game is over. Will also reset any World Variables marked as "Reset To Starting Value" back to that value.
Added button to "Continue Game" to Level Settings Inspector when game is over. Will also reset any World Variables marked as "Reset To Starting Value" back to that value.
Renamed MechanimCustomEvent to MechanimStateCoreCustomEvents so it wasn't so close to the Master Audio script of MechanimCustomEvents. Please delete the old named file before upgrading.
Added "Collapse All Sections" button to LevelSettings.
Added "Collapse All Sections" button to Killable.
Added "Collapse All Events" button to Triggered Spawner.
Added "Fire!" button to Triggered Spawner Inspector during runtime, to activate the preconfigured wave for any event so you don't have to wait for it to happen.
Added "Spawn Position" dropdown for Death Prefabs in Killables. Choices are Death Position (default) and Respawn position. If you never set Respawn position via code, then it is the original spawn position, which lets you spawn death prefabs from the original spawn position if you choose.
Added LevelStarted method to LevelSettingsListener!
Fixed compilation errors for Windows Phone 8 platform.
Fixed bug where WaveEnded and WaveEndedEarly methods on LevelSettingsListener passed out the wrong wave info.
Added random rotation options to Killable's Death Prefab.
Category active item counts in PoolBoss are now clickable to select all items in the category that are active.
Added Text Item Filter textbox for filtering out what you see in Pool Boss. Helps a ton when you have a lot of prefabs pooled.
Added RefillPool method to WavePrefabPool class, so you can refill the pool at any time, taking into account any weights or World Variable values that have changed since the last fill.
Added "Deal 1 Damage To All" buttons to Pool Boss item, category and "all" so you can deal damage to test things at any time (runtime only).
Changed Damage / Despawn / Kill buttons in Pool Boss to icons.
Now only show Damage / Despawn / Kill icons in Pool Boss for the item if there is at least 1 of it spawned. Otherwise they wouldn't do anything.
Breaking change: Valid Qty field for Custom Events (used for Closest or Random X Receivers option) has been changed to be able to select a World Variable value as well as entering a number. If you were using / want to use Random/Closest X, then you will need to delete existing Custom Events and create them again.
Added an Awake method to Killable Listener. That will be called when Spawned is not, that is, when a Killable starts already in the Scene and is not spawned the first time.
Added the new method to Killable's Playmaker Listener too.
Added Global wave shift up/down buttons.
Added a pop up prompt to make sure you want to delete / add / shift up / down Global waves because it can't be undone.
Fixed some Garbage Collection in Pool Boss.
Increased Group H.P. for Damage Prefab to max of 100,000 instead of 5,000. If you find it does not let you increase past 5,000 you will need to remove and re-add the Killable component.
Bug fix: PoolBoss.NextPoolItemToSpawn returned null even when Allow Instantiate More is checked.
Bug fix: A killable dying that isn't in Pool Boss will not spawn up to the limit of its Death Prefab in a huge loop. As a result, many Killable methods that were void are now boolean. Your subclasses will need to reflect that.
Bug fix: Respawn Custom Events for Killable would not fire if your Respawn Delay was > 0 seconds.
Added "Initialize Time (Frames)" field to Pool Boss. Defaults to 1. Now you can configure how many frames it takes to create all pools. You can set it between 1 and the number of different prefabs you have in Pool Boss.
Added PoolBossListener with methods: ItemSpawned, ItemDespawned, PercentInitialized, InitializationComplete.
Added Universal Custom Event Receiver script with the option to do one of the following when a chosen Custom Event occurs: Despawn, Destroy (Killable), Deal X Damage (Killable).
Now if a World Variable Listener becomes visible later on, it will show the correct updated World Variable value immediately instead of waiting for the next change.
Added a peak indicator on Pool Boss. Shows the max number that were spawned of each item since you hit Play. You can click the number to reset it to zero. There's also a Clear Peaks button at the top.
Added ability to pad beginning of World Variable Listener display with zeros for a fixed number of digits.
Added extension methods for all methods in PoolBoss that take a Transform parameter so you can call them from the Transform with 1 less parameter.
Added PoolBoss.DestroyCategoryPoolItems and DestroyPoolItem methods, only to be used when loading a new Scene with a persistent PB.
Added shift up / down / clone level buttons to global Level config.
Added Level/Wave Sort button to Syncro Spawners so you can get the Waves in order of level/wave at any time.