Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
39107cf
commit 24db994
Showing
28 changed files
with
535 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
using System.Collections; | ||
using System.Collections.Generic; | ||
using UnityEngine; | ||
|
||
// API inspired by: https://github.com/antfarmar/Unity-3D-Asteroids/blob/master/Assets/Asteroids/Scripts/Powerups/Powerup.cs | ||
public class Powerup : MonoBehaviour { | ||
|
||
private float powerDuration = 10f; | ||
private bool isVisible; | ||
private string id = ""; | ||
|
||
void Spawn() { | ||
transform.position = Vector3.zero; // Temp fixed location | ||
SetVisibility (true); | ||
} | ||
|
||
void Despawn() { | ||
SetVisibility (false); | ||
} | ||
|
||
void ActivatePower() { | ||
CancelInvoke ("DeactivatePower"); // Enables powerup duration extension | ||
Invoke ("DeactivatePower", powerDuration); // Reset to state before powerup obtained | ||
} | ||
|
||
void DeactivatePower() { | ||
Debug.Log ("POWERUP DEACTIVATED: " + id); | ||
} | ||
|
||
void ShowInScene() { | ||
Spawn(); | ||
SetVisibility(true); | ||
} | ||
|
||
void HideInScene() { | ||
Despawn(); | ||
SetVisibility(false); | ||
} | ||
|
||
void SetVisibility(bool isVisible) { | ||
this.isVisible = isVisible; | ||
gameObject.GetComponent<Renderer>().enabled = this.isVisible; | ||
gameObject.GetComponent<Collider>().enabled = this.isVisible; | ||
} | ||
|
||
void OnTriggerEnter(Collider other) { | ||
|
||
if (other.gameObject.CompareTag (Constants.PlayerTag)) { | ||
ActivatePower (); | ||
HideInScene (); | ||
Debug.Log ("PICKED UP POWERUP: " + this.id); // Print message to console | ||
} | ||
} | ||
|
||
void Start () { | ||
HideInScene (); | ||
} | ||
|
||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,137 @@ | ||
-debug | ||
-target:library | ||
-nowarn:0169 | ||
-langversion:4 | ||
-out:'Temp/Assembly-CSharp.dll' | ||
-r:'/Applications/Unity/Unity.app/Contents/Managed/UnityEngine.dll' | ||
-r:'/Applications/Unity/Unity.app/Contents/UnityExtensions/Unity/UnityAnalytics/UnityEngine.Analytics.dll' | ||
-r:'/Applications/Unity/Unity.app/Contents/UnityExtensions/Unity/PlaymodeTestsRunner/UnityEngine.PlaymodeTestsRunner.dll' | ||
-r:'/Applications/Unity/Unity.app/Contents/UnityExtensions/Unity/Networking/UnityEngine.Networking.dll' | ||
-r:'/Applications/Unity/Unity.app/Contents/UnityExtensions/Unity/GUISystem/UnityEngine.UI.dll' | ||
-r:'/Applications/Unity/Unity.app/Contents/UnityExtensions/Unity/UnityHoloLens/RuntimeEditor/UnityEngine.HoloLens.dll' | ||
-r:'/Applications/Unity/Unity.app/Contents/UnityExtensions/Unity/UnityVR/RuntimeEditor/UnityEngine.VR.dll' | ||
-r:'/Applications/Unity/Unity.app/Contents/Managed/UnityEditor.dll' | ||
-r:'/Applications/Unity/PlaybackEngines/iOSSupport/UnityEditor.iOS.Extensions.Xcode.dll' | ||
-r:'/Applications/Unity/PlaybackEngines/iOSSupport/UnityEditor.iOS.Extensions.Common.dll' | ||
-define:UNITY_5_3_OR_NEWER | ||
-define:UNITY_5_4_OR_NEWER | ||
-define:UNITY_5_5_OR_NEWER | ||
-define:UNITY_5_5_0 | ||
-define:UNITY_5_5 | ||
-define:UNITY_5 | ||
-define:UNITY_64 | ||
-define:UNITY_ANALYTICS | ||
-define:ENABLE_AUDIO | ||
-define:ENABLE_CACHING | ||
-define:ENABLE_CLOTH | ||
-define:ENABLE_DUCK_TYPING | ||
-define:ENABLE_GENERICS | ||
-define:ENABLE_MICROPHONE | ||
-define:ENABLE_MULTIPLE_DISPLAYS | ||
-define:ENABLE_PHYSICS | ||
-define:ENABLE_SPRITERENDERER_FLIPPING | ||
-define:ENABLE_SPRITES | ||
-define:ENABLE_TERRAIN | ||
-define:ENABLE_RAKNET | ||
-define:ENABLE_UNET | ||
-define:ENABLE_LZMA | ||
-define:ENABLE_UNITYEVENTS | ||
-define:ENABLE_WEBCAM | ||
-define:ENABLE_WWW | ||
-define:ENABLE_CLOUD_SERVICES_COLLAB | ||
-define:ENABLE_CLOUD_SERVICES_ADS | ||
-define:ENABLE_CLOUD_HUB | ||
-define:ENABLE_CLOUD_PROJECT_ID | ||
-define:ENABLE_CLOUD_SERVICES_UNET | ||
-define:ENABLE_CLOUD_SERVICES_BUILD | ||
-define:ENABLE_CLOUD_LICENSE | ||
-define:ENABLE_EDITOR_METRICS | ||
-define:ENABLE_EDITOR_METRICS_CACHING | ||
-define:INCLUDE_DYNAMIC_GI | ||
-define:INCLUDE_GI | ||
-define:PLATFORM_SUPPORTS_MONO | ||
-define:RENDER_SOFTWARE_CURSOR | ||
-define:INCLUDE_PUBNUB | ||
-define:ENABLE_PLAYMODE_TESTS_RUNNER | ||
-define:ENABLE_SCRIPTING_NEW_CSHARP_COMPILER | ||
-define:UNITY_STANDALONE_OSX | ||
-define:UNITY_STANDALONE | ||
-define:ENABLE_SUBSTANCE | ||
-define:ENABLE_GAMECENTER | ||
-define:ENABLE_RUNTIME_GI | ||
-define:ENABLE_MOVIES | ||
-define:ENABLE_NETWORK | ||
-define:ENABLE_CRUNCH_TEXTURE_COMPRESSION | ||
-define:ENABLE_UNITYWEBREQUEST | ||
-define:ENABLE_CLOUD_SERVICES | ||
-define:ENABLE_CLOUD_SERVICES_ANALYTICS | ||
-define:ENABLE_CLOUD_SERVICES_PURCHASING | ||
-define:ENABLE_CLOUD_SERVICES_CRASH_REPORTING | ||
-define:ENABLE_VIDEO | ||
-define:ENABLE_VR | ||
-define:ENABLE_CLUSTERINPUT | ||
-define:ENABLE_WEBSOCKET_HOST | ||
-define:ENABLE_MONO | ||
-define:ENABLE_PROFILER | ||
-define:DEBUG | ||
-define:TRACE | ||
-define:UNITY_ASSERTIONS | ||
-define:UNITY_EDITOR | ||
-define:UNITY_EDITOR_64 | ||
-define:UNITY_EDITOR_OSX | ||
-define:UNITY_TEAM_LICENSE | ||
'Assets/Scripts/Enemy/AssassinCollisionHelper.cs' | ||
'Assets/Scripts/Enemy/AssassinShip.cs' | ||
'Assets/Scripts/Enemy/BomberCollisionHelper.cs' | ||
'Assets/Scripts/Enemy/BomberShip.cs' | ||
'Assets/Scripts/Enemy/DoT.cs' | ||
'Assets/Scripts/Enemy/DropShip.cs' | ||
'Assets/Scripts/Enemy/MediShip.cs' | ||
'Assets/Scripts/Enemy/PawnShip.cs' | ||
'Assets/Scripts/Enemy/RangedShip.cs' | ||
'Assets/Scripts/Enemy/Turret.cs' | ||
'Assets/Scripts/Game/Constants.cs' | ||
'Assets/Scripts/Game/GameManager.cs' | ||
'Assets/Scripts/Game/GameState.cs' | ||
'Assets/Scripts/Game/StartMenuManager.cs' | ||
'Assets/Scripts/Game/UIManager.cs' | ||
'Assets/Scripts/General/DropShipShotSpawn.cs' | ||
'Assets/Scripts/General/FOV2D.cs' | ||
'Assets/Scripts/General/FasterShot.cs' | ||
'Assets/Scripts/General/FiringShip.cs' | ||
'Assets/Scripts/General/PlayerShip.cs' | ||
'Assets/Scripts/General/Shields.cs' | ||
'Assets/Scripts/General/Ship.cs' | ||
'Assets/Scripts/General/Shot.cs' | ||
'Assets/Scripts/General/ShotSpawn.cs' | ||
'Assets/Scripts/General/TurretShotSpawn.cs' | ||
'Assets/Scripts/Interfaces/IDamageable.cs' | ||
'Assets/Scripts/Interfaces/IFires.cs' | ||
'Assets/Scripts/Interfaces/IKillable.cs' | ||
'Assets/Scripts/Interfaces/IMovement.cs' | ||
'Assets/Scripts/Powerups/Powerup.cs' | ||
'Assets/Scripts/Scripts [old]/Enemy [old]/Bomber Type/CollisionHelperBomberType.cs' | ||
'Assets/Scripts/Scripts [old]/Enemy [old]/Bomber Type/EnemyManagerBomberType.cs' | ||
'Assets/Scripts/Scripts [old]/Enemy [old]/Bomber Type/EnemyMovementBomberType.cs' | ||
'Assets/Scripts/Scripts [old]/Enemy [old]/Collision Type/EnemyManagerCollisionType.cs' | ||
'Assets/Scripts/Scripts [old]/Enemy [old]/Collision Type/EnemyMovementCollisionType.cs' | ||
'Assets/Scripts/Scripts [old]/Enemy [old]/Distance Type/EnemyManagerRangedType.cs' | ||
'Assets/Scripts/Scripts [old]/Enemy [old]/Distance Type/EnemyMovementDistanceType.cs' | ||
'Assets/Scripts/Scripts [old]/Enemy [old]/Distance Type/EnemyShootingDistanceType.cs' | ||
'Assets/Scripts/Scripts [old]/Player/PlayerMovement.cs' | ||
'Assets/Scripts/Scripts [old]/Player/PlayerShooting.cs' | ||
'Assets/Scripts/Spawns/DropShipSpawn.cs' | ||
'Assets/Scripts/Spawns/EnemySpawnCappedTemplate.cs' | ||
'Assets/Scripts/Spawns/EnemySpawnTemplate.cs' | ||
'Assets/Scripts/Utility/ColliderHelper.cs' | ||
'Assets/Scripts/Utility/EngineUpdate.cs' | ||
'Assets/Scripts/Utility/HealthPickup.cs' | ||
'Assets/Scripts/Utility/ParticleSystemAutoDestroy.cs' | ||
'Assets/Scripts/Utility/RotationUpdate.cs' | ||
'Assets/Scripts/Utility/ShotMover.cs' | ||
-r:'/Applications/Unity/Unity.app/Contents/MonoBleedingEdge/lib/mono/unity/System.Runtime.Serialization.dll' | ||
-r:'/Applications/Unity/Unity.app/Contents/MonoBleedingEdge/lib/mono/unity/System.Xml.Linq.dll' | ||
-r:'/Applications/Unity/Unity.app/Contents/MonoBleedingEdge/lib/mono/unity/UnityScript.dll' | ||
-r:'/Applications/Unity/Unity.app/Contents/MonoBleedingEdge/lib/mono/unity/UnityScript.Lang.dll' | ||
-r:'/Applications/Unity/Unity.app/Contents/MonoBleedingEdge/lib/mono/unity/Boo.Lang.dll' | ||
-sdk:unity |
Oops, something went wrong.