├── Assets ├── Patterns │ ├── Decorator │ │ ├── IRifle.cs │ │ ├── Decorator.unity.meta │ │ ├── BasicRifle.cs │ │ ├── WithScope.cs │ │ ├── BasicRifle.cs.meta │ │ ├── Client.cs.meta │ │ ├── IRifle.cs.meta │ │ ├── WithScope.cs.meta │ │ ├── RifleDecorator.cs.meta │ │ ├── WithStabilizer.cs.meta │ │ ├── WithStabilizer.cs │ │ ├── RifleDecorator.cs │ │ ├── Client.cs │ │ └── Decorator.unity │ ├── Prototype │ │ ├── iCopyable.cs │ │ ├── Sniper.cs │ │ ├── Enemy.cs │ │ ├── Prototype.unity.meta │ │ ├── Drone.mat.meta │ │ ├── Sniper.mat.meta │ │ ├── Drone.cs │ │ ├── EnemySpawner.cs │ │ ├── Drone.cs.meta │ │ ├── Enemy.cs.meta │ │ ├── Client.cs.meta │ │ ├── Sniper.cs.meta │ │ ├── iCopyable.cs.meta │ │ ├── EnemySpawner.cs.meta │ │ ├── Client.cs │ │ ├── Drone.mat │ │ └── Sniper.mat │ ├── State │ │ ├── IShipState.cs │ │ ├── AlertShipState.cs │ │ ├── DisabledShipState.cs │ │ ├── NormalShipState.cs │ │ ├── State.unity.meta │ │ ├── Ship.cs.meta │ │ ├── Client.cs.meta │ │ ├── AlertShipState.cs.meta │ │ ├── IShipState.cs.meta │ │ ├── DisabledShipState.cs.meta │ │ ├── NormalShipState.cs.meta │ │ ├── Ship.cs │ │ └── Client.cs │ ├── DependencyInjection │ │ ├── IEngine.cs │ │ ├── IDriver.cs │ │ ├── DependencyInjection.unity.meta │ │ ├── HumanDriver.cs │ │ ├── AndroidDriver.cs │ │ ├── Bike.cs.meta │ │ ├── Client.cs.meta │ │ ├── IDriver.cs.meta │ │ ├── IEngine.cs.meta │ │ ├── JetEngine.cs.meta │ │ ├── AndroidDriver.cs.meta │ │ ├── HumanDriver.cs.meta │ │ ├── NitroEngine.cs.meta │ │ ├── NitroEngine.cs │ │ ├── JetEngine.cs │ │ ├── Bike.cs │ │ └── Client.cs │ ├── Strategy │ │ ├── ISeekBehaviour.cs │ │ ├── Tomahawk.cs │ │ ├── Torpedo.cs │ │ ├── SideWinder.cs │ │ ├── Strategy.unity.meta │ │ ├── SeekWithSonar.cs │ │ ├── SeekWithGPS.cs │ │ ├── SeekWithHeat.cs │ │ ├── Client.cs.meta │ │ ├── Missile.cs.meta │ │ ├── SeekWithGPS.cs.meta │ │ ├── SideWinder.cs.meta │ │ ├── Tomahawk.cs.meta │ │ ├── Torpedo.cs.meta │ │ ├── ISeekBehaviour.cs.meta │ │ ├── SeekWithHeat.cs.meta │ │ ├── SeekWithSonar.cs.meta │ │ ├── Missile.cs │ │ └── Client.cs │ ├── Visitor │ │ ├── IRobotPart.cs │ │ ├── Battery.cs │ │ ├── MechanicalArm.cs │ │ ├── ThermalImager.cs │ │ ├── Visitor.unity.meta │ │ ├── IRobotPartVisitor.cs │ │ ├── Battery.cs.meta │ │ ├── Client.cs.meta │ │ ├── Robot.cs.meta │ │ ├── IRobotPart.cs.meta │ │ ├── IRobotPartVisitor.cs.meta │ │ ├── MechanicalArm.cs.meta │ │ ├── ThermalImager.cs.meta │ │ ├── RobotPartActivateVisitor.cs.meta │ │ ├── RobotPartShutdownVisitor.cs.meta │ │ ├── Robot.cs │ │ ├── RobotPartActivateVisitor.cs │ │ ├── RobotPartShutdownVisitor.cs │ │ └── Client.cs │ ├── FactoryMethod │ │ ├── INPC.cs │ │ ├── NPCType.cs │ │ ├── FactoryMethod.unity.meta │ │ ├── Farmer.cs │ │ ├── Beggar.cs │ │ ├── Shopowner.cs │ │ ├── Beggar.cs.meta │ │ ├── Client.cs.meta │ │ ├── Farmer.cs.meta │ │ ├── INPC.cs.meta │ │ ├── NPCFactory.cs.meta │ │ ├── NPCSpawner.cs.meta │ │ ├── NPCType.cs.meta │ │ ├── Shopowner.cs.meta │ │ ├── Client.cs │ │ ├── NPCFactory.cs │ │ └── NPCSpawner.cs │ ├── AbstractFactory │ │ ├── IAnimal.cs │ │ ├── IHuman.cs │ │ ├── AnimalType.cs │ │ ├── FactoryType.cs │ │ ├── HumanType.cs │ │ ├── AbstractFactory.unity.meta │ │ ├── Cat.cs │ │ ├── Dog.cs │ │ ├── AbstractFactory.cs │ │ ├── Farmer.cs │ │ ├── Beggar.cs │ │ ├── Shopowner.cs │ │ ├── Cat.cs.meta │ │ ├── Dog.cs.meta │ │ ├── Beggar.cs.meta │ │ ├── Client.cs.meta │ │ ├── Farmer.cs.meta │ │ ├── HumanType.cs.meta │ │ ├── IAnimal.cs.meta │ │ ├── IHuman.cs.meta │ │ ├── Shopowner.cs.meta │ │ ├── AnimalFactory.cs.meta │ │ ├── AnimalType.cs.meta │ │ ├── FactoryType.cs.meta │ │ ├── HumanFactory.cs.meta │ │ ├── NPCSpawner.cs.meta │ │ ├── AbstractFactory.cs.meta │ │ ├── FactoryProducer.cs.meta │ │ ├── AnimalFactory.cs │ │ ├── FactoryProducer.cs │ │ ├── HumanFactory.cs │ │ ├── Client.cs │ │ └── NPCSpawner.cs │ ├── Command │ │ ├── RemoteControlDevice.cs │ │ ├── Command.unity.meta │ │ ├── Command.cs │ │ ├── TurnOnCommand.cs │ │ ├── TurnOffCommand.cs │ │ ├── Invoker.cs │ │ ├── Client.cs.meta │ │ ├── Command.cs.meta │ │ ├── Invoker.cs.meta │ │ ├── KillSwitchCommand.cs.meta │ │ ├── RadioReceiver.cs.meta │ │ ├── TurnOffCommand.cs.meta │ │ ├── TurnOnCommand.cs.meta │ │ ├── RemoteControlDevice.cs.meta │ │ ├── TelevisionReceiver.cs.meta │ │ ├── RadioReceiver.cs │ │ ├── TelevisionReceiver.cs │ │ ├── KillSwitchCommand.cs │ │ └── Client.cs │ ├── Facade │ │ ├── PlayerData.cs │ │ ├── Facade.unity.meta │ │ ├── UIManager.cs │ │ ├── CloudManager.cs │ │ ├── ScoreManager.cs │ │ ├── Player.cs │ │ ├── Client.cs.meta │ │ ├── Player.cs.meta │ │ ├── CloudManager.cs.meta │ │ ├── PlayerData.cs.meta │ │ ├── SaveManager.cs.meta │ │ ├── ScoreManager.cs.meta │ │ ├── UIManager.cs.meta │ │ ├── Client.cs │ │ └── SaveManager.cs │ ├── EventBus │ │ ├── EventBus.unity.meta │ │ ├── Cannon.cs.meta │ │ ├── Rocket.cs.meta │ │ ├── EventBus.cs.meta │ │ ├── EventList.cs.meta │ │ ├── EventPublisher.cs.meta │ │ ├── EventList.cs │ │ ├── Cannon.cs │ │ ├── EventPublisher.cs │ │ ├── Rocket.cs │ │ └── EventBus.cs │ ├── Observer │ │ ├── Observer.unity.meta │ │ ├── Buzzer.cs.meta │ │ ├── Client.cs.meta │ │ ├── Timer.cs.meta │ │ ├── Notifier.cs.meta │ │ ├── WarningLight.cs.meta │ │ ├── Client.cs │ │ ├── Notifier.cs │ │ ├── WarningLight.cs │ │ ├── Buzzer.cs │ │ └── Timer.cs │ ├── Adapter.meta │ ├── Command.meta │ ├── EventBus.meta │ ├── Facade.meta │ ├── ObjectPool │ │ ├── ObjectPool.unity.meta │ │ ├── Runner.cs │ │ ├── Runner.prefab.meta │ │ ├── Walker.cs │ │ ├── Walker.prefab.meta │ │ ├── Screamer.prefab.meta │ │ ├── Client.cs.meta │ │ ├── Runner.cs.meta │ │ ├── Walker.cs.meta │ │ ├── ObjectPool.cs.meta │ │ ├── Client.cs │ │ ├── ObjectPool.cs │ │ ├── Runner.prefab │ │ ├── Screamer.prefab │ │ └── Walker.prefab │ ├── Observer.meta │ ├── Singleton │ │ ├── Singleton.unity.meta │ │ ├── GameManager.cs │ │ ├── Client.cs.meta │ │ ├── Singleton.cs.meta │ │ ├── GameManager.cs.meta │ │ ├── InventoryManager.cs.meta │ │ ├── InventoryManager.cs │ │ ├── Client.cs │ │ └── Singleton.cs │ ├── State.meta │ ├── Strategy.meta │ ├── Visitor.meta │ ├── Adapter │ │ ├── Class.meta │ │ ├── Class │ │ │ ├── ClassAdapter.unity.meta │ │ │ ├── IOnlinePlayer.cs │ │ │ ├── Client.cs.meta │ │ │ ├── IOnlinePlayer.cs.meta │ │ │ ├── OnlinePlayer.cs.meta │ │ │ ├── OnlinePlayerClassAdapter.cs.meta │ │ │ ├── OnlinePlayerClassAdapter.cs │ │ │ ├── OnlinePlayer.cs │ │ │ └── Client.cs │ │ ├── Object │ │ │ ├── ObjectAdapter.unity.meta │ │ │ ├── Client.cs.meta │ │ │ ├── OnlinePlayer.cs.meta │ │ │ ├── OnlinePlayerObjectAdapter.cs.meta │ │ │ ├── OnlinePlayerObjectAdapter.cs │ │ │ ├── OnlinePlayer.cs │ │ │ └── Client.cs │ │ └── Object.meta │ ├── Decorator.meta │ ├── FactoryMethod.meta │ ├── ObjectPool.meta │ ├── Prototype.meta │ ├── Singleton.meta │ ├── AbstractFactory.meta │ ├── ServiceLocator.meta │ ├── ServiceLocator │ │ ├── ServiceLocator.unity.meta │ │ ├── LighingCoordiantor.cs │ │ ├── LobbyCoordinator.cs │ │ ├── CurrencyConverter.cs │ │ ├── Client.cs.meta │ │ ├── ServiceLocator.cs.meta │ │ ├── CurrencyConverter.cs.meta │ │ ├── LighingCoordiantor.cs.meta │ │ ├── LobbyCoordinator.cs.meta │ │ ├── ServiceLocator.cs │ │ ├── Client.cs │ │ └── ServiceLocator.unity │ ├── SpatialPartition.meta │ ├── SpatialPartition │ │ ├── SpatialPartition.unity.meta │ │ ├── IUnit.cs │ │ ├── Client.cs.meta │ │ ├── Grid.cs.meta │ │ ├── IUnit.cs.meta │ │ ├── Predator.cs.meta │ │ ├── Prey.cs.meta │ │ ├── Prey.cs │ │ ├── Predator.cs │ │ ├── Grid.cs │ │ └── Client.cs │ └── DependencyInjection.meta └── Patterns.meta ├── ProjectSettings ├── ProjectVersion.txt ├── ClusterInputManager.asset ├── NetworkManager.asset ├── XRSettings.asset ├── TimeManager.asset ├── EditorBuildSettings.asset ├── VFXManager.asset ├── AudioManager.asset ├── TagManager.asset ├── EditorSettings.asset ├── PresetManager.asset ├── UnityConnectSettings.asset ├── DynamicsManager.asset ├── Physics2DSettings.asset ├── NavMeshAreas.asset ├── GraphicsSettings.asset ├── QualitySettings.asset └── InputManager.asset ├── .gitignore ├── Logs └── Packages-Update.log ├── LICENSE ├── Packages └── manifest.json └── README.md /Assets/Patterns/Decorator/IRifle.cs: -------------------------------------------------------------------------------- 1 | public interface IRifle 2 | { 3 | float GetAccuracy(); 4 | } -------------------------------------------------------------------------------- /Assets/Patterns/Prototype/iCopyable.cs: -------------------------------------------------------------------------------- 1 | public interface iCopyable 2 | { 3 | iCopyable Copy(); 4 | } 5 | -------------------------------------------------------------------------------- /Assets/Patterns/State/IShipState.cs: -------------------------------------------------------------------------------- 1 | public interface IShipState 2 | { 3 | void Execute(Ship ship); 4 | } -------------------------------------------------------------------------------- /Assets/Patterns/DependencyInjection/IEngine.cs: -------------------------------------------------------------------------------- 1 | public interface IEngine 2 | { 3 | void StartEngine(); 4 | } -------------------------------------------------------------------------------- /Assets/Patterns/Strategy/ISeekBehaviour.cs: -------------------------------------------------------------------------------- 1 | public interface ISeekBehaviour 2 | { 3 | void Seek(); 4 | } 5 | -------------------------------------------------------------------------------- /Assets/Patterns/DependencyInjection/IDriver.cs: -------------------------------------------------------------------------------- 1 | public interface IDriver 2 | { 3 | void Control(Bike bike); 4 | } -------------------------------------------------------------------------------- /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2019.1.0b4 2 | m_EditorVersionWithRevision: 2019.1.0b4 (fd0dda99e05a) 3 | -------------------------------------------------------------------------------- /Assets/Patterns/Visitor/IRobotPart.cs: -------------------------------------------------------------------------------- 1 | public interface IRobotPart 2 | { 3 | void Accept(IRobotPartVisitor robotPartVisitor); 4 | } -------------------------------------------------------------------------------- /Assets/Patterns/FactoryMethod/INPC.cs: -------------------------------------------------------------------------------- 1 | namespace Pattern.FactoryMethod 2 | { 3 | public interface INPC 4 | { 5 | void Speak(); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Assets/Patterns/Strategy/Tomahawk.cs: -------------------------------------------------------------------------------- 1 | public class Tomahawk : Missile 2 | { 3 | void Awake() 4 | { 5 | seekBehavior = new SeekWithGPS(); 6 | } 7 | } -------------------------------------------------------------------------------- /Assets/Patterns/AbstractFactory/IAnimal.cs: -------------------------------------------------------------------------------- 1 | namespace Pattern.AbstractFactory 2 | { 3 | public interface IAnimal 4 | { 5 | void Voice(); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Assets/Patterns/AbstractFactory/IHuman.cs: -------------------------------------------------------------------------------- 1 | namespace Pattern.AbstractFactory 2 | { 3 | public interface IHuman 4 | { 5 | void Speak(); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Assets/Patterns/Command/RemoteControlDevice.cs: -------------------------------------------------------------------------------- 1 | abstract class RemoteControlDevice 2 | { 3 | public abstract void TurnOn(); 4 | public abstract void TurnOff(); 5 | } -------------------------------------------------------------------------------- /Assets/Patterns/Strategy/Torpedo.cs: -------------------------------------------------------------------------------- 1 | public class Torpedo : Missile 2 | { 3 | void Awake() 4 | { 5 | seekBehavior = new SeekWithSonar(); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Assets/Patterns/Prototype/Sniper.cs: -------------------------------------------------------------------------------- 1 | public class Sniper : Enemy 2 | { 3 | public void Shoot() 4 | { 5 | // Implement shooting functionality. 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Assets/Patterns/Strategy/SideWinder.cs: -------------------------------------------------------------------------------- 1 | public class SideWinder : Missile 2 | { 3 | void Awake() 4 | { 5 | seekBehavior = new SeekWithHeat(); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Assets/Patterns/AbstractFactory/AnimalType.cs: -------------------------------------------------------------------------------- 1 | namespace Pattern.AbstractFactory 2 | { 3 | public enum AnimalType 4 | { 5 | Dog, 6 | Cat 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /ProjectSettings/ClusterInputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!236 &1 4 | ClusterInputManager: 5 | m_ObjectHideFlags: 0 6 | m_Inputs: [] 7 | -------------------------------------------------------------------------------- /Assets/Patterns/AbstractFactory/FactoryType.cs: -------------------------------------------------------------------------------- 1 | namespace Pattern.AbstractFactory 2 | { 3 | public enum FactoryType 4 | { 5 | Human, 6 | Animal 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /Assets/Patterns/Facade/PlayerData.cs: -------------------------------------------------------------------------------- 1 | [System.Serializable] 2 | public class PlayerData 3 | { 4 | public int score; 5 | public int playerID; 6 | public float health; 7 | } 8 | -------------------------------------------------------------------------------- /Assets/Patterns/FactoryMethod/NPCType.cs: -------------------------------------------------------------------------------- 1 | namespace Pattern.FactoryMethod 2 | { 3 | public enum NPCType 4 | { 5 | Farmer, 6 | Beggar, 7 | Shopowner 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Assets/Patterns/Prototype/Enemy.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | public class Enemy : MonoBehaviour, iCopyable 4 | { 5 | public iCopyable Copy() 6 | { 7 | return Instantiate(this); 8 | } 9 | } -------------------------------------------------------------------------------- /Assets/Patterns/State/AlertShipState.cs: -------------------------------------------------------------------------------- 1 | public class AlertShipState : IShipState 2 | { 3 | public void Execute(Ship ship) 4 | { 5 | ship.LogStatus("ALERT: all hands on deck."); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Assets/Patterns/Visitor/Battery.cs: -------------------------------------------------------------------------------- 1 | public class Battery : IRobotPart 2 | { 3 | public void Accept(IRobotPartVisitor robotPartVisitor) 4 | { 5 | robotPartVisitor.Visit(this); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Assets/Patterns/AbstractFactory/HumanType.cs: -------------------------------------------------------------------------------- 1 | namespace Pattern.AbstractFactory 2 | { 3 | public enum HumanType 4 | { 5 | Farmer, 6 | Beggar, 7 | Shopowner 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Assets/Patterns/Facade/Facade.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a80819b86ad88694bb383fd2af8e86ac 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Patterns/Facade/UIManager.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | public class UIManager 4 | { 5 | public void DisplaySaveIcon() 6 | { 7 | Debug.Log("Displaying the save icon."); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Assets/Patterns/State/DisabledShipState.cs: -------------------------------------------------------------------------------- 1 | public class DisabledShipState : IShipState 2 | { 3 | public void Execute(Ship ship) 4 | { 5 | ship.LogStatus("DISABLED: crew jumping ship."); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Assets/Patterns/State/NormalShipState.cs: -------------------------------------------------------------------------------- 1 | public class NormalShipState : IShipState 2 | { 3 | public void Execute(Ship ship) 4 | { 5 | ship.LogStatus("NORMAL: ship operating as normal."); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Assets/Patterns/State/State.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4cec0232264c49b4fbffede7dc1471b6 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Patterns/Visitor/MechanicalArm.cs: -------------------------------------------------------------------------------- 1 | public class MechanicalArm : IRobotPart 2 | { 3 | public void Accept(IRobotPartVisitor robotPartVisitor) 4 | { 5 | robotPartVisitor.Visit(this); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Assets/Patterns/Visitor/ThermalImager.cs: -------------------------------------------------------------------------------- 1 | public class ThermalImager : IRobotPart 2 | { 3 | public void Accept(IRobotPartVisitor robotPartVisitor) 4 | { 5 | robotPartVisitor.Visit(this); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /ProjectSettings/NetworkManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!149 &1 4 | NetworkManager: 5 | m_ObjectHideFlags: 0 6 | m_DebugLevel: 0 7 | m_Sendrate: 15 8 | m_AssetToPrefab: {} 9 | -------------------------------------------------------------------------------- /Assets/Patterns.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ddce74f5b5a92cb4badde222ec4ab546 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Patterns/Command/Command.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9afb35813597924458f31bf649682c14 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Patterns/EventBus/EventBus.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: acc58e12fca4e15459a92d672bb4e4ec 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Patterns/Observer/Observer.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1abc644f39665674b88bb9f4e223e194 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Patterns/Strategy/Strategy.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cf18c3212a835f042a86e42da2a1dcd7 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Patterns/Visitor/Visitor.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 680da3ebdf937bf438047e4b822f5c2d 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Patterns/Adapter.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 23dfe5a70940c5f4ca887a77df213e15 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Patterns/Command.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f7b1c87cf34b846489284da7c09063e3 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Patterns/Decorator/Decorator.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9b14bd998d750454493a8559fc0513e8 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Patterns/EventBus.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a65e2598acebb474b81ed35f67bb88a1 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Patterns/Facade.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3d8ea56fbc757e043b89085caa04cc8b 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Patterns/ObjectPool/ObjectPool.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 66506302000021745b84843e0b862620 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Patterns/Observer.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9e8ddf5f9712b3642a0cbdccac304dfa 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Patterns/Prototype/Prototype.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 00a99ac7e3011094e871ac18002c607c 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Patterns/Singleton/Singleton.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 10b6a7e4bf9f8cb4ab389ebb8145341a 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Patterns/State.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3f925e2525e41e840b9dd7383f3aa008 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Patterns/Strategy.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5f10965087d72e547acba3f6651238b7 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Patterns/Visitor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 72c5d55faeb72894d9f919269e99022d 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Patterns/Adapter/Class.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9ae06a74dfcb7dc449541ad4c1d3fed0 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Patterns/Adapter/Class/ClassAdapter.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 74dff713557763149b233693f7367ad9 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Patterns/Adapter/Object/ObjectAdapter.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6c4b76985cb31b24889ac86541812b20 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Patterns/Decorator.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 123c8082305bbce4585626e1dfff0c38 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Patterns/FactoryMethod.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 89fdd269522a28a499e55b3ac8274224 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Patterns/FactoryMethod/FactoryMethod.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8ae81669b8ebb994cb5aafa732d939a5 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Patterns/ObjectPool.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c8e006ec33464e04695bc396ad6dd1ae 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Patterns/Prototype.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e088fbb72922d204ca8866182bbcad66 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Patterns/Singleton.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fcc7d02353625d6419872cef9da26951 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /ProjectSettings/XRSettings.asset: -------------------------------------------------------------------------------- 1 | { 2 | "m_SettingKeys": [ 3 | "VR Device Disabled", 4 | "VR Device User Alert" 5 | ], 6 | "m_SettingValues": [ 7 | "False", 8 | "False" 9 | ] 10 | } -------------------------------------------------------------------------------- /Assets/Patterns/AbstractFactory.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fe5bb2fb4ac680949a831033854798f5 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Patterns/AbstractFactory/AbstractFactory.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e44ce75dfe6d569428fb988518fd1925 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Patterns/Adapter/Object.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0cdd0ed303956fa439672e8cb65319d1 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Patterns/Decorator/BasicRifle.cs: -------------------------------------------------------------------------------- 1 | public class BasicRifle : IRifle 2 | { 3 | private float m_BasicAccurancy = 5.0f; 4 | 5 | public float GetAccuracy() 6 | { 7 | return m_BasicAccurancy; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Assets/Patterns/Facade/CloudManager.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | public class CloudManager 4 | { 5 | public void UploadSaveGame(string playerData) 6 | { 7 | Debug.Log("Uploading save data."); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Assets/Patterns/ServiceLocator.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a7d780851a5a21e44a52f8d601a771fc 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Patterns/ServiceLocator/ServiceLocator.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d0b7b646fa966784f93cbd2257acf5e2 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Patterns/SpatialPartition.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9156dffe529deb24994a404db70f8f8a 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Patterns/SpatialPartition/SpatialPartition.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f92278e9e09b0fa439932f87e344ec0d 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Patterns/Strategy/SeekWithSonar.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | public class SeekWithSonar : ISeekBehaviour 4 | { 5 | public void Seek() 6 | { 7 | Debug.Log("Seeking target with sonar."); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Assets/Patterns/DependencyInjection.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 92df8ca654972764b82eb8646a39e5e7 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Patterns/SpatialPartition/IUnit.cs: -------------------------------------------------------------------------------- 1 | public interface IUnit 2 | { 3 | // The Unit can add itself to the grid 4 | void AddToGrid(int cell); 5 | 6 | // The Unit can return is current grid position 7 | int GetGridPosition(); 8 | } -------------------------------------------------------------------------------- /Assets/Patterns/Strategy/SeekWithGPS.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | public class SeekWithGPS : ISeekBehaviour 4 | { 5 | public void Seek() 6 | { 7 | Debug.Log("Seeking target with GPS coordinates."); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Assets/Patterns/Strategy/SeekWithHeat.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | public class SeekWithHeat : ISeekBehaviour 4 | { 5 | public void Seek() 6 | { 7 | Debug.Log("Seeking target with heat signature."); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Assets/Patterns/DependencyInjection/DependencyInjection.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 236e756382db1b54b8e4437d963a94fa 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Patterns/Facade/ScoreManager.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | public class ScoreManager 4 | { 5 | public int GetScore(int playerId) 6 | { 7 | Debug.Log("Returning player score."); 8 | return 0; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Assets/Patterns/ServiceLocator/LighingCoordiantor.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | public class LightingCoordinator 4 | { 5 | public void TurnOffLights() 6 | { 7 | Debug.Log("Turning off all the lights."); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Assets/Patterns/ServiceLocator/LobbyCoordinator.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | public class LobbyCoordinator 4 | { 5 | public void AddPlayerToLobby() 6 | { 7 | Debug.Log("Adding a player to the lobby."); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Assets/Patterns/ObjectPool/Runner.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Zombie 4 | { 5 | public class Runner : MonoBehaviour 6 | { 7 | public void Run() 8 | { 9 | // Zombie runs! 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /Assets/Patterns/Visitor/IRobotPartVisitor.cs: -------------------------------------------------------------------------------- 1 | public interface IRobotPartVisitor 2 | { 3 | void Visit(Robot robot); 4 | void Visit(Battery battery); 5 | void Visit(MechanicalArm mechanicalArm); 6 | void Visit(ThermalImager thermalImager); 7 | } -------------------------------------------------------------------------------- /Assets/Patterns/Prototype/Drone.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 38a064f18b4db7d41a3b2a9d4d7452c2 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Patterns/Prototype/Sniper.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0d79146a3908ef244b82016d4a7796ae 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Patterns/Facade/Player.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | public class Player 4 | { 5 | public int GetHealth() 6 | { 7 | return 10; 8 | } 9 | 10 | public int GetPlayerID() 11 | { 12 | return 007; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Assets/Patterns/ObjectPool/Runner.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: df50b5ebb6f46a54c9e7d697520b293e 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 100100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Patterns/ObjectPool/Walker.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Zombie 4 | { 5 | public class Walker : MonoBehaviour 6 | { 7 | public void Move() 8 | { 9 | // Zombie walks! 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Assets/Patterns/ObjectPool/Walker.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 01daa0edc631cb4469c3e51ae1cad8de 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 100100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Patterns/Adapter/Class/IOnlinePlayer.cs: -------------------------------------------------------------------------------- 1 | public interface iOnlinePlayer 2 | { 3 | string GetFirstName(int userID); 4 | string GetLastName(int userID); 5 | string GetFullNameLastFirst(int userID); 6 | string GetFullNameFirstLast(int userID); 7 | } 8 | -------------------------------------------------------------------------------- /Assets/Patterns/ObjectPool/Screamer.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 84e20c1aa3d566c47a688a90a9eb76de 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 100100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!5 &1 4 | TimeManager: 5 | m_ObjectHideFlags: 0 6 | Fixed Timestep: 0.02 7 | Maximum Allowed Timestep: 0.1 8 | m_TimeScale: 1 9 | Maximum Particle Timestep: 0.03 10 | -------------------------------------------------------------------------------- /Assets/Patterns/ServiceLocator/CurrencyConverter.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | public class CurrencyConverter 4 | { 5 | public void ConvertToUsDollar(int inGameCurrency) 6 | { 7 | Debug.Log("Players in-game currency is worth 100$ US"); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Assets/Patterns/AbstractFactory/Cat.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Pattern.AbstractFactory 4 | { 5 | public class Cat : IAnimal 6 | { 7 | public void Voice() 8 | { 9 | Debug.Log("Cat: Meow!"); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Assets/Patterns/AbstractFactory/Dog.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Pattern.AbstractFactory 4 | { 5 | public class Dog : IAnimal 6 | { 7 | public void Voice() 8 | { 9 | Debug.Log("Dog: Woof!"); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Assets/Patterns/Command/Command.cs: -------------------------------------------------------------------------------- 1 | abstract class Command 2 | { 3 | protected RemoteControlDevice m_Receiver; 4 | 5 | public Command(RemoteControlDevice receiver) 6 | { 7 | m_Receiver = receiver; 8 | } 9 | 10 | public abstract void Execute(); 11 | } -------------------------------------------------------------------------------- /Assets/Patterns/Command/TurnOnCommand.cs: -------------------------------------------------------------------------------- 1 | class TurnOnCommand : Command 2 | { 3 | public TurnOnCommand(RemoteControlDevice receiver) : base(receiver) 4 | { 5 | } 6 | 7 | public override void Execute() 8 | { 9 | m_Receiver.TurnOn(); 10 | } 11 | } -------------------------------------------------------------------------------- /Assets/Patterns/Prototype/Drone.cs: -------------------------------------------------------------------------------- 1 | public class Drone: Enemy 2 | { 3 | public void Fly() 4 | { 5 | // Implement flying functionality. 6 | } 7 | 8 | public void Fire() 9 | { 10 | // Implement laser fire functionality. 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Assets/Patterns/Singleton/GameManager.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | public class GameManager : Singleton // Inheriting Singleton and specifying the type. 4 | { 5 | public void InitializeGame() 6 | { 7 | Debug.Log("Initializing the game."); 8 | } 9 | } -------------------------------------------------------------------------------- /Assets/Patterns/Command/TurnOffCommand.cs: -------------------------------------------------------------------------------- 1 | class TurnOffCommand : Command 2 | { 3 | public TurnOffCommand(RemoteControlDevice receiver) : base(receiver) 4 | { 5 | } 6 | 7 | public override void Execute() 8 | { 9 | m_Receiver.TurnOff(); 10 | } 11 | } -------------------------------------------------------------------------------- /Assets/Patterns/AbstractFactory/AbstractFactory.cs: -------------------------------------------------------------------------------- 1 | namespace Pattern.AbstractFactory 2 | { 3 | public abstract class AbstractFactory 4 | { 5 | public abstract IHuman GetHuman(HumanType humanType); 6 | public abstract IAnimal GetAnimal(AnimalType animalType); 7 | } 8 | } -------------------------------------------------------------------------------- /Assets/Patterns/FactoryMethod/Farmer.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Pattern.FactoryMethod 4 | { 5 | public class Farmer : INPC 6 | { 7 | public void Speak() 8 | { 9 | Debug.Log("Farmer: You reap what you sow!"); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Assets/Patterns/AbstractFactory/Farmer.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Pattern.AbstractFactory 4 | { 5 | public class Farmer : IHuman 6 | { 7 | public void Speak() 8 | { 9 | Debug.Log("Farmer: You reap what you sow!"); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Assets/Patterns/Command/Invoker.cs: -------------------------------------------------------------------------------- 1 | class Invoker 2 | { 3 | private Command m_Command; 4 | 5 | public void SetCommand(Command command) 6 | { 7 | m_Command = command; 8 | } 9 | 10 | public void ExecuteCommand() 11 | { 12 | m_Command.Execute(); 13 | } 14 | } -------------------------------------------------------------------------------- /Assets/Patterns/FactoryMethod/Beggar.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Pattern.FactoryMethod 4 | { 5 | public class Beggar : INPC 6 | { 7 | public void Speak() 8 | { 9 | Debug.Log("Beggar: Do you have some change to spare?"); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Assets/Patterns/Prototype/EnemySpawner.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | public class EnemySpawner : MonoBehaviour 4 | { 5 | public iCopyable m_Copy; 6 | 7 | public Enemy SpawnEnemy(Enemy prototype) 8 | { 9 | m_Copy = prototype.Copy(); 10 | return (Enemy)m_Copy; 11 | } 12 | } -------------------------------------------------------------------------------- /Assets/Patterns/AbstractFactory/Beggar.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Pattern.AbstractFactory 4 | { 5 | public class Beggar : IHuman 6 | { 7 | public void Speak() 8 | { 9 | Debug.Log("Beggar: Do you have some change to spare?"); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Assets/Patterns/FactoryMethod/Shopowner.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Pattern.FactoryMethod 4 | { 5 | public class Shopowner : INPC 6 | { 7 | public void Speak() 8 | { 9 | Debug.Log("Shopowner: Do you wish to purchase something?"); 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /Assets/Patterns/AbstractFactory/Shopowner.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Pattern.AbstractFactory 4 | { 5 | public class Shopowner : IHuman 6 | { 7 | public void Speak() 8 | { 9 | Debug.Log("Shopowner: Do you wish to purchase something?"); 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /Assets/Patterns/DependencyInjection/HumanDriver.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | public class HumanDriver : IDriver 4 | { 5 | private Bike m_Bike; 6 | 7 | public void Control(Bike bike) 8 | { 9 | m_Bike = bike; 10 | Debug.Log("A human (player) will control the bike"); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Assets/Patterns/DependencyInjection/AndroidDriver.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | public class AndroidDriver : IDriver 4 | { 5 | private Bike m_Bike; 6 | 7 | public void Control(Bike bike) 8 | { 9 | m_Bike = bike; 10 | Debug.Log("This bike will be controlled by an AI"); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Assets/Patterns/State/Ship.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3b71dc2707700c14f8e9e28067908126 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/Command/Client.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 53ae41636628464468aa2e67ac045b65 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/Command/Command.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 25169e48f83fa46458fbed39368c7e9c 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/Command/Invoker.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 43e977b84fce3fe4492db94f3061818b 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/Decorator/WithScope.cs: -------------------------------------------------------------------------------- 1 | public class WithScope : RifleDecorator 2 | { 3 | private float m_ScopeAccurancy = 20.0f; 4 | 5 | public WithScope(IRifle rifle) : base(rifle) {} 6 | 7 | public override float GetAccuracy() 8 | { 9 | return base.GetAccuracy() + m_ScopeAccurancy; 10 | } 11 | } -------------------------------------------------------------------------------- /Assets/Patterns/EventBus/Cannon.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3068e95c40279114e9d73285788fa05c 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/EventBus/Rocket.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 11b74986974b9434083455a8b2211037 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/Facade/Client.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fe27b08d231153a4da0effe71cdcae01 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/Facade/Player.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 17139411bc6d2034e976004c1e0738c5 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/Observer/Buzzer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a8b345a40eae33d4c8fbdd74f77fc06a 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/Observer/Client.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c2f6d68bd6379c74b8509bef96f88bb9 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/Observer/Timer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bebde74c1e78a7f4ab5c78aec0a5614a 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/Prototype/Drone.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2f9a0aa4692f5774685e8a1609cd4bb2 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/Prototype/Enemy.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 666cb78f44b45d844a6383fa5d8fba9a 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/State/Client.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7dc45006933eda14d9376fd05ae50cf2 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/Strategy/Client.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dacc44005181eed4dadd1408ea2557ec 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/Visitor/Battery.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c854e940d37046043b8a92b9e9677233 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/Visitor/Client.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b37759b305a67aa4ab5e8cbe5a4dc3fe 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/Visitor/Robot.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3679f936ec3403d40a0b241309bd3f23 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/AbstractFactory/Cat.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c50587ad5ae079d4997decbfa7e9e33a 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/AbstractFactory/Dog.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9c17576cf10df3f429d7b5b3378227f6 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/Adapter/Class/Client.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7cd05a666c3544744b49445ee07575b0 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/Decorator/BasicRifle.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8100df8c7b1690e4d83cf95847b9f940 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/Decorator/Client.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 48968bfaf7dce704ea5da2a1dec682b5 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/Decorator/IRifle.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: eaceffee6b82519459d2a4384984e217 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/Decorator/WithScope.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 19c088e9195ba784496622866e07bbb3 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/EventBus/EventBus.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e3f69a42dcacf2d498097fc46f875dcb 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/EventBus/EventList.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fe97f3b337c98ae4d8e960fa64d59e68 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/Facade/CloudManager.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 59950807bc58530449e3d95abf2d8bef 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/Facade/PlayerData.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c264ca401ef718b48a127aecf6603c7f 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/Facade/SaveManager.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 54da81773613cb2469f775076c559390 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/Facade/ScoreManager.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 343a6a55baa9cef41a9195538e734438 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/Facade/UIManager.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f2c07adc77a98584d8f312de15f49aca 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/FactoryMethod/Beggar.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b09749c134cf2bf468dd5d6fafbd48e8 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/FactoryMethod/Client.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e540a763ad6638d45b908e937535047d 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/FactoryMethod/Farmer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 02568286b325fbb4ab0b8fa883b5fc95 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/FactoryMethod/INPC.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6a17760c98defd34daa2ad188cab5c3b 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/ObjectPool/Client.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d9fa1afecf0266340a1e75ca37be8fea 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/ObjectPool/Runner.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0c357b5d18ef5b94792aa9e972c3464d 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/ObjectPool/Walker.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4b91902cb97bd714a9a911832977c62a 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/Observer/Notifier.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c925e15e035457041a19acd28b4ef598 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/Prototype/Client.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e5c0a6f244c8bfe46b639b40e2bade49 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/Prototype/Sniper.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b4788f09c3bcb524aa03c9a3413ca1a8 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/Prototype/iCopyable.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7f96c77a733e78a4cba184fba168227c 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/Singleton/Client.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 94927e02390249e47af189fd7c2d1d37 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/Singleton/Singleton.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a3517dc7b681f3b46b778498f0b76c89 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/State/AlertShipState.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: af7036f0010115344ad5f0e96d7f935f 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/State/IShipState.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 65d797da6b50aef4f90684cb0966adec 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/Strategy/Missile.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 524dd8741babe7f4486b3db8a6a4006b 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/Strategy/SeekWithGPS.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9f8a9ab9b54fc7647b8d1099c351b67a 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/Strategy/SideWinder.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 89957d3590cceba429c19515a7b01c34 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/Strategy/Tomahawk.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b578fd6aebd23cc409801fdc7e6403bd 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/Strategy/Torpedo.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d5d9f5b33e63f0c43a8522152d2a8b56 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/Visitor/IRobotPart.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 057147cb11d2c3a449caaed65e4b395b 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/AbstractFactory/Beggar.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ed261e27313e3db4eb45c8bed5effa65 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/AbstractFactory/Client.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 86faa4b4675206144bf027f862465ded 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/AbstractFactory/Farmer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: db2e2296ab3bce040a3b9a5b406810a7 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/AbstractFactory/HumanType.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 74418ef1ce2ccfc4e95b1094b2808279 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/AbstractFactory/IAnimal.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d58c9b2c93b47454f9e5f060a53951f8 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/AbstractFactory/IHuman.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dee77370b2347d244857b5207b365109 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/AbstractFactory/Shopowner.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 674d7e0edfc29df45855358513656cd4 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/Adapter/Object/Client.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 84d8fe3ab4f7ea849ae5723556ef87fb 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/Command/KillSwitchCommand.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ef510b25101758440966114e598205c0 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/Command/RadioReceiver.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a7fd4015f89213643beddcbbf186b6f2 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/Command/TurnOffCommand.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: db000a7976a60794090d65fd4da20442 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/Command/TurnOnCommand.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: afbb2d2859090ba4d8b2da788088ee8c 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/Decorator/RifleDecorator.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 138732c5a0f94984eb826a7de30aaab8 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/Decorator/WithStabilizer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 60fcf4a20875abd46980057f04e02c69 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/DependencyInjection/Bike.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dcb9fcad6afae2c4cb3a5c912abdc0ee 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/EventBus/EventPublisher.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 912989d46316d7d4fbdde0d1e2e1c2b5 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/FactoryMethod/NPCFactory.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2b73febe38602094a908dce1a54d955d 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/FactoryMethod/NPCSpawner.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: db07e810bf99e82458d9a17fd517d7fc 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/FactoryMethod/NPCType.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9f81a949e1f8c5c4c81e7720bc443c8e 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/FactoryMethod/Shopowner.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 387a7d1e22cf74343910c74c5653f163 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/ObjectPool/ObjectPool.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 69a5e49508fa6b74c857ae322bfc93dc 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/Observer/WarningLight.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 020f5d43d8e9c5e4184abf8a6fe070e2 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/Prototype/EnemySpawner.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4fa818d64f03fd24ab68340bdfb49e4a 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/ServiceLocator/Client.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d08a2ede4adf7f04abde3c8901f84abb 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/Singleton/GameManager.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8d8c4463ca0eef14b949da843be3f392 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/SpatialPartition/Client.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4fd5208a8ff2987409b05f26280c24ed 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/SpatialPartition/Grid.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5c8d1cdd0effe654fa534fbb7643e515 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/SpatialPartition/IUnit.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4226f3dec6408a14087c6aa260ffef7a 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/SpatialPartition/Predator.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8726b406cbebb7d46ade2ae94794b0ab 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/SpatialPartition/Prey.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c731beef237cb66408d5e54e392fcd3d 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/State/DisabledShipState.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dcc329d3d45f8fd4eb6b89f61e6eed43 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/State/NormalShipState.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 40e9d5a455ba3534199fbd55518e3d60 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/Strategy/ISeekBehaviour.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 43fd8a5f26bdc11489cee0e8d6b3f138 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/Strategy/SeekWithHeat.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7faf361ce1d56064a84b18eebbc9cfe1 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/Strategy/SeekWithSonar.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 69e6b8a7d4bc278419f6993f77bdbe25 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/Visitor/IRobotPartVisitor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9e51a94803843bc4b8594826de4240a7 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/Visitor/MechanicalArm.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 78b0f1ddc1cbf4c45ab3c09823131455 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/Visitor/ThermalImager.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 508a55b632a53da47aa61538a07385ee 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/AbstractFactory/AnimalFactory.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 47ed43a6f3244d84abf2c71da7099bd4 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/AbstractFactory/AnimalType.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0e9050ff522f25f48bba21fee64ad3fc 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/AbstractFactory/FactoryType.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 923615194c9f40d46a4cb28c2d27af32 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/AbstractFactory/HumanFactory.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e8d8d8a1f6698314d989960b71a9c328 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/AbstractFactory/NPCSpawner.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7da726fc9d3266a4093a6418feacfce2 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/Adapter/Class/IOnlinePlayer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a65301a2d1fa4cd4bba906455c5ac866 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/Adapter/Class/OnlinePlayer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b5f7a457411163c429fcfbd2004bcd24 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/Adapter/Object/OnlinePlayer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ab172e4424f5cbf45bf1e56765e9db3a 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/Command/RemoteControlDevice.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7bdf37043efbb494a84ebe2ff6d82efa 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/Command/TelevisionReceiver.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e15e0f5ca410b3a4ea4ee3d3bd89cc1c 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/DependencyInjection/Client.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 672202caf73509b4db1cdef0d2a935a1 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/DependencyInjection/IDriver.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f6357dca178f3dc4cb1a3a099fe81882 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/DependencyInjection/IEngine.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3855f5e094e4f5a40a4f1c173ccfb4d2 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/DependencyInjection/JetEngine.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4ea54422dba99614188ec855c8b996ca 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/ServiceLocator/ServiceLocator.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 16829f4d59d5c1343b1c7efaf52e9a44 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/Singleton/InventoryManager.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3a7d25b9864d7ce499767d235362bc46 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/AbstractFactory/AbstractFactory.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0fd5387066f03964d9ca520a20cc58ab 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/AbstractFactory/FactoryProducer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fe8e37e514089e44caebcaa898d5ceaa 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/Command/RadioReceiver.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | class RadioReceiver : RemoteControlDevice 4 | { 5 | public override void TurnOn() 6 | { 7 | Debug.Log("Radio is turned on."); 8 | } 9 | 10 | public override void TurnOff() 11 | { 12 | Debug.Log("Radio is turned off."); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Assets/Patterns/Command/TelevisionReceiver.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | class TelevisionReceiver : RemoteControlDevice 4 | { 5 | public override void TurnOn() 6 | { 7 | Debug.Log("TV turned on."); 8 | } 9 | 10 | public override void TurnOff() 11 | { 12 | Debug.Log("TV turned off."); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Assets/Patterns/DependencyInjection/AndroidDriver.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c2ce490a430c38c4f9dfd7219cd4941e 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/DependencyInjection/HumanDriver.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8dbb1c45e61d50c4f878442b4e6d7799 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/DependencyInjection/NitroEngine.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 937af933e6c7dad4b81cf0125df37a83 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/ServiceLocator/CurrencyConverter.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 16b9f17e8848fcb4c8196d892e9f12ca 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/ServiceLocator/LighingCoordiantor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fdd046427d798ad44b078031a0d8a15f 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/ServiceLocator/LobbyCoordinator.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3eabee6de1972a545bcde4fedf98a4d1 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/Visitor/RobotPartActivateVisitor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 16c0f9254db4aab44af21ff9b3c8ce85 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/Visitor/RobotPartShutdownVisitor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: abab43c27554013498f418188ee5ba60 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1045 &1 4 | EditorBuildSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Scenes: 8 | - enabled: 1 9 | path: Assets/Scenes/SampleScene.unity 10 | guid: 99c9720ab356a0642a771bea13969a05 11 | m_configObjects: {} 12 | -------------------------------------------------------------------------------- /Assets/Patterns/Adapter/Class/OnlinePlayerClassAdapter.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8f2c12978386c9843b1e3c6d50e4aa0b 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/Adapter/Object/OnlinePlayerObjectAdapter.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e722eeeb1fc717a49976db21697aecfe 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Patterns/Decorator/WithStabilizer.cs: -------------------------------------------------------------------------------- 1 | public class WithStabilizer : RifleDecorator 2 | { 3 | private float m_StabilizerAccurancy = 10.0f; 4 | 5 | public WithStabilizer(IRifle rifle) : base(rifle) {} 6 | 7 | public override float GetAccuracy() 8 | { 9 | return base.GetAccuracy() + m_StabilizerAccurancy; 10 | } 11 | } -------------------------------------------------------------------------------- /Assets/Patterns/EventBus/EventList.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class EventList : MonoBehaviour { 6 | 7 | // Use this for initialization 8 | void Start () { 9 | 10 | } 11 | 12 | // Update is called once per frame 13 | void Update () { 14 | 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Assets/Patterns/SpatialPartition/Prey.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | public class Prey : MonoBehaviour, IUnit 4 | { 5 | private int m_Square; 6 | 7 | public void AddToGrid(int square) 8 | { 9 | m_Square = square; 10 | } 11 | 12 | public int GetGridPosition() 13 | { 14 | return m_Square; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /ProjectSettings/VFXManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!937362698 &1 4 | VFXManager: 5 | m_ObjectHideFlags: 0 6 | m_IndirectShader: {fileID: 0} 7 | m_CopyBufferShader: {fileID: 0} 8 | m_SortShader: {fileID: 0} 9 | m_RenderPipeSettingsPath: 10 | m_FixedTimeStep: 0.016666668 11 | m_MaxDeltaTime: 0.05 12 | -------------------------------------------------------------------------------- /Assets/Patterns/SpatialPartition/Predator.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | public class Predator : MonoBehaviour, IUnit 4 | { 5 | private int m_Square; 6 | 7 | public void AddToGrid(int square) 8 | { 9 | m_Square = square; 10 | } 11 | 12 | public int GetGridPosition() 13 | { 14 | return m_Square; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Assets/Patterns/DependencyInjection/NitroEngine.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | public class NitroEngine : IEngine 4 | { 5 | public void StartEngine() 6 | { 7 | OpenNitroValve(); 8 | Debug.Log("Engine started"); 9 | } 10 | 11 | private void OpenNitroValve() 12 | { 13 | Debug.Log("The nitro valve is open"); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Assets/Patterns/Adapter/Object/OnlinePlayerObjectAdapter.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using Pattern.ObjectAdapter; 3 | 4 | public class OnlinePlayerObjectAdapter : ScriptableObject 5 | { 6 | public string GetFullName(OnlinePlayer onlinePlayer, int userId) 7 | { 8 | return onlinePlayer.GetFirstName(userId) + " " + onlinePlayer.GetLastName(userId); 9 | } 10 | } -------------------------------------------------------------------------------- /Assets/Patterns/Decorator/RifleDecorator.cs: -------------------------------------------------------------------------------- 1 | abstract public class RifleDecorator : IRifle 2 | { 3 | protected IRifle m_DecoaratedRifle; 4 | 5 | public RifleDecorator(IRifle rifle) 6 | { 7 | m_DecoaratedRifle = rifle; 8 | } 9 | 10 | public virtual float GetAccuracy() 11 | { 12 | return m_DecoaratedRifle.GetAccuracy(); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Assets/Patterns/DependencyInjection/JetEngine.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | public class JetEngine : IEngine 4 | { 5 | public void StartEngine() 6 | { 7 | ActivateJetStream(); 8 | Debug.Log("Engine started"); 9 | } 10 | 11 | private void ActivateJetStream() 12 | { 13 | Debug.Log("The jet stream is activated"); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Assets/Patterns/Strategy/Missile.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | abstract public class Missile : ScriptableObject 4 | { 5 | protected ISeekBehaviour seekBehavior; 6 | 7 | public void ApplySeek() 8 | { 9 | seekBehavior.Seek(); 10 | } 11 | 12 | public void SetSeekBehavior(ISeekBehaviour seekType) 13 | { 14 | seekBehavior = seekType; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Assets/Patterns/Observer/Client.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Pattern.Observer 4 | { 5 | public class Client : MonoBehaviour 6 | { 7 | void OnGUI() 8 | { 9 | GUI.color = Color.black; 10 | GUI.Label(new Rect(10, 10, 500, 20), "Look at the console window to watch the countdown and the events getting triggered."); 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Assets/Patterns/Adapter/Class/OnlinePlayerClassAdapter.cs: -------------------------------------------------------------------------------- 1 | using Pattern.ClassAdapter; 2 | 3 | public class OnlinePlayerClassAdapter : OnlinePlayer, iOnlinePlayer 4 | { 5 | public string GetFullNameLastFirst(int userId) 6 | { 7 | return GetFullName(userId); 8 | } 9 | 10 | public string GetFullNameFirstLast(int userId) 11 | { 12 | return GetFirstName(userId) + " " + GetLastName(userId); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Assets/Patterns/Observer/Notifier.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | public class Notifier : MonoBehaviour 4 | { 5 | void OnEnable() 6 | { 7 | Timer.OnTimerEnded += ShowGameOverPopUp; 8 | } 9 | 10 | void OnDisable() 11 | { 12 | Timer.OnTimerEnded -= ShowGameOverPopUp; 13 | } 14 | 15 | void ShowGameOverPopUp() 16 | { 17 | Debug.Log("[NOTIFIER] : Show game over pop up!"); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Assets/Patterns/Observer/WarningLight.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | public class WarningLight : MonoBehaviour 4 | { 5 | void OnEnable() 6 | { 7 | Timer.OnHalfTime += BlinkLight; 8 | } 9 | 10 | void OnDisable() 11 | { 12 | Timer.OnHalfTime -= BlinkLight; 13 | } 14 | 15 | void BlinkLight() 16 | { 17 | Debug.Log("[WARNING LIGHT] : It's half-time, blinking the warning light!"); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!11 &1 4 | AudioManager: 5 | m_ObjectHideFlags: 0 6 | m_Volume: 1 7 | Rolloff Scale: 1 8 | Doppler Factor: 1 9 | Default Speaker Mode: 2 10 | m_SampleRate: 0 11 | m_DSPBufferSize: 1024 12 | m_VirtualVoiceCount: 512 13 | m_RealVoiceCount: 32 14 | m_SpatializerPlugin: 15 | m_AmbisonicDecoderPlugin: 16 | m_DisableAudio: 0 17 | m_VirtualizeEffects: 1 18 | -------------------------------------------------------------------------------- /Assets/Patterns/Singleton/InventoryManager.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | public class InventoryManager : Singleton 4 | { 5 | public void AddItem(int itemID) 6 | { 7 | // Add item into inventory. 8 | Debug.Log("Adding item to the inventory."); 9 | } 10 | 11 | public void RemoveItem(int itemID) 12 | { 13 | // Remove item from inventory. 14 | Debug.Log("Removing item to the inventory."); 15 | } 16 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # ---------------[ Unity generated ]------------------ # 2 | Temp/ 3 | Obj/ 4 | UnityGenerated/ 5 | Library/ 6 | 7 | # ----[ Visual Studio / MonoDevelop generated ]------- # 8 | .vs/ 9 | 10 | ExportedObj/ 11 | *.svd 12 | *.userprefs 13 | *.csproj 14 | *.pidb 15 | *.suo 16 | *.sln 17 | *.user 18 | *.unityproj 19 | *.booproj 20 | 21 | # -------------[ OS generated ]------------------------ # 22 | .DS_Store 23 | .DS_Store? 24 | ._* 25 | .Spotlight-V100 26 | .Trashes 27 | Icon? 28 | ehthumbs.db 29 | Thumbs.db -------------------------------------------------------------------------------- /Assets/Patterns/Command/KillSwitchCommand.cs: -------------------------------------------------------------------------------- 1 | class KillSwitchCommand : Command 2 | { 3 | private RemoteControlDevice[] m_Devices; 4 | private static RemoteControlDevice receiver; 5 | 6 | public KillSwitchCommand(RemoteControlDevice[] devices) : base(receiver) 7 | { 8 | m_Devices = devices; 9 | } 10 | 11 | public override void Execute() 12 | { 13 | foreach (RemoteControlDevice device in m_Devices) 14 | { 15 | device.TurnOff(); 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /Assets/Patterns/Visitor/Robot.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | public class Robot : IRobotPart 4 | { 5 | private IRobotPart[] robotParts; 6 | 7 | public Robot() 8 | { 9 | robotParts = new IRobotPart[] { new MechanicalArm(), new ThermalImager(), new Battery() }; 10 | } 11 | 12 | public void Accept(IRobotPartVisitor robotPartVisitor) 13 | { 14 | for (int i = 0; i < robotParts.Length; i++) 15 | { 16 | robotParts[i].Accept(robotPartVisitor); 17 | } 18 | robotPartVisitor.Visit(this); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!78 &1 4 | TagManager: 5 | serializedVersion: 2 6 | tags: [] 7 | layers: 8 | - Default 9 | - TransparentFX 10 | - Ignore Raycast 11 | - 12 | - Water 13 | - UI 14 | - 15 | - 16 | - PostProcessing 17 | - 18 | - 19 | - 20 | - 21 | - 22 | - 23 | - 24 | - 25 | - 26 | - 27 | - 28 | - 29 | - 30 | - 31 | - 32 | - 33 | - 34 | - 35 | - 36 | - 37 | - 38 | - 39 | - 40 | m_SortingLayers: 41 | - name: Default 42 | uniqueID: 0 43 | locked: 0 44 | -------------------------------------------------------------------------------- /Assets/Patterns/EventBus/Cannon.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | public class Cannon : MonoBehaviour 4 | { 5 | private bool m_IsQuitting; 6 | 7 | void OnEnable() 8 | { 9 | EventBus.StartListening("Shoot", Shoot); 10 | } 11 | 12 | void OnApplicationQuit() 13 | { 14 | m_IsQuitting = true; 15 | } 16 | 17 | void OnDisable() 18 | { 19 | if (m_IsQuitting == false) 20 | { 21 | EventBus.StopListening("Shoot", Shoot); 22 | } 23 | } 24 | 25 | void Shoot() 26 | { 27 | Debug.Log("Received a shoot event : shooting cannon!"); 28 | } 29 | } -------------------------------------------------------------------------------- /Assets/Patterns/Observer/Buzzer.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | public class Buzzer : MonoBehaviour 4 | { 5 | void OnEnable() 6 | { 7 | Timer.OnTimerStarted += PlayStartBuzzer; 8 | Timer.OnTimerEnded += PlayEndBuzzer; 9 | } 10 | 11 | void OnDisable() 12 | { 13 | Timer.OnTimerStarted -= PlayStartBuzzer; 14 | Timer.OnTimerEnded -= PlayEndBuzzer; 15 | } 16 | 17 | void PlayStartBuzzer() 18 | { 19 | Debug.Log("[BUZZER] : Play start buzzer!"); 20 | } 21 | 22 | void PlayEndBuzzer() 23 | { 24 | Debug.Log("[BUZZER] : Play end buzzer!"); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Assets/Patterns/Visitor/RobotPartActivateVisitor.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | public class RobotPartActivateVisitor : IRobotPartVisitor 4 | { 5 | public void Visit(Robot robot) 6 | { 7 | Debug.Log("Robot waking up."); 8 | } 9 | 10 | public void Visit(Battery battery) 11 | { 12 | Debug.Log("Battery is charged up."); 13 | } 14 | 15 | public void Visit(MechanicalArm mechanicalArm) 16 | { 17 | Debug.Log("The mechanical arm is actiaved."); 18 | } 19 | 20 | public void Visit(ThermalImager thermalImager) 21 | { 22 | Debug.Log("The thermal imager is turned on."); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Assets/Patterns/Visitor/RobotPartShutdownVisitor.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | public class RobotPartShutdownVisitor : IRobotPartVisitor 4 | { 5 | public void Visit(Robot robot) 6 | { 7 | Debug.Log("Robot is going back to sleep."); 8 | } 9 | 10 | public void Visit(Battery battery) 11 | { 12 | Debug.Log("Battery is charging down."); 13 | } 14 | 15 | public void Visit(MechanicalArm mechanicalArm) 16 | { 17 | Debug.Log("The mechanical arm is folding back to it's default position."); 18 | } 19 | 20 | public void Visit(ThermalImager thermalImager) 21 | { 22 | Debug.Log("The thermal imager is turned off."); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Assets/Patterns/FactoryMethod/Client.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Pattern.FactoryMethod 4 | { 5 | public class Client : MonoBehaviour 6 | { 7 | public NPCSpawner m_SpawnerNPC; 8 | 9 | public void Update() 10 | { 11 | if (Input.GetKeyDown(KeyCode.S)) 12 | { 13 | m_SpawnerNPC.SpawnVillagers(); 14 | } 15 | } 16 | 17 | void OnGUI() 18 | { 19 | GUI.color = Color.black; 20 | GUI.Label(new Rect(10, 10, 200, 20), "Press S to spawn NPCs."); 21 | GUI.Label(new Rect(10, 30, 300, 20), "Look in the Debug Console to see them speak."); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!159 &1 4 | EditorSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 7 7 | m_ExternalVersionControlSupport: Visible Meta Files 8 | m_SerializationMode: 2 9 | m_LineEndingsForNewScripts: 2 10 | m_DefaultBehaviorMode: 0 11 | m_SpritePackerMode: 0 12 | m_SpritePackerPaddingPower: 1 13 | m_EtcTextureCompressorBehavior: 1 14 | m_EtcTextureFastCompressor: 1 15 | m_EtcTextureNormalCompressor: 2 16 | m_EtcTextureBestCompressor: 4 17 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd 18 | m_ProjectGenerationRootNamespace: 19 | m_UserGeneratedProjectSuffix: 20 | m_CollabEditorSettings: 21 | inProgressEnabled: 1 22 | -------------------------------------------------------------------------------- /Assets/Patterns/EventBus/EventPublisher.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | public class EventPublisher : MonoBehaviour 4 | { 5 | void Update() 6 | { 7 | if (Input.GetKeyDown("s")) 8 | { 9 | EventBus.TriggerEvent("Shoot"); 10 | } 11 | 12 | if (Input.GetKeyDown("l")) 13 | { 14 | EventBus.TriggerEvent("Launch"); 15 | } 16 | } 17 | 18 | void OnGUI() 19 | { 20 | GUI.color = Color.black; 21 | GUI.Label(new Rect(10, 10, 500, 20), "Press S to shoot."); 22 | GUI.Label(new Rect(10, 30, 500, 20), "Press L to launch."); 23 | GUI.Label(new Rect(10, 50, 500, 20), "Look in the Debug Console to view the results of the event calls."); 24 | } 25 | } -------------------------------------------------------------------------------- /Assets/Patterns/AbstractFactory/AnimalFactory.cs: -------------------------------------------------------------------------------- 1 | namespace Pattern.AbstractFactory 2 | { 3 | public class AnimalFactory : AbstractFactory 4 | { 5 | public override IAnimal GetAnimal(AnimalType animalType) 6 | { 7 | switch (animalType) 8 | { 9 | case AnimalType.Cat: 10 | IAnimal cat = new Cat(); 11 | return cat; 12 | case AnimalType.Dog: 13 | IAnimal dog = new Dog(); 14 | return dog; 15 | } 16 | 17 | return null; 18 | } 19 | 20 | public override IHuman GetHuman(HumanType humanType) 21 | { 22 | return null; 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Assets/Patterns/AbstractFactory/FactoryProducer.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Pattern.AbstractFactory 4 | { 5 | public class FactoryProducer : MonoBehaviour 6 | { 7 | public static AbstractFactory GetFactory(FactoryType factoryType) 8 | { 9 | switch (factoryType) 10 | { 11 | case FactoryType.Human: 12 | AbstractFactory humanFactory = new HumanFactory(); 13 | return humanFactory; 14 | case FactoryType.Animal: 15 | AbstractFactory animalFactory = new AnimalFactory(); 16 | return animalFactory; 17 | } 18 | 19 | return null; 20 | 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Assets/Patterns/FactoryMethod/NPCFactory.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Pattern.FactoryMethod 4 | { 5 | public class NPCFactory : MonoBehaviour 6 | { 7 | public INPC GetNPC(NPCType type) 8 | { 9 | switch (type) 10 | { 11 | case NPCType.Beggar: 12 | INPC beggar = new Beggar(); 13 | return beggar; 14 | case NPCType.Farmer: 15 | INPC farmer = new Farmer(); 16 | return farmer; 17 | case NPCType.Shopowner: 18 | INPC shopowner = new Shopowner(); 19 | return shopowner; 20 | } 21 | return null; 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Assets/Patterns/Adapter/Class/OnlinePlayer.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Pattern.ClassAdapter 4 | { 5 | public class OnlinePlayer : ScriptableObject 6 | { 7 | public string GetFirstName(int id) 8 | { 9 | // Lookup online database. 10 | return "John"; // Retun a placeholder name. 11 | } 12 | 13 | public string GetLastName(int id) 14 | { 15 | // Lookup online database. 16 | return "Doe"; // Return a placeholder last name. 17 | } 18 | 19 | public string GetFullName(int id) 20 | { 21 | // Lookup online database and pull the full name in this sequence [Last Name & First Name] 22 | return "Doe Jonn"; 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Assets/Patterns/Adapter/Object/OnlinePlayer.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Pattern.ObjectAdapter 4 | { 5 | public sealed class OnlinePlayer : ScriptableObject 6 | { 7 | public string GetFirstName(int id) 8 | { 9 | // Lookup online database. 10 | return "John"; // Retun a placeholder name. 11 | } 12 | 13 | public string GetLastName(int id) 14 | { 15 | // Lookup online database. 16 | return "Doe"; // Return a placeholder last name. 17 | } 18 | 19 | public string GetFullName(int id) 20 | { 21 | // Lookup online database and pull the full name in this sequence [Last Name & First Name]. 22 | return "Doe Jonn"; 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Assets/Patterns/EventBus/Rocket.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | public class Rocket : MonoBehaviour 4 | { 5 | private bool m_IsQuitting; 6 | private bool m_IsLaunched = false; 7 | 8 | void OnEnable() 9 | { 10 | EventBus.StartListening("Launch", Launch); 11 | } 12 | 13 | void OnApplicationQuit() 14 | { 15 | m_IsQuitting = true; 16 | } 17 | 18 | void OnDisable() 19 | { 20 | if (m_IsQuitting == false) 21 | { 22 | EventBus.StopListening("Launch", Launch); 23 | } 24 | } 25 | 26 | void Launch() 27 | { 28 | if (m_IsLaunched == false) 29 | { 30 | m_IsLaunched = true; 31 | Debug.Log("Received a launch event : rocket launching!"); 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /Logs/Packages-Update.log: -------------------------------------------------------------------------------- 1 | 2 | === Mon Dec 31 13:33:24 2018 3 | 4 | Packages were changed. 5 | Update Mode: updateDependencies 6 | 7 | The following packages were added: 8 | com.unity.collab-proxy@1.2.15 9 | The following packages were updated: 10 | com.unity.ads from version 2.0.8 to 2.3.1 11 | com.unity.analytics from version 2.0.16 to 3.2.2 12 | com.unity.package-manager-ui from version 1.9.11 to 2.0.3 13 | com.unity.textmeshpro from version 1.2.4 to 1.3.0 14 | 15 | === Sun Feb 24 22:11:41 2019 16 | 17 | Packages were changed. 18 | Update Mode: updateDependencies 19 | 20 | The following packages were added: 21 | com.unity.timeline@1.0.0 22 | com.unity.xr.legacyinputhelpers@1.0.0 23 | The following packages were updated: 24 | com.unity.analytics from version 3.2.2 to 3.3.2 25 | com.unity.package-manager-ui from version 2.0.3 to 2.1.1 26 | -------------------------------------------------------------------------------- /Assets/Patterns/Facade/Client.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Pattern.Facade 4 | { 5 | public class Client : MonoBehaviour 6 | { 7 | private Player m_Player; 8 | 9 | void Start() 10 | { 11 | m_Player = new Player(); 12 | } 13 | 14 | void Update() 15 | { 16 | if (Input.GetKeyDown(KeyCode.S)) 17 | { 18 | // Save the current player instance. 19 | SaveManager.Instance.SaveGame(m_Player); 20 | } 21 | } 22 | 23 | void OnGUI() 24 | { 25 | GUI.color = Color.black; 26 | GUI.Label(new Rect(10, 10, 300, 30), "Press S to save the game."); 27 | GUI.Label(new Rect(10, 30, 500, 30), "Output of the commands are displayed in the console."); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Assets/Patterns/State/Ship.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | public class Ship : MonoBehaviour 4 | { 5 | private IShipState m_CurrentState; 6 | 7 | void Awake () 8 | { 9 | m_CurrentState = new NormalShipState(); 10 | m_CurrentState.Execute(this); 11 | } 12 | 13 | public void Normalize() 14 | { 15 | m_CurrentState = new NormalShipState(); 16 | m_CurrentState.Execute(this); 17 | } 18 | 19 | public void TriggerRedAlert() 20 | { 21 | m_CurrentState = new AlertShipState(); 22 | m_CurrentState.Execute(this); 23 | } 24 | 25 | public void DisableShip() 26 | { 27 | m_CurrentState = new DisabledShipState(); 28 | m_CurrentState.Execute(this); 29 | } 30 | 31 | public void LogStatus(string status) 32 | { 33 | Debug.Log(status); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /Assets/Patterns/DependencyInjection/Bike.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | public class Bike : MonoBehaviour 4 | { 5 | private IEngine m_Engine; 6 | private IDriver m_Driver; 7 | 8 | public void SetEngine(IEngine engine) 9 | { 10 | m_Engine = engine; 11 | } 12 | 13 | public void SetDriver(IDriver driver) 14 | { 15 | m_Driver = driver; 16 | } 17 | 18 | public void StartEngine() 19 | { 20 | // Starting the engine 21 | m_Engine.StartEngine(); 22 | 23 | // Giving control of the bike to a driver (AI or player) 24 | m_Driver.Control(this); 25 | } 26 | 27 | public void TurnLeft() 28 | { 29 | Debug.Log("The bike is turning left"); 30 | } 31 | 32 | public void TurnRight() 33 | { 34 | Debug.Log("The bike is turning right"); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /Assets/Patterns/AbstractFactory/HumanFactory.cs: -------------------------------------------------------------------------------- 1 | namespace Pattern.AbstractFactory 2 | { 3 | public class HumanFactory : AbstractFactory 4 | { 5 | public override IHuman GetHuman(HumanType humanType) 6 | { 7 | switch (humanType) 8 | { 9 | case HumanType.Beggar: 10 | IHuman beggar = new Beggar(); 11 | return beggar; 12 | case HumanType.Farmer: 13 | IHuman farmer = new Farmer(); 14 | return farmer; 15 | case HumanType.Shopowner: 16 | IHuman shopowner = new Shopowner(); 17 | return shopowner; 18 | } 19 | 20 | return null; 21 | } 22 | 23 | public override IAnimal GetAnimal(AnimalType animalType) 24 | { 25 | return null; 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Assets/Patterns/FactoryMethod/NPCSpawner.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Pattern.FactoryMethod 4 | { 5 | public class NPCSpawner : MonoBehaviour 6 | { 7 | public NPCFactory m_Factory; 8 | 9 | private INPC m_Farmer; 10 | private INPC m_Beggar; 11 | private INPC m_Shopowner; 12 | 13 | public void SpawnVillagers() 14 | { 15 | /** 16 | We don't want to specify the class to instiate for each type of villager. 17 | Instead, we ask the factory to "manufacture" it for us. 18 | **/ 19 | 20 | m_Beggar = m_Factory.GetNPC(NPCType.Beggar); 21 | m_Farmer = m_Factory.GetNPC(NPCType.Farmer); 22 | m_Shopowner = m_Factory.GetNPC(NPCType.Shopowner); 23 | 24 | m_Beggar.Speak(); 25 | m_Farmer.Speak(); 26 | m_Shopowner.Speak(); 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Assets/Patterns/AbstractFactory/Client.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Pattern.AbstractFactory 4 | { 5 | public class Client : MonoBehaviour 6 | { 7 | public NPCSpawner m_SpawnerNPC; 8 | 9 | public void Update() 10 | { 11 | if (Input.GetKeyDown(KeyCode.U)) 12 | { 13 | m_SpawnerNPC.SpawnHumans(); 14 | } 15 | 16 | if (Input.GetKeyDown(KeyCode.A)) 17 | { 18 | m_SpawnerNPC.SpawnAnimals(); 19 | } 20 | } 21 | 22 | void OnGUI() 23 | { 24 | GUI.color = Color.black; 25 | GUI.Label(new Rect(10, 10, 200, 20), "Press U to spawn humans."); 26 | GUI.Label(new Rect(10, 30, 200, 20), "Press A to spawn animals."); 27 | GUI.Label(new Rect(10, 50, 300, 20), "Look in the Debug Console to see them speak."); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /ProjectSettings/PresetManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1386491679 &1 4 | PresetManager: 5 | m_ObjectHideFlags: 0 6 | m_DefaultList: 7 | - type: 8 | m_NativeTypeID: 108 9 | m_ManagedTypePPtr: {fileID: 0} 10 | m_ManagedTypeFallback: 11 | defaultPresets: 12 | - m_Preset: {fileID: 2655988077585873504, guid: c1cf8506f04ef2c4a88b64b6c4202eea, 13 | type: 2} 14 | - type: 15 | m_NativeTypeID: 1020 16 | m_ManagedTypePPtr: {fileID: 0} 17 | m_ManagedTypeFallback: 18 | defaultPresets: 19 | - m_Preset: {fileID: 2655988077585873504, guid: 0cd792cc87e492d43b4e95b205fc5cc6, 20 | type: 2} 21 | - type: 22 | m_NativeTypeID: 1006 23 | m_ManagedTypePPtr: {fileID: 0} 24 | m_ManagedTypeFallback: 25 | defaultPresets: 26 | - m_Preset: {fileID: 2655988077585873504, guid: 7a99f8aa944efe94cb9bd74562b7d5f9, 27 | type: 2} 28 | -------------------------------------------------------------------------------- /Assets/Patterns/Adapter/Class/Client.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Pattern.ClassAdapter 4 | { 5 | public class Client : MonoBehaviour 6 | { 7 | private iOnlinePlayer m_OnlinePlayer; 8 | 9 | void Update() 10 | { 11 | if (Input.GetKeyDown(KeyCode.U)) 12 | { 13 | m_OnlinePlayer = ScriptableObject.CreateInstance(); 14 | 15 | string FirstName = m_OnlinePlayer.GetFirstName(79); 16 | string LastName = m_OnlinePlayer.GetLastName(79); 17 | 18 | string FullNameLastFirst = m_OnlinePlayer.GetFullNameLastFirst(79); 19 | string FullNameFirstLast= m_OnlinePlayer.GetFullNameFirstLast(79); 20 | 21 | Debug.Log(FirstName); 22 | Debug.Log(LastName); 23 | Debug.Log(FullNameLastFirst); 24 | Debug.Log(FullNameFirstLast); 25 | } 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /Assets/Patterns/ServiceLocator/ServiceLocator.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | public class ServiceLocator : Singleton 5 | { 6 | private IDictionary m_Services; 7 | 8 | public override void Awake() 9 | { 10 | base.Awake(); 11 | FillRegistry(); 12 | } 13 | 14 | private void FillRegistry() 15 | { 16 | m_Services = new Dictionary(); 17 | 18 | m_Services.Add(typeof(LobbyCoordinator), new LobbyCoordinator()); 19 | m_Services.Add(typeof(CurrencyConverter), new CurrencyConverter()); 20 | m_Services.Add(typeof(LightingCoordinator), new LightingCoordinator()); 21 | } 22 | 23 | public T GetService() 24 | { 25 | try 26 | { 27 | return (T)m_Services[typeof(T)]; 28 | } 29 | catch 30 | { 31 | throw new ApplicationException("The requested service is not found."); 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Assets/Patterns/Visitor/Client.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Pattern.Visitor 4 | { 5 | public class Client : MonoBehaviour 6 | { 7 | void Update() 8 | { 9 | if (Input.GetKeyDown(KeyCode.O)) 10 | { 11 | IRobotPart robot = new Robot(); 12 | robot.Accept(new RobotPartActivateVisitor()); 13 | } 14 | 15 | if (Input.GetKeyDown(KeyCode.S)) 16 | { 17 | IRobotPart robot = new Robot(); 18 | robot.Accept(new RobotPartShutdownVisitor()); 19 | } 20 | } 21 | 22 | void OnGUI() 23 | { 24 | GUI.color = Color.black; 25 | GUI.Label(new Rect(10, 10, 500, 20), "Press O to wake up the robot."); 26 | GUI.Label(new Rect(10, 30, 500, 20), "Press S to shutdown the robot."); 27 | GUI.Label(new Rect(10, 50, 500, 20), "Look in the Debug Console to view the robot parts status."); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /ProjectSettings/UnityConnectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!310 &1 4 | UnityConnectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 1 7 | m_Enabled: 1 8 | m_TestMode: 0 9 | m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events 10 | m_EventUrl: https://cdp.cloud.unity3d.com/v1/events 11 | m_ConfigUrl: https://config.uca.cloud.unity3d.com 12 | m_TestInitMode: 0 13 | CrashReportingSettings: 14 | m_EventUrl: https://perf-events.cloud.unity3d.com 15 | m_Enabled: 0 16 | m_LogBufferSize: 10 17 | m_CaptureEditorExceptions: 1 18 | UnityPurchasingSettings: 19 | m_Enabled: 0 20 | m_TestMode: 0 21 | UnityAnalyticsSettings: 22 | m_Enabled: 1 23 | m_TestMode: 0 24 | m_InitializeOnStartup: 1 25 | UnityAdsSettings: 26 | m_Enabled: 0 27 | m_InitializeOnStartup: 1 28 | m_TestMode: 0 29 | m_IosGameId: 30 | m_AndroidGameId: 31 | m_GameIds: {} 32 | m_GameId: 33 | PerformanceReportingSettings: 34 | m_Enabled: 0 35 | -------------------------------------------------------------------------------- /Assets/Patterns/State/Client.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Pattern.State 4 | { 5 | public class Client : MonoBehaviour 6 | { 7 | public Ship ship; 8 | 9 | void Update() 10 | { 11 | if (Input.GetKeyDown("n")) 12 | { 13 | ship.Normalize(); 14 | } 15 | 16 | if (Input.GetKeyDown("a")) 17 | { 18 | ship.TriggerRedAlert(); 19 | } 20 | 21 | if (Input.GetKeyDown("d")) 22 | { 23 | ship.DisableShip(); 24 | } 25 | } 26 | 27 | void OnGUI() 28 | { 29 | GUI.color = Color.black; 30 | GUI.Label(new Rect(10, 50, 300, 30), "Press N to switch state of the ship to normal."); 31 | GUI.Label(new Rect(10, 30, 300, 30), "Press A to switch state of the ship to alerted."); 32 | GUI.Label(new Rect(10, 10, 300, 30), "Press D to switch state of the ship to disabled."); 33 | GUI.Label(new Rect(10, 90, 500, 30), "Output of the commands are displayed in the console."); 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /Assets/Patterns/Adapter/Object/Client.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Pattern.ObjectAdapter 4 | { 5 | public class Client : MonoBehaviour 6 | { 7 | private OnlinePlayer m_OnlinePlayer; 8 | private OnlinePlayerObjectAdapter m_OnlinePlayerAdapter; 9 | 10 | void Update() 11 | { 12 | if (Input.GetKeyDown(KeyCode.U)) 13 | { 14 | m_OnlinePlayer = ScriptableObject.CreateInstance(); 15 | m_OnlinePlayerAdapter = ScriptableObject.CreateInstance(); 16 | 17 | string FirstName = m_OnlinePlayer.GetFirstName(79); 18 | string LastName = m_OnlinePlayer.GetLastName(79); 19 | 20 | string FullNameLastFirst = m_OnlinePlayer.GetFullName(79); 21 | string FullNameFirstLast = m_OnlinePlayerAdapter.GetFullName(m_OnlinePlayer, 79); 22 | 23 | Debug.Log(FirstName); 24 | Debug.Log(LastName); 25 | Debug.Log(FullNameLastFirst); 26 | Debug.Log(FullNameFirstLast); 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 keagancarneiro 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Assets/Patterns/Singleton/Client.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Pattern.Singleton 4 | { 5 | public class Client : MonoBehaviour 6 | { 7 | void Update() 8 | { 9 | if (Input.GetKeyDown(KeyCode.I)) 10 | { 11 | GameManager.Instance.InitializeGame(); 12 | } 13 | 14 | if (Input.GetKeyDown(KeyCode.A)) 15 | { 16 | InventoryManager.Instance.AddItem(001); 17 | } 18 | 19 | if (Input.GetKeyDown(KeyCode.R)) 20 | { 21 | InventoryManager.Instance.RemoveItem(023); 22 | } 23 | } 24 | 25 | void OnGUI() 26 | { 27 | GUI.color = Color.black; 28 | GUI.Label(new Rect(10, 10, 300, 30), "Press I to initialize the game."); 29 | GUI.Label(new Rect(10, 30, 300, 30), "Press A to add an item to the inventory."); 30 | GUI.Label(new Rect(10, 50, 300, 30), "Press R to remove an item to the inventory."); 31 | GUI.Label(new Rect(10, 80, 500, 30), "Output of the commands are displayed in the console."); 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /Assets/Patterns/SpatialPartition/Grid.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using UnityEngine; 4 | 5 | public class Grid: MonoBehaviour 6 | { 7 | private int m_SquareSize; 8 | private int m_NumberOfSquares; 9 | 10 | public Grid(int squareSize, int numberOfSquares) 11 | { 12 | // The size can represent anything (meters, km) 13 | m_SquareSize = squareSize; 14 | 15 | // Squares permits to subdivide the grid granulary 16 | m_NumberOfSquares = numberOfSquares; 17 | } 18 | 19 | public void AddToRandomnPosition(IUnit unit) 20 | { 21 | unit.AddToGrid(UnityEngine.Random.Range(0, m_NumberOfSquares)); 22 | } 23 | 24 | public int FindClosest(IUnit referenceUnit, IUnit[] list) 25 | { 26 | if (list != null) 27 | { 28 | var points = list.Select(a => a.GetGridPosition()).ToList(); 29 | var nearest = points.OrderBy(x => Math.Abs(x - referenceUnit.GetGridPosition())).First(); 30 | return nearest; 31 | } 32 | else 33 | { 34 | throw new ArgumentException("Parameters cannot be null", "list"); 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!55 &1 4 | PhysicsManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 7 7 | m_Gravity: {x: 0, y: -9.81, z: 0} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_BounceThreshold: 2 10 | m_SleepThreshold: 0.005 11 | m_DefaultContactOffset: 0.01 12 | m_DefaultSolverIterations: 6 13 | m_DefaultSolverVelocityIterations: 1 14 | m_QueriesHitBackfaces: 0 15 | m_QueriesHitTriggers: 1 16 | m_EnableAdaptiveForce: 0 17 | m_ClothInterCollisionDistance: 0 18 | m_ClothInterCollisionStiffness: 0 19 | m_ContactsGeneration: 1 20 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 21 | m_AutoSimulation: 1 22 | m_AutoSyncTransforms: 1 23 | m_ClothInterCollisionSettingsToggle: 0 24 | m_ContactPairsMode: 0 25 | m_BroadphaseType: 0 26 | m_WorldBounds: 27 | m_Center: {x: 0, y: 0, z: 0} 28 | m_Extent: {x: 250, y: 250, z: 250} 29 | m_WorldSubdivisions: 8 30 | -------------------------------------------------------------------------------- /Assets/Patterns/AbstractFactory/NPCSpawner.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Pattern.AbstractFactory 4 | { 5 | public class NPCSpawner : MonoBehaviour 6 | { 7 | private IAnimal m_Cat; 8 | private IAnimal m_Dog; 9 | 10 | private IHuman m_Farmer; 11 | private IHuman m_Beggar; 12 | private IHuman m_Shopowner; 13 | 14 | private AbstractFactory factory; 15 | 16 | public void SpawnAnimals() 17 | { 18 | factory = FactoryProducer.GetFactory(FactoryType.Animal); 19 | 20 | m_Cat = factory.GetAnimal(AnimalType.Cat); 21 | m_Dog = factory.GetAnimal(AnimalType.Dog); 22 | 23 | m_Cat.Voice(); 24 | m_Dog.Voice(); 25 | } 26 | 27 | public void SpawnHumans() 28 | { 29 | factory = FactoryProducer.GetFactory(FactoryType.Human); 30 | 31 | m_Beggar = factory.GetHuman(HumanType.Beggar); 32 | m_Farmer = factory.GetHuman(HumanType.Farmer); 33 | m_Shopowner = factory.GetHuman(HumanType.Shopowner); 34 | 35 | m_Beggar.Speak(); 36 | m_Farmer.Speak(); 37 | m_Shopowner.Speak(); 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /Assets/Patterns/ServiceLocator/Client.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Pattern.ServiceLocator_ 4 | { 5 | public class Client : MonoBehaviour 6 | { 7 | void Update() 8 | { 9 | if (Input.GetKeyDown("o")) 10 | { 11 | ServiceLocator.Instance.GetService().TurnOffLights(); 12 | } 13 | 14 | if (Input.GetKeyDown("c")) 15 | { 16 | ServiceLocator.Instance.GetService().ConvertToUsDollar(10); 17 | } 18 | 19 | if (Input.GetKeyDown("l")) 20 | { 21 | ServiceLocator.Instance.GetService().AddPlayerToLobby(); 22 | } 23 | } 24 | 25 | void OnGUI() 26 | { 27 | GUI.color = Color.black; 28 | GUI.Label(new Rect(10, 10, 300, 30), "Press O to turn of the lights."); 29 | GUI.Label(new Rect(10, 30, 300, 30), "Press C to convert in-game currency."); 30 | GUI.Label(new Rect(10, 50, 300, 30), "Press L to add player to the lobby."); 31 | GUI.Label(new Rect(10, 90, 500, 30), "Output of the commands are displayed in the console."); 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /Assets/Patterns/Prototype/Client.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Pattern.Prototype 4 | { 5 | public class Client : MonoBehaviour 6 | { 7 | public Drone m_Drone; 8 | public Sniper m_Sniper; 9 | public EnemySpawner m_Spawner; 10 | 11 | private Enemy m_Spawn; 12 | private int m_IncrementorDrone = 0; 13 | private int m_IncrementorSniper = 0; 14 | 15 | public void Update() 16 | { 17 | if (Input.GetKeyDown(KeyCode.D)) 18 | { 19 | m_Spawn = m_Spawner.SpawnEnemy(m_Drone); 20 | 21 | m_Spawn.name = "Drone_Clone_" + ++m_IncrementorDrone; 22 | m_Spawn.transform.Translate(Vector3.forward * m_IncrementorDrone * 1.5f); 23 | 24 | } 25 | 26 | if (Input.GetKeyDown(KeyCode.S)) 27 | { 28 | m_Spawn = m_Spawner.SpawnEnemy(m_Sniper); 29 | 30 | m_Spawn.name = "Sniper_Clone_" + ++m_IncrementorSniper; 31 | m_Spawn.transform.Translate(Vector3.forward * m_IncrementorSniper * 1.5f); 32 | } 33 | } 34 | 35 | void OnGUI() 36 | { 37 | GUI.color = Color.black; 38 | GUI.Label(new Rect(10, 10, 200, 20), "Press D to spawn a drone."); 39 | GUI.Label(new Rect(10, 30, 200, 20), "Press S to spawn a sniper."); 40 | } 41 | } 42 | } -------------------------------------------------------------------------------- /Assets/Patterns/ObjectPool/Client.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Pattern.ObjectPool_ 4 | { 5 | public class Client : MonoBehaviour 6 | { 7 | void Update() 8 | { 9 | if (Input.GetKeyDown(KeyCode.G)) 10 | { 11 | GameObject walker = ObjectPool.Instance.PullObject("Walker"); 12 | walker.transform.Translate(Vector3.forward * Random.Range(-5.0f, 5.0f)); 13 | walker.transform.Translate(Vector3.right * Random.Range(-5.0f, 5.0f)); 14 | } 15 | 16 | if (Input.GetKeyDown(KeyCode.P)) 17 | { 18 | object[] objs = GameObject.FindObjectsOfType(typeof(GameObject)); 19 | 20 | foreach (object o in objs) 21 | { 22 | GameObject obj = (GameObject)o; 23 | 24 | if (obj.gameObject.GetComponent() != null) 25 | { 26 | ObjectPool.Instance.PoolObject(obj); 27 | } 28 | } 29 | } 30 | } 31 | 32 | void OnGUI() 33 | { 34 | GUI.color = Color.black; 35 | GUI.Label(new Rect(10, 10, 300, 30), "Press G to pull a Walker from the pool."); 36 | GUI.Label(new Rect(10, 30, 300, 30), "Press P to send the Walkers back into the pool."); 37 | } 38 | } 39 | } -------------------------------------------------------------------------------- /Assets/Patterns/Observer/Timer.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | 4 | public class Timer : MonoBehaviour 5 | { 6 | private float m_Duration = 10.0f; 7 | private float m_HalfTime; 8 | 9 | public delegate void TimerStarted(); 10 | public static event TimerStarted OnTimerStarted; 11 | 12 | public delegate void HalfTime(); 13 | public static event HalfTime OnHalfTime; 14 | 15 | public delegate void TimerEnded(); 16 | public static event TimerEnded OnTimerEnded; 17 | 18 | private IEnumerator m_Coroutine; 19 | 20 | IEnumerator Start() 21 | { 22 | m_HalfTime = m_Duration / 2; 23 | 24 | if (OnTimerStarted != null) 25 | { 26 | OnTimerStarted(); 27 | } 28 | 29 | yield return StartCoroutine(WaitAndPrint(1.0F)); 30 | 31 | if (OnTimerEnded != null) 32 | { 33 | OnTimerEnded(); 34 | } 35 | } 36 | 37 | private IEnumerator WaitAndPrint(float waitTime) 38 | { 39 | while (Time.time < m_Duration) 40 | { 41 | yield return new WaitForSeconds(waitTime); 42 | 43 | Debug.Log("Seconds: " + Mathf.Round(Time.time)); 44 | 45 | if (Mathf.Round(Time.time) == Mathf.Round(m_HalfTime)) 46 | { 47 | if (OnHalfTime != null) 48 | { 49 | OnHalfTime(); 50 | } 51 | } 52 | } 53 | } 54 | } -------------------------------------------------------------------------------- /Assets/Patterns/Strategy/Client.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Pattern.Strategy 4 | { 5 | public class Client : MonoBehaviour 6 | { 7 | void Update() 8 | { 9 | if (Input.GetKeyDown(KeyCode.D)) 10 | { 11 | // Applying default seeking behaviour to missiles. 12 | Missile sideWinder = ScriptableObject.CreateInstance(); 13 | sideWinder.ApplySeek(); 14 | 15 | Missile tomahawk = ScriptableObject.CreateInstance(); 16 | tomahawk.ApplySeek(); 17 | 18 | Missile torpedo = ScriptableObject.CreateInstance(); 19 | torpedo.ApplySeek(); 20 | 21 | // Applying custom seeking behaviour to a SideWinder; 22 | Missile sideWinderWithSonar = ScriptableObject.CreateInstance(); 23 | ISeekBehaviour sonar = new SeekWithSonar(); 24 | sideWinderWithSonar.SetSeekBehavior(sonar); 25 | sideWinderWithSonar.ApplySeek(); 26 | } 27 | } 28 | 29 | void OnGUI() 30 | { 31 | GUI.color = Color.black; 32 | GUI.Label(new Rect(10, 10, 500, 20), "Press D to load a set of missiles and apply a seeking strategy to them."); 33 | GUI.Label(new Rect(10, 30, 500, 20), "Look in the Debug Console to view the missile being launched."); 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /Assets/Patterns/Decorator/Client.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Pattern.Decorator 4 | { 5 | public class Client : MonoBehaviour 6 | { 7 | void Update() 8 | { 9 | if (Input.GetKeyDown("b")) 10 | { 11 | IRifle rifle = new BasicRifle(); 12 | Debug.Log("Rifle has a basic configuration, current accurancy: " + rifle.GetAccuracy()); 13 | } 14 | 15 | if (Input.GetKeyDown("s")) 16 | { 17 | IRifle rifle = new BasicRifle(); 18 | rifle = new WithScope(rifle); 19 | Debug.Log("Rifle is equipped with a scope, current accurancy: " + rifle.GetAccuracy()); 20 | } 21 | 22 | if (Input.GetKeyDown("t")) 23 | { 24 | IRifle rifle = new BasicRifle(); 25 | rifle = new WithScope(new WithStabilizer(rifle)); 26 | Debug.Log("Rifle is equipped with a scope and stabilizer, current accurancy: " + rifle.GetAccuracy()); 27 | } 28 | } 29 | 30 | void OnGUI() 31 | { 32 | GUI.color = Color.black; 33 | GUI.Label(new Rect(10, 10, 300, 30), "Press B to build a basic rifle."); 34 | GUI.Label(new Rect(10, 30, 300, 30), "Press S to add a scope to the rifle."); 35 | GUI.Label(new Rect(10, 50, 300, 30), "Press T to add a scope and stabilizer to the rifle."); 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!19 &1 4 | Physics2DSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 3 7 | m_Gravity: {x: 0, y: -9.81} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_VelocityIterations: 8 10 | m_PositionIterations: 3 11 | m_VelocityThreshold: 1 12 | m_MaxLinearCorrection: 0.2 13 | m_MaxAngularCorrection: 8 14 | m_MaxTranslationSpeed: 100 15 | m_MaxRotationSpeed: 360 16 | m_BaumgarteScale: 0.2 17 | m_BaumgarteTimeOfImpactScale: 0.75 18 | m_TimeToSleep: 0.5 19 | m_LinearSleepTolerance: 0.01 20 | m_AngularSleepTolerance: 2 21 | m_DefaultContactOffset: 0.01 22 | m_AutoSimulation: 1 23 | m_QueriesHitTriggers: 1 24 | m_QueriesStartInColliders: 1 25 | m_ChangeStopsCallbacks: 0 26 | m_CallbacksOnDisable: 1 27 | m_AutoSyncTransforms: 1 28 | m_AlwaysShowColliders: 0 29 | m_ShowColliderSleep: 1 30 | m_ShowColliderContacts: 0 31 | m_ShowColliderAABB: 0 32 | m_ContactArrowScale: 0.2 33 | m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412} 34 | m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432} 35 | m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745} 36 | m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804} 37 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 38 | -------------------------------------------------------------------------------- /Assets/Patterns/EventBus/EventBus.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine.Events; 2 | using System.Collections.Generic; 3 | 4 | public class EventBus : Singleton 5 | { 6 | private Dictionary m_EventDictionary; 7 | 8 | public override void Awake() 9 | { 10 | base.Awake(); 11 | Instance.Init(); 12 | } 13 | 14 | private void Init() 15 | { 16 | if (Instance.m_EventDictionary == null) 17 | { 18 | Instance.m_EventDictionary = new Dictionary(); 19 | } 20 | } 21 | 22 | public static void StartListening(string eventName, UnityAction listener) 23 | { 24 | UnityEvent thisEvent = null; 25 | if (Instance.m_EventDictionary.TryGetValue(eventName, out thisEvent)) 26 | { 27 | thisEvent.AddListener(listener); 28 | } 29 | else 30 | { 31 | thisEvent = new UnityEvent(); 32 | thisEvent.AddListener(listener); 33 | Instance.m_EventDictionary.Add(eventName, thisEvent); 34 | } 35 | } 36 | 37 | public static void StopListening(string eventName, UnityAction listener) 38 | { 39 | UnityEvent thisEvent = null; 40 | if (Instance.m_EventDictionary.TryGetValue(eventName, out thisEvent)) 41 | { 42 | thisEvent.RemoveListener(listener); 43 | } 44 | } 45 | 46 | public static void TriggerEvent(string eventName) 47 | { 48 | UnityEvent thisEvent = null; 49 | if (Instance.m_EventDictionary.TryGetValue(eventName, out thisEvent)) 50 | { 51 | thisEvent.Invoke(); 52 | } 53 | } 54 | } -------------------------------------------------------------------------------- /Assets/Patterns/Singleton/Singleton.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | // can be any type. 4 | public class Singleton : MonoBehaviour where T : Component 5 | { 6 | private static T m_Instance; // Making sure that instance is accessible only by the getter. 7 | public static bool m_isQuitting; 8 | 9 | public static T Instance 10 | { 11 | get 12 | { 13 | if (m_Instance == null) 14 | { 15 | // Making sure that there's not other instances of the same type in memory. 16 | m_Instance = FindObjectOfType(); 17 | 18 | if (m_Instance == null) 19 | { 20 | // Initializing a new game object to contain a singular instance. 21 | GameObject obj = new GameObject(); 22 | obj.name = typeof(T).Name; 23 | m_Instance = obj.AddComponent(); 24 | } 25 | } 26 | return m_Instance; 27 | } 28 | } 29 | 30 | // Virtual Awake() that can be overridden in a derived class. 31 | public virtual void Awake() 32 | { 33 | if (m_Instance == null) 34 | { 35 | // If null, this instance is now the Singleton instance of the assigned type. 36 | m_Instance = this as T; 37 | 38 | // Making sure that my Singleton instance will persist in memory across every scene. 39 | DontDestroyOnLoad(this.gameObject); 40 | } 41 | else 42 | { 43 | // Destroy current instance because it must be a duplicate. 44 | Destroy(gameObject); 45 | } 46 | } 47 | } -------------------------------------------------------------------------------- /Assets/Patterns/DependencyInjection/Client.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Pattern.DependencyInjection 4 | { 5 | public class Client : MonoBehaviour 6 | { 7 | // Bike controlled by the player 8 | public Bike m_PlayerBike; 9 | 10 | // Bike controlled by an android (AI) 11 | public Bike m_AndroidBike; 12 | 13 | void Awake() 14 | { 15 | // Set up a bike with a human driver and jet engine 16 | IEngine jetEngine = new JetEngine(); 17 | IDriver humanDriver = new HumanDriver(); 18 | 19 | m_PlayerBike.SetEngine(jetEngine); 20 | m_PlayerBike.SetDriver(humanDriver); 21 | m_PlayerBike.StartEngine(); 22 | 23 | // Set up a bike with a AI driver and a nitro engine 24 | IEngine nitroEngine = new NitroEngine(); 25 | IDriver androidDriver = new AndroidDriver(); 26 | 27 | m_AndroidBike.SetEngine(nitroEngine); 28 | m_AndroidBike.SetDriver(androidDriver); 29 | m_AndroidBike.StartEngine(); 30 | } 31 | 32 | void Update() 33 | { 34 | if (Input.GetKeyDown(KeyCode.A)) 35 | { 36 | m_PlayerBike.TurnLeft(); 37 | } 38 | 39 | if (Input.GetKeyDown(KeyCode.D)) 40 | { 41 | m_PlayerBike.TurnRight(); 42 | } 43 | } 44 | 45 | void OnGUI() 46 | { 47 | GUI.color = Color.black; 48 | GUI.Label(new Rect(10, 10, 500, 20), "Press A to turn LEFT and D to turn RIGHT"); 49 | GUI.Label(new Rect(10, 30, 500, 20), "Look in the Debug Console to the status of your inputs"); 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!126 &1 4 | NavMeshProjectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | areas: 8 | - name: Walkable 9 | cost: 1 10 | - name: Not Walkable 11 | cost: 1 12 | - name: Jump 13 | cost: 2 14 | - name: 15 | cost: 1 16 | - name: 17 | cost: 1 18 | - name: 19 | cost: 1 20 | - name: 21 | cost: 1 22 | - name: 23 | cost: 1 24 | - name: 25 | cost: 1 26 | - name: 27 | cost: 1 28 | - name: 29 | cost: 1 30 | - name: 31 | cost: 1 32 | - name: 33 | cost: 1 34 | - name: 35 | cost: 1 36 | - name: 37 | cost: 1 38 | - name: 39 | cost: 1 40 | - name: 41 | cost: 1 42 | - name: 43 | cost: 1 44 | - name: 45 | cost: 1 46 | - name: 47 | cost: 1 48 | - name: 49 | cost: 1 50 | - name: 51 | cost: 1 52 | - name: 53 | cost: 1 54 | - name: 55 | cost: 1 56 | - name: 57 | cost: 1 58 | - name: 59 | cost: 1 60 | - name: 61 | cost: 1 62 | - name: 63 | cost: 1 64 | - name: 65 | cost: 1 66 | - name: 67 | cost: 1 68 | - name: 69 | cost: 1 70 | - name: 71 | cost: 1 72 | m_LastAgentTypeID: -887442657 73 | m_Settings: 74 | - serializedVersion: 2 75 | agentTypeID: 0 76 | agentRadius: 0.5 77 | agentHeight: 2 78 | agentSlope: 45 79 | agentClimb: 0.75 80 | ledgeDropHeight: 0 81 | maxJumpAcrossDistance: 0 82 | minRegionArea: 2 83 | manualCellSize: 0 84 | cellSize: 0.16666667 85 | manualTileSize: 0 86 | tileSize: 256 87 | accuratePlacement: 0 88 | debug: 89 | m_Flags: 0 90 | m_SettingNames: 91 | - Humanoid 92 | -------------------------------------------------------------------------------- /Assets/Patterns/Facade/SaveManager.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | using UnityEngine; 3 | using System.Runtime.Serialization.Formatters.Binary; 4 | 5 | public class SaveManager : Singleton 6 | { 7 | private UIManager m_UIManager; 8 | private PlayerData m_PlayerData; 9 | private ScoreManager m_ScoreManager; 10 | private CloudManager m_CloudManager; 11 | 12 | public void SaveGame(Player player) 13 | { 14 | // 1 - Show the save icon on the corner of the screen. 15 | m_UIManager = new UIManager(); 16 | m_UIManager.DisplaySaveIcon(); 17 | 18 | // 2 - Initializing a new Player Data. 19 | m_PlayerData = new PlayerData(); 20 | m_PlayerData.health = player.GetHealth(); 21 | m_PlayerData.playerID = player.GetPlayerID(); 22 | 23 | // 3 - Getting the player's high score. 24 | m_ScoreManager = new ScoreManager(); 25 | m_PlayerData.score = m_ScoreManager.GetScore(player.GetPlayerID()); 26 | 27 | // 4 - Let's serialize the player data. 28 | SerializePlayerData(m_PlayerData, true); 29 | } 30 | 31 | private void SerializePlayerData(PlayerData playerData, bool isCloudSave) 32 | { 33 | // Serializing the PlayerData instance with the current data. 34 | BinaryFormatter bf = new BinaryFormatter(); 35 | FileStream file = File.Create(Application.persistentDataPath + "/playerInfo.dat"); 36 | bf.Serialize(file, playerData); 37 | file.Close(); 38 | 39 | // Uploading the serialized playerInfo.dat file to the cloud. 40 | if (isCloudSave) 41 | { 42 | m_CloudManager = new CloudManager(); 43 | m_CloudManager.UploadSaveGame(Application.persistentDataPath + "/playerInfo.dat"); 44 | } 45 | } 46 | } -------------------------------------------------------------------------------- /Packages/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "com.unity.ads": "2.3.1", 4 | "com.unity.analytics": "3.3.2", 5 | "com.unity.collab-proxy": "1.2.15", 6 | "com.unity.package-manager-ui": "2.1.1", 7 | "com.unity.purchasing": "2.0.3", 8 | "com.unity.textmeshpro": "1.3.0", 9 | "com.unity.timeline": "1.0.0", 10 | "com.unity.xr.legacyinputhelpers": "1.0.0", 11 | "com.unity.modules.ai": "1.0.0", 12 | "com.unity.modules.animation": "1.0.0", 13 | "com.unity.modules.assetbundle": "1.0.0", 14 | "com.unity.modules.audio": "1.0.0", 15 | "com.unity.modules.cloth": "1.0.0", 16 | "com.unity.modules.director": "1.0.0", 17 | "com.unity.modules.imageconversion": "1.0.0", 18 | "com.unity.modules.imgui": "1.0.0", 19 | "com.unity.modules.jsonserialize": "1.0.0", 20 | "com.unity.modules.particlesystem": "1.0.0", 21 | "com.unity.modules.physics": "1.0.0", 22 | "com.unity.modules.physics2d": "1.0.0", 23 | "com.unity.modules.screencapture": "1.0.0", 24 | "com.unity.modules.terrain": "1.0.0", 25 | "com.unity.modules.terrainphysics": "1.0.0", 26 | "com.unity.modules.tilemap": "1.0.0", 27 | "com.unity.modules.ui": "1.0.0", 28 | "com.unity.modules.uielements": "1.0.0", 29 | "com.unity.modules.umbra": "1.0.0", 30 | "com.unity.modules.unityanalytics": "1.0.0", 31 | "com.unity.modules.unitywebrequest": "1.0.0", 32 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0", 33 | "com.unity.modules.unitywebrequestaudio": "1.0.0", 34 | "com.unity.modules.unitywebrequesttexture": "1.0.0", 35 | "com.unity.modules.unitywebrequestwww": "1.0.0", 36 | "com.unity.modules.vehicles": "1.0.0", 37 | "com.unity.modules.video": "1.0.0", 38 | "com.unity.modules.vr": "1.0.0", 39 | "com.unity.modules.wind": "1.0.0", 40 | "com.unity.modules.xr": "1.0.0" 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /Assets/Patterns/Command/Client.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Pattern.Command_ 4 | { 5 | public class Client : MonoBehaviour 6 | { 7 | private RemoteControlDevice m_RadioReceiver; 8 | private RemoteControlDevice m_TelevisionReceiver; 9 | private RemoteControlDevice[] m_Devices = new RemoteControlDevice[2]; 10 | 11 | void Start() 12 | { 13 | m_RadioReceiver = new RadioReceiver(); 14 | m_TelevisionReceiver = new TelevisionReceiver(); 15 | 16 | m_Devices[0] = m_RadioReceiver; 17 | m_Devices[1] = m_TelevisionReceiver; 18 | } 19 | 20 | void Update() 21 | { 22 | if (Input.GetKeyDown(KeyCode.O)) 23 | { 24 | Command commandTV = new TurnOnCommand(m_Devices[0]); 25 | Command commandRadio = new TurnOnCommand(m_Devices[1]); 26 | 27 | Invoker invoker = new Invoker(); 28 | 29 | invoker.SetCommand(commandTV); 30 | invoker.ExecuteCommand(); 31 | 32 | invoker.SetCommand(commandRadio); 33 | invoker.ExecuteCommand(); 34 | } 35 | 36 | if (Input.GetKeyDown(KeyCode.K)) 37 | { 38 | Command commandKill = new KillSwitchCommand(m_Devices); 39 | Invoker invoker = new Invoker(); 40 | invoker.SetCommand(commandKill); 41 | invoker.ExecuteCommand(); 42 | } 43 | } 44 | 45 | void OnGUI() 46 | { 47 | GUI.color = Color.black; 48 | GUI.Label(new Rect(10, 10, 500, 20), "Press O to turn the radio and television."); 49 | GUI.Label(new Rect(10, 30, 500, 20), "Press K to trigger the kill switch and turn off everything."); 50 | GUI.Label(new Rect(10, 50, 500, 20), "Look in the Debug Console to view the status of the devices."); 51 | } 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /Assets/Patterns/SpatialPartition/Client.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Pattern.SpatialPartition 4 | { 5 | public class Client : MonoBehaviour 6 | { 7 | public int m_SquareSize = 2; 8 | public int m_NumberOfSquares = 16; 9 | 10 | private Grid m_Grid; 11 | private IUnit[] m_Preys; 12 | 13 | void Start() 14 | { 15 | m_Grid = new Grid(m_SquareSize, m_NumberOfSquares); 16 | Debug.Log("Grid generated"); 17 | } 18 | 19 | void Update() 20 | { 21 | if (Input.GetKeyDown(KeyCode.P)) 22 | { 23 | IUnit prey; 24 | int numberOfPrey = 5; 25 | m_Preys = new IUnit[numberOfPrey]; 26 | 27 | for (int i = 0; i < numberOfPrey; i++) 28 | { 29 | prey = new Prey(); 30 | m_Grid.AddToRandomnPosition(prey); 31 | m_Preys[i] = prey; 32 | 33 | Debug.Log("A prey was spawned @ square: " + m_Preys[i].GetGridPosition()); 34 | } 35 | } 36 | 37 | if (Input.GetKeyDown(KeyCode.H)) 38 | { 39 | IUnit predator; 40 | predator = new Predator(); 41 | m_Grid.AddToRandomnPosition(predator); 42 | Debug.Log("A predator was spawned @ square: " + predator.GetGridPosition()); 43 | 44 | int closest = m_Grid.FindClosest(predator, m_Preys); 45 | Debug.Log("The closest prey is @ square: " + closest); 46 | } 47 | } 48 | 49 | void OnGUI() 50 | { 51 | GUI.color = Color.black; 52 | GUI.Label(new Rect(10, 10, 500, 20), "Press P to spawn prey on the grid."); 53 | GUI.Label(new Rect(10, 30, 500, 20), "Press H to hunt some prey."); 54 | GUI.Label(new Rect(10, 50, 500, 20), "Open Debug Console to view the output."); 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /Assets/Patterns/Prototype/Drone.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: Drone 10 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 4 13 | m_EnableInstancingVariants: 0 14 | m_DoubleSidedGI: 0 15 | m_CustomRenderQueue: -1 16 | stringTagMap: {} 17 | disabledShaderPasses: [] 18 | m_SavedProperties: 19 | serializedVersion: 3 20 | m_TexEnvs: 21 | - _BumpMap: 22 | m_Texture: {fileID: 0} 23 | m_Scale: {x: 1, y: 1} 24 | m_Offset: {x: 0, y: 0} 25 | - _DetailAlbedoMap: 26 | m_Texture: {fileID: 0} 27 | m_Scale: {x: 1, y: 1} 28 | m_Offset: {x: 0, y: 0} 29 | - _DetailMask: 30 | m_Texture: {fileID: 0} 31 | m_Scale: {x: 1, y: 1} 32 | m_Offset: {x: 0, y: 0} 33 | - _DetailNormalMap: 34 | m_Texture: {fileID: 0} 35 | m_Scale: {x: 1, y: 1} 36 | m_Offset: {x: 0, y: 0} 37 | - _EmissionMap: 38 | m_Texture: {fileID: 0} 39 | m_Scale: {x: 1, y: 1} 40 | m_Offset: {x: 0, y: 0} 41 | - _MainTex: 42 | m_Texture: {fileID: 0} 43 | m_Scale: {x: 1, y: 1} 44 | m_Offset: {x: 0, y: 0} 45 | - _MetallicGlossMap: 46 | m_Texture: {fileID: 0} 47 | m_Scale: {x: 1, y: 1} 48 | m_Offset: {x: 0, y: 0} 49 | - _OcclusionMap: 50 | m_Texture: {fileID: 0} 51 | m_Scale: {x: 1, y: 1} 52 | m_Offset: {x: 0, y: 0} 53 | - _ParallaxMap: 54 | m_Texture: {fileID: 0} 55 | m_Scale: {x: 1, y: 1} 56 | m_Offset: {x: 0, y: 0} 57 | m_Floats: 58 | - _BumpScale: 1 59 | - _Cutoff: 0.5 60 | - _DetailNormalMapScale: 1 61 | - _DstBlend: 0 62 | - _GlossMapScale: 1 63 | - _Glossiness: 0.5 64 | - _GlossyReflections: 1 65 | - _Metallic: 0 66 | - _Mode: 0 67 | - _OcclusionStrength: 1 68 | - _Parallax: 0.02 69 | - _SmoothnessTextureChannel: 0 70 | - _SpecularHighlights: 1 71 | - _SrcBlend: 1 72 | - _UVSec: 0 73 | - _ZWrite: 1 74 | m_Colors: 75 | - _Color: {r: 0.27661088, g: 0.3397804, b: 0.5283019, a: 1} 76 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 77 | -------------------------------------------------------------------------------- /Assets/Patterns/Prototype/Sniper.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: Sniper 10 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 4 13 | m_EnableInstancingVariants: 0 14 | m_DoubleSidedGI: 0 15 | m_CustomRenderQueue: -1 16 | stringTagMap: {} 17 | disabledShaderPasses: [] 18 | m_SavedProperties: 19 | serializedVersion: 3 20 | m_TexEnvs: 21 | - _BumpMap: 22 | m_Texture: {fileID: 0} 23 | m_Scale: {x: 1, y: 1} 24 | m_Offset: {x: 0, y: 0} 25 | - _DetailAlbedoMap: 26 | m_Texture: {fileID: 0} 27 | m_Scale: {x: 1, y: 1} 28 | m_Offset: {x: 0, y: 0} 29 | - _DetailMask: 30 | m_Texture: {fileID: 0} 31 | m_Scale: {x: 1, y: 1} 32 | m_Offset: {x: 0, y: 0} 33 | - _DetailNormalMap: 34 | m_Texture: {fileID: 0} 35 | m_Scale: {x: 1, y: 1} 36 | m_Offset: {x: 0, y: 0} 37 | - _EmissionMap: 38 | m_Texture: {fileID: 0} 39 | m_Scale: {x: 1, y: 1} 40 | m_Offset: {x: 0, y: 0} 41 | - _MainTex: 42 | m_Texture: {fileID: 0} 43 | m_Scale: {x: 1, y: 1} 44 | m_Offset: {x: 0, y: 0} 45 | - _MetallicGlossMap: 46 | m_Texture: {fileID: 0} 47 | m_Scale: {x: 1, y: 1} 48 | m_Offset: {x: 0, y: 0} 49 | - _OcclusionMap: 50 | m_Texture: {fileID: 0} 51 | m_Scale: {x: 1, y: 1} 52 | m_Offset: {x: 0, y: 0} 53 | - _ParallaxMap: 54 | m_Texture: {fileID: 0} 55 | m_Scale: {x: 1, y: 1} 56 | m_Offset: {x: 0, y: 0} 57 | m_Floats: 58 | - _BumpScale: 1 59 | - _Cutoff: 0.5 60 | - _DetailNormalMapScale: 1 61 | - _DstBlend: 0 62 | - _GlossMapScale: 1 63 | - _Glossiness: 0.5 64 | - _GlossyReflections: 1 65 | - _Metallic: 0 66 | - _Mode: 0 67 | - _OcclusionStrength: 1 68 | - _Parallax: 0.02 69 | - _SmoothnessTextureChannel: 0 70 | - _SpecularHighlights: 1 71 | - _SrcBlend: 1 72 | - _UVSec: 0 73 | - _ZWrite: 1 74 | m_Colors: 75 | - _Color: {r: 0.5660378, g: 0.29102886, b: 0.29102886, a: 1} 76 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 77 | -------------------------------------------------------------------------------- /ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!30 &1 4 | GraphicsSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 12 7 | m_Deferred: 8 | m_Mode: 1 9 | m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0} 10 | m_DeferredReflections: 11 | m_Mode: 1 12 | m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0} 13 | m_ScreenSpaceShadows: 14 | m_Mode: 1 15 | m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0} 16 | m_LegacyDeferred: 17 | m_Mode: 1 18 | m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0} 19 | m_DepthNormals: 20 | m_Mode: 1 21 | m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0} 22 | m_MotionVectors: 23 | m_Mode: 1 24 | m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0} 25 | m_LightHalo: 26 | m_Mode: 1 27 | m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0} 28 | m_LensFlare: 29 | m_Mode: 1 30 | m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0} 31 | m_AlwaysIncludedShaders: 32 | - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} 33 | - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0} 34 | - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0} 35 | - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0} 36 | - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0} 37 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} 38 | m_PreloadedShaders: [] 39 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, 40 | type: 0} 41 | m_CustomRenderPipeline: {fileID: 0} 42 | m_TransparencySortMode: 0 43 | m_TransparencySortAxis: {x: 0, y: 0, z: 1} 44 | m_DefaultRenderingPath: 1 45 | m_DefaultMobileRenderingPath: 1 46 | m_TierSettings: [] 47 | m_LightmapStripping: 0 48 | m_FogStripping: 0 49 | m_InstancingStripping: 0 50 | m_LightmapKeepPlain: 1 51 | m_LightmapKeepDirCombined: 1 52 | m_LightmapKeepDynamicPlain: 1 53 | m_LightmapKeepDynamicDirCombined: 1 54 | m_LightmapKeepShadowMask: 1 55 | m_LightmapKeepSubtractive: 1 56 | m_FogKeepLinear: 1 57 | m_FogKeepExp: 1 58 | m_FogKeepExp2: 1 59 | m_AlbedoSwatchInfos: [] 60 | m_LightsUseLinearIntensity: 0 61 | m_LightsUseColorTemperature: 0 62 | -------------------------------------------------------------------------------- /Assets/Patterns/ObjectPool/ObjectPool.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections.Generic; 3 | 4 | public class ObjectPool : Singleton 5 | { 6 | // The objects to pool. 7 | public GameObject[] objects; 8 | 9 | // The list of pooled objects. 10 | public List[] pooledObjects; 11 | 12 | // The amount of objects to buffer. 13 | public int[] amountToBuffer; 14 | 15 | public int defaultBufferAmount = 3; 16 | 17 | // The container of pooled objects. 18 | protected GameObject containerObject; 19 | 20 | void Start() 21 | { 22 | containerObject = new GameObject("ObjectPool"); 23 | pooledObjects = new List[objects.Length]; 24 | 25 | int i = 0; 26 | foreach (GameObject obj in objects) 27 | { 28 | pooledObjects[i] = new List(); 29 | 30 | int bufferAmount; 31 | 32 | if (i < amountToBuffer.Length) 33 | { 34 | bufferAmount = amountToBuffer[i]; 35 | } 36 | else 37 | { 38 | bufferAmount = defaultBufferAmount; 39 | } 40 | 41 | for (int n = 0; n < bufferAmount; n++) 42 | { 43 | GameObject newObj = Instantiate(obj) as GameObject; 44 | newObj.name = obj.name; 45 | PoolObject(newObj); 46 | } 47 | 48 | i++; 49 | } 50 | } 51 | 52 | // Pull an object of a specific type from the pool. 53 | public GameObject PullObject(string objectType) 54 | { 55 | bool onlyPooled = false; 56 | for (int i = 0; i < objects.Length; i++) 57 | { 58 | GameObject prefab = objects[i]; 59 | 60 | if (prefab.name == objectType) 61 | { 62 | if (pooledObjects[i].Count > 0) 63 | { 64 | GameObject pooledObject = pooledObjects[i][0]; 65 | pooledObject.SetActive(true); 66 | pooledObject.transform.parent = null; 67 | 68 | pooledObjects[i].Remove(pooledObject); 69 | 70 | return pooledObject; 71 | 72 | } 73 | else if (!onlyPooled) 74 | { 75 | return Instantiate(objects[i]) as GameObject; 76 | } 77 | 78 | break; 79 | } 80 | } 81 | 82 | // Null if there's a hit miss. 83 | return null; 84 | } 85 | 86 | // Add object of a specific type to the pool. 87 | public void PoolObject(GameObject obj) 88 | { 89 | for (int i = 0; i < objects.Length; i++) 90 | { 91 | if (objects[i].name == obj.name) 92 | { 93 | obj.SetActive(false); 94 | obj.transform.parent = containerObject.transform; 95 | pooledObjects[i].Add(obj); 96 | return; 97 | } 98 | } 99 | 100 | Destroy(obj); 101 | } 102 | } -------------------------------------------------------------------------------- /Assets/Patterns/ObjectPool/Runner.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1001 &100100000 4 | Prefab: 5 | m_ObjectHideFlags: 1 6 | serializedVersion: 2 7 | m_Modification: 8 | m_TransformParent: {fileID: 0} 9 | m_Modifications: [] 10 | m_RemovedComponents: [] 11 | m_SourcePrefab: {fileID: 0} 12 | m_RootGameObject: {fileID: 1656319032893476} 13 | m_IsPrefabAsset: 1 14 | --- !u!1 &1656319032893476 15 | GameObject: 16 | m_ObjectHideFlags: 0 17 | m_CorrespondingSourceObject: {fileID: 0} 18 | m_PrefabInternal: {fileID: 100100000} 19 | serializedVersion: 6 20 | m_Component: 21 | - component: {fileID: 4289776579796562} 22 | - component: {fileID: 33221014123597926} 23 | - component: {fileID: 23232505576487730} 24 | - component: {fileID: 65416020195073680} 25 | - component: {fileID: 114253349843662034} 26 | m_Layer: 0 27 | m_Name: Runner 28 | m_TagString: Untagged 29 | m_Icon: {fileID: 0} 30 | m_NavMeshLayer: 0 31 | m_StaticEditorFlags: 0 32 | m_IsActive: 1 33 | --- !u!4 &4289776579796562 34 | Transform: 35 | m_ObjectHideFlags: 1 36 | m_CorrespondingSourceObject: {fileID: 0} 37 | m_PrefabInternal: {fileID: 100100000} 38 | m_GameObject: {fileID: 1656319032893476} 39 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 40 | m_LocalPosition: {x: 0.072, y: 0.22, z: 0} 41 | m_LocalScale: {x: 1, y: 1, z: 1} 42 | m_Children: [] 43 | m_Father: {fileID: 0} 44 | m_RootOrder: 0 45 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 46 | --- !u!23 &23232505576487730 47 | MeshRenderer: 48 | m_ObjectHideFlags: 1 49 | m_CorrespondingSourceObject: {fileID: 0} 50 | m_PrefabInternal: {fileID: 100100000} 51 | m_GameObject: {fileID: 1656319032893476} 52 | m_Enabled: 1 53 | m_CastShadows: 1 54 | m_ReceiveShadows: 1 55 | m_DynamicOccludee: 1 56 | m_MotionVectors: 1 57 | m_LightProbeUsage: 1 58 | m_ReflectionProbeUsage: 1 59 | m_RenderingLayerMask: 4294967295 60 | m_Materials: 61 | - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} 62 | m_StaticBatchInfo: 63 | firstSubMesh: 0 64 | subMeshCount: 0 65 | m_StaticBatchRoot: {fileID: 0} 66 | m_ProbeAnchor: {fileID: 0} 67 | m_LightProbeVolumeOverride: {fileID: 0} 68 | m_ScaleInLightmap: 1 69 | m_PreserveUVs: 0 70 | m_IgnoreNormalsForChartDetection: 0 71 | m_ImportantGI: 0 72 | m_StitchLightmapSeams: 0 73 | m_SelectedEditorRenderState: 3 74 | m_MinimumChartSize: 4 75 | m_AutoUVMaxDistance: 0.5 76 | m_AutoUVMaxAngle: 89 77 | m_LightmapParameters: {fileID: 0} 78 | m_SortingLayerID: 0 79 | m_SortingLayer: 0 80 | m_SortingOrder: 0 81 | --- !u!33 &33221014123597926 82 | MeshFilter: 83 | m_ObjectHideFlags: 1 84 | m_CorrespondingSourceObject: {fileID: 0} 85 | m_PrefabInternal: {fileID: 100100000} 86 | m_GameObject: {fileID: 1656319032893476} 87 | m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} 88 | --- !u!65 &65416020195073680 89 | BoxCollider: 90 | m_ObjectHideFlags: 1 91 | m_CorrespondingSourceObject: {fileID: 0} 92 | m_PrefabInternal: {fileID: 100100000} 93 | m_GameObject: {fileID: 1656319032893476} 94 | m_Material: {fileID: 0} 95 | m_IsTrigger: 0 96 | m_Enabled: 1 97 | serializedVersion: 2 98 | m_Size: {x: 1, y: 1, z: 1} 99 | m_Center: {x: 0, y: 0, z: 0} 100 | --- !u!114 &114253349843662034 101 | MonoBehaviour: 102 | m_ObjectHideFlags: 1 103 | m_CorrespondingSourceObject: {fileID: 0} 104 | m_PrefabInternal: {fileID: 100100000} 105 | m_GameObject: {fileID: 1656319032893476} 106 | m_Enabled: 1 107 | m_EditorHideFlags: 0 108 | m_Script: {fileID: 11500000, guid: b4788f09c3bcb524aa03c9a3413ca1a8, type: 3} 109 | m_Name: 110 | m_EditorClassIdentifier: 111 | -------------------------------------------------------------------------------- /Assets/Patterns/ObjectPool/Screamer.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1001 &100100000 4 | Prefab: 5 | m_ObjectHideFlags: 1 6 | serializedVersion: 2 7 | m_Modification: 8 | m_TransformParent: {fileID: 0} 9 | m_Modifications: [] 10 | m_RemovedComponents: [] 11 | m_SourcePrefab: {fileID: 0} 12 | m_RootGameObject: {fileID: 1564395476852210} 13 | m_IsPrefabAsset: 1 14 | --- !u!1 &1564395476852210 15 | GameObject: 16 | m_ObjectHideFlags: 0 17 | m_CorrespondingSourceObject: {fileID: 0} 18 | m_PrefabInternal: {fileID: 100100000} 19 | serializedVersion: 6 20 | m_Component: 21 | - component: {fileID: 4946750488652762} 22 | - component: {fileID: 33899713786463180} 23 | - component: {fileID: 23645847994100604} 24 | - component: {fileID: 65537334218547050} 25 | - component: {fileID: 114770102176520876} 26 | m_Layer: 0 27 | m_Name: Screamer 28 | m_TagString: Untagged 29 | m_Icon: {fileID: 0} 30 | m_NavMeshLayer: 0 31 | m_StaticEditorFlags: 0 32 | m_IsActive: 1 33 | --- !u!4 &4946750488652762 34 | Transform: 35 | m_ObjectHideFlags: 1 36 | m_CorrespondingSourceObject: {fileID: 0} 37 | m_PrefabInternal: {fileID: 100100000} 38 | m_GameObject: {fileID: 1564395476852210} 39 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 40 | m_LocalPosition: {x: 2.037, y: 0.22, z: 0} 41 | m_LocalScale: {x: 1, y: 1, z: 1} 42 | m_Children: [] 43 | m_Father: {fileID: 0} 44 | m_RootOrder: 0 45 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 46 | --- !u!23 &23645847994100604 47 | MeshRenderer: 48 | m_ObjectHideFlags: 1 49 | m_CorrespondingSourceObject: {fileID: 0} 50 | m_PrefabInternal: {fileID: 100100000} 51 | m_GameObject: {fileID: 1564395476852210} 52 | m_Enabled: 1 53 | m_CastShadows: 1 54 | m_ReceiveShadows: 1 55 | m_DynamicOccludee: 1 56 | m_MotionVectors: 1 57 | m_LightProbeUsage: 1 58 | m_ReflectionProbeUsage: 1 59 | m_RenderingLayerMask: 4294967295 60 | m_Materials: 61 | - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} 62 | m_StaticBatchInfo: 63 | firstSubMesh: 0 64 | subMeshCount: 0 65 | m_StaticBatchRoot: {fileID: 0} 66 | m_ProbeAnchor: {fileID: 0} 67 | m_LightProbeVolumeOverride: {fileID: 0} 68 | m_ScaleInLightmap: 1 69 | m_PreserveUVs: 0 70 | m_IgnoreNormalsForChartDetection: 0 71 | m_ImportantGI: 0 72 | m_StitchLightmapSeams: 0 73 | m_SelectedEditorRenderState: 3 74 | m_MinimumChartSize: 4 75 | m_AutoUVMaxDistance: 0.5 76 | m_AutoUVMaxAngle: 89 77 | m_LightmapParameters: {fileID: 0} 78 | m_SortingLayerID: 0 79 | m_SortingLayer: 0 80 | m_SortingOrder: 0 81 | --- !u!33 &33899713786463180 82 | MeshFilter: 83 | m_ObjectHideFlags: 1 84 | m_CorrespondingSourceObject: {fileID: 0} 85 | m_PrefabInternal: {fileID: 100100000} 86 | m_GameObject: {fileID: 1564395476852210} 87 | m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} 88 | --- !u!65 &65537334218547050 89 | BoxCollider: 90 | m_ObjectHideFlags: 1 91 | m_CorrespondingSourceObject: {fileID: 0} 92 | m_PrefabInternal: {fileID: 100100000} 93 | m_GameObject: {fileID: 1564395476852210} 94 | m_Material: {fileID: 0} 95 | m_IsTrigger: 0 96 | m_Enabled: 1 97 | serializedVersion: 2 98 | m_Size: {x: 1, y: 1, z: 1} 99 | m_Center: {x: 0, y: 0, z: 0} 100 | --- !u!114 &114770102176520876 101 | MonoBehaviour: 102 | m_ObjectHideFlags: 1 103 | m_CorrespondingSourceObject: {fileID: 0} 104 | m_PrefabInternal: {fileID: 100100000} 105 | m_GameObject: {fileID: 1564395476852210} 106 | m_Enabled: 1 107 | m_EditorHideFlags: 0 108 | m_Script: {fileID: 11500000, guid: b4788f09c3bcb524aa03c9a3413ca1a8, type: 3} 109 | m_Name: 110 | m_EditorClassIdentifier: 111 | -------------------------------------------------------------------------------- /Assets/Patterns/ObjectPool/Walker.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1001 &100100000 4 | Prefab: 5 | m_ObjectHideFlags: 1 6 | serializedVersion: 2 7 | m_Modification: 8 | m_TransformParent: {fileID: 0} 9 | m_Modifications: [] 10 | m_RemovedComponents: [] 11 | m_SourcePrefab: {fileID: 0} 12 | m_RootGameObject: {fileID: 1268739018581622} 13 | m_IsPrefabAsset: 1 14 | --- !u!1 &1268739018581622 15 | GameObject: 16 | m_ObjectHideFlags: 0 17 | m_CorrespondingSourceObject: {fileID: 0} 18 | m_PrefabInternal: {fileID: 100100000} 19 | serializedVersion: 6 20 | m_Component: 21 | - component: {fileID: 4654418876593576} 22 | - component: {fileID: 33145575614755066} 23 | - component: {fileID: 23637826031444296} 24 | - component: {fileID: 65760587272978150} 25 | - component: {fileID: 114528474333467692} 26 | m_Layer: 0 27 | m_Name: Walker 28 | m_TagString: Untagged 29 | m_Icon: {fileID: 0} 30 | m_NavMeshLayer: 0 31 | m_StaticEditorFlags: 0 32 | m_IsActive: 1 33 | --- !u!4 &4654418876593576 34 | Transform: 35 | m_ObjectHideFlags: 1 36 | m_CorrespondingSourceObject: {fileID: 0} 37 | m_PrefabInternal: {fileID: 100100000} 38 | m_GameObject: {fileID: 1268739018581622} 39 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 40 | m_LocalPosition: {x: -1.99, y: 0.22, z: 0} 41 | m_LocalScale: {x: 1, y: 1, z: 1} 42 | m_Children: [] 43 | m_Father: {fileID: 0} 44 | m_RootOrder: 0 45 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 46 | --- !u!23 &23637826031444296 47 | MeshRenderer: 48 | m_ObjectHideFlags: 1 49 | m_CorrespondingSourceObject: {fileID: 0} 50 | m_PrefabInternal: {fileID: 100100000} 51 | m_GameObject: {fileID: 1268739018581622} 52 | m_Enabled: 1 53 | m_CastShadows: 1 54 | m_ReceiveShadows: 1 55 | m_DynamicOccludee: 1 56 | m_MotionVectors: 1 57 | m_LightProbeUsage: 1 58 | m_ReflectionProbeUsage: 1 59 | m_RenderingLayerMask: 4294967295 60 | m_Materials: 61 | - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} 62 | m_StaticBatchInfo: 63 | firstSubMesh: 0 64 | subMeshCount: 0 65 | m_StaticBatchRoot: {fileID: 0} 66 | m_ProbeAnchor: {fileID: 0} 67 | m_LightProbeVolumeOverride: {fileID: 0} 68 | m_ScaleInLightmap: 1 69 | m_PreserveUVs: 0 70 | m_IgnoreNormalsForChartDetection: 0 71 | m_ImportantGI: 0 72 | m_StitchLightmapSeams: 0 73 | m_SelectedEditorRenderState: 3 74 | m_MinimumChartSize: 4 75 | m_AutoUVMaxDistance: 0.5 76 | m_AutoUVMaxAngle: 89 77 | m_LightmapParameters: {fileID: 0} 78 | m_SortingLayerID: 0 79 | m_SortingLayer: 0 80 | m_SortingOrder: 0 81 | --- !u!33 &33145575614755066 82 | MeshFilter: 83 | m_ObjectHideFlags: 1 84 | m_CorrespondingSourceObject: {fileID: 0} 85 | m_PrefabInternal: {fileID: 100100000} 86 | m_GameObject: {fileID: 1268739018581622} 87 | m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} 88 | --- !u!65 &65760587272978150 89 | BoxCollider: 90 | m_ObjectHideFlags: 1 91 | m_CorrespondingSourceObject: {fileID: 0} 92 | m_PrefabInternal: {fileID: 100100000} 93 | m_GameObject: {fileID: 1268739018581622} 94 | m_Material: {fileID: 0} 95 | m_IsTrigger: 0 96 | m_Enabled: 1 97 | serializedVersion: 2 98 | m_Size: {x: 1, y: 1, z: 1} 99 | m_Center: {x: 0, y: 0, z: 0} 100 | --- !u!114 &114528474333467692 101 | MonoBehaviour: 102 | m_ObjectHideFlags: 1 103 | m_CorrespondingSourceObject: {fileID: 0} 104 | m_PrefabInternal: {fileID: 100100000} 105 | m_GameObject: {fileID: 1268739018581622} 106 | m_Enabled: 1 107 | m_EditorHideFlags: 0 108 | m_Script: {fileID: 11500000, guid: 4b91902cb97bd714a9a911832977c62a, type: 3} 109 | m_Name: 110 | m_EditorClassIdentifier: 111 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Hands-On Game Development Patterns with Unity 2019 2 | 3 | Hands-On Game Development Patterns with Unity 2019 4 | 5 | This is the code repository for [Hands-On Game Development Patterns with Unity 2019 ](https://prod.packtpub.com/in/game-development/hands-game-development-patterns-unity-2019?utm_source=github&utm_medium=repository&utm_campaign=), published by Packt. 6 | 7 | **Create engaging games by using industry-standard design patterns with C#** 8 | 9 | ## What is this book about? 10 | Traditional building blocks of a robust architecture, such as design patterns, cannot be applied in Unity without being adapted to the Engine's unique way of doing things. We will review design patterns that are currently used by professional game programmers in indie, mobile, and AAA studios. We will also examine the infamous anti-patterns. 11 | 12 | This book covers the following exciting features: 13 | 14 | 15 | If you feel this book is for you, get your [copy](https://www.amazon.com/dp/1789349338) today! 16 | 17 | https://www.packtpub.com/ 19 | 20 | ## Instructions and Navigations 21 | All of the code is organized into folders. For example, Chapter02. 22 | 23 | The code will look like the following: 24 | ``` 25 | public class Tomahawk : Missile 26 | { 27 | void Awake() 28 | { 29 | this.seekBehavior = new SeekWithGPS(); 30 | } 31 | } 32 | ``` 33 | 34 | **Following is what you need for this book:** 35 | The ideal target audience for this book is game developers who want to get their hands on industry-standard, software development patterns and techniques to create engaging and exciting games with Unity 2018. Basic Unity development knowledge is necessary to make the most out of this book. Prior experience with C# will also be helpful 36 | 37 | With the following software and hardware list you can run all code files present in the book (Chapter 1-20). 38 | ### Software and Hardware List 39 | | Chapter | Software required | OS required | 40 | | -------- | ------------------------------------ | ----------------------------------- | 41 | | 1-20 | Unity 2019 | Windows, Mac OS X, and Linux (Any) | 42 | 43 | We also provide a PDF file that has color images of the screenshots/diagrams used in this book. [Click here to download it](https://www.packtpub.com/sites/default/files/downloads/9781789349337_ColorImages.pdf). 44 | 45 | ### Related products 46 | * Unity 2018 Cookbook - Third Edition [[Packt]](https://prod.packtpub.com/in/game-development/unity-2018-cookbook-third-edition?utm_source=github&utm_medium=repository&utm_campaign=) [[Amazon]](https://www.amazon.com/dp/1788471903) 47 | 48 | * Unity Virtual Reality Projects - Second Edition [[Packt]](https://prod.packtpub.com/in/game-development/unity-virtual-reality-projects-second-edition?utm_source=github&utm_medium=repository&utm_campaign=) [[Amazon]](https://www.amazon.com/dp/1788478800) 49 | 50 | 51 | ## Get to Know the Author 52 | **David Baron** 53 | is a game developer with over 15 years' experience in the industry. He has worked for some of the top AAA, mobile, and indie game studios in Montreal, Canada. He has a skillset that includes programming, design, and 3D art. 54 | As a programmer, he has worked on a multitude of games for various platforms, including virtual reality, mobile, and consoles. 55 | 56 | 57 | 58 | ### Suggestions and Feedback 59 | [Click here](https://docs.google.com/forms/d/e/1FAIpQLSdy7dATC6QmEL81FIUuymZ0Wy9vH1jHkvpY57OiMeKGqib_Ow/viewform) if you have any feedback or suggestions. 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /ProjectSettings/QualitySettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!47 &1 4 | QualitySettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 5 7 | m_CurrentQuality: 4 8 | m_QualitySettings: 9 | - serializedVersion: 2 10 | name: Very Low 11 | pixelLightCount: 0 12 | shadows: 0 13 | shadowResolution: 0 14 | shadowProjection: 1 15 | shadowCascades: 1 16 | shadowDistance: 15 17 | shadowNearPlaneOffset: 3 18 | shadowCascade2Split: 0.33333334 19 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 20 | shadowmaskMode: 0 21 | blendWeights: 1 22 | textureQuality: 1 23 | anisotropicTextures: 0 24 | antiAliasing: 0 25 | softParticles: 0 26 | softVegetation: 0 27 | realtimeReflectionProbes: 0 28 | billboardsFaceCameraPosition: 0 29 | vSyncCount: 0 30 | lodBias: 0.3 31 | maximumLODLevel: 0 32 | streamingMipmapsActive: 0 33 | streamingMipmapsAddAllCameras: 1 34 | streamingMipmapsMemoryBudget: 512 35 | streamingMipmapsRenderersPerFrame: 512 36 | streamingMipmapsMaxLevelReduction: 2 37 | streamingMipmapsMaxFileIORequests: 1024 38 | particleRaycastBudget: 4 39 | asyncUploadTimeSlice: 2 40 | asyncUploadBufferSize: 4 41 | asyncUploadPersistentBuffer: 1 42 | resolutionScalingFixedDPIFactor: 1 43 | excludedTargetPlatforms: [] 44 | - serializedVersion: 2 45 | name: Low 46 | pixelLightCount: 0 47 | shadows: 0 48 | shadowResolution: 0 49 | shadowProjection: 1 50 | shadowCascades: 1 51 | shadowDistance: 20 52 | shadowNearPlaneOffset: 3 53 | shadowCascade2Split: 0.33333334 54 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 55 | shadowmaskMode: 0 56 | blendWeights: 2 57 | textureQuality: 0 58 | anisotropicTextures: 0 59 | antiAliasing: 0 60 | softParticles: 0 61 | softVegetation: 0 62 | realtimeReflectionProbes: 0 63 | billboardsFaceCameraPosition: 0 64 | vSyncCount: 0 65 | lodBias: 0.4 66 | maximumLODLevel: 0 67 | streamingMipmapsActive: 0 68 | streamingMipmapsAddAllCameras: 1 69 | streamingMipmapsMemoryBudget: 512 70 | streamingMipmapsRenderersPerFrame: 512 71 | streamingMipmapsMaxLevelReduction: 2 72 | streamingMipmapsMaxFileIORequests: 1024 73 | particleRaycastBudget: 16 74 | asyncUploadTimeSlice: 2 75 | asyncUploadBufferSize: 4 76 | asyncUploadPersistentBuffer: 1 77 | resolutionScalingFixedDPIFactor: 1 78 | excludedTargetPlatforms: [] 79 | - serializedVersion: 2 80 | name: Medium 81 | pixelLightCount: 1 82 | shadows: 1 83 | shadowResolution: 0 84 | shadowProjection: 1 85 | shadowCascades: 1 86 | shadowDistance: 20 87 | shadowNearPlaneOffset: 3 88 | shadowCascade2Split: 0.33333334 89 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 90 | shadowmaskMode: 0 91 | blendWeights: 2 92 | textureQuality: 0 93 | anisotropicTextures: 1 94 | antiAliasing: 0 95 | softParticles: 0 96 | softVegetation: 0 97 | realtimeReflectionProbes: 0 98 | billboardsFaceCameraPosition: 0 99 | vSyncCount: 1 100 | lodBias: 0.7 101 | maximumLODLevel: 0 102 | streamingMipmapsActive: 0 103 | streamingMipmapsAddAllCameras: 1 104 | streamingMipmapsMemoryBudget: 512 105 | streamingMipmapsRenderersPerFrame: 512 106 | streamingMipmapsMaxLevelReduction: 2 107 | streamingMipmapsMaxFileIORequests: 1024 108 | particleRaycastBudget: 64 109 | asyncUploadTimeSlice: 2 110 | asyncUploadBufferSize: 4 111 | asyncUploadPersistentBuffer: 1 112 | resolutionScalingFixedDPIFactor: 1 113 | excludedTargetPlatforms: [] 114 | - serializedVersion: 2 115 | name: High 116 | pixelLightCount: 2 117 | shadows: 2 118 | shadowResolution: 1 119 | shadowProjection: 1 120 | shadowCascades: 2 121 | shadowDistance: 40 122 | shadowNearPlaneOffset: 3 123 | shadowCascade2Split: 0.33333334 124 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 125 | shadowmaskMode: 1 126 | blendWeights: 2 127 | textureQuality: 0 128 | anisotropicTextures: 1 129 | antiAliasing: 2 130 | softParticles: 0 131 | softVegetation: 1 132 | realtimeReflectionProbes: 1 133 | billboardsFaceCameraPosition: 1 134 | vSyncCount: 1 135 | lodBias: 1 136 | maximumLODLevel: 0 137 | streamingMipmapsActive: 0 138 | streamingMipmapsAddAllCameras: 1 139 | streamingMipmapsMemoryBudget: 512 140 | streamingMipmapsRenderersPerFrame: 512 141 | streamingMipmapsMaxLevelReduction: 2 142 | streamingMipmapsMaxFileIORequests: 1024 143 | particleRaycastBudget: 256 144 | asyncUploadTimeSlice: 2 145 | asyncUploadBufferSize: 4 146 | asyncUploadPersistentBuffer: 1 147 | resolutionScalingFixedDPIFactor: 1 148 | excludedTargetPlatforms: [] 149 | - serializedVersion: 2 150 | name: Very High 151 | pixelLightCount: 3 152 | shadows: 2 153 | shadowResolution: 2 154 | shadowProjection: 1 155 | shadowCascades: 2 156 | shadowDistance: 40 157 | shadowNearPlaneOffset: 3 158 | shadowCascade2Split: 0.33333334 159 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 160 | shadowmaskMode: 1 161 | blendWeights: 4 162 | textureQuality: 0 163 | anisotropicTextures: 1 164 | antiAliasing: 4 165 | softParticles: 1 166 | softVegetation: 1 167 | realtimeReflectionProbes: 1 168 | billboardsFaceCameraPosition: 1 169 | vSyncCount: 1 170 | lodBias: 1.5 171 | maximumLODLevel: 0 172 | streamingMipmapsActive: 0 173 | streamingMipmapsAddAllCameras: 1 174 | streamingMipmapsMemoryBudget: 512 175 | streamingMipmapsRenderersPerFrame: 512 176 | streamingMipmapsMaxLevelReduction: 2 177 | streamingMipmapsMaxFileIORequests: 1024 178 | particleRaycastBudget: 1024 179 | asyncUploadTimeSlice: 2 180 | asyncUploadBufferSize: 4 181 | asyncUploadPersistentBuffer: 1 182 | resolutionScalingFixedDPIFactor: 1 183 | excludedTargetPlatforms: [] 184 | - serializedVersion: 2 185 | name: Ultra 186 | pixelLightCount: 4 187 | shadows: 2 188 | shadowResolution: 2 189 | shadowProjection: 1 190 | shadowCascades: 4 191 | shadowDistance: 150 192 | shadowNearPlaneOffset: 3 193 | shadowCascade2Split: 0.33333334 194 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 195 | shadowmaskMode: 1 196 | blendWeights: 4 197 | textureQuality: 0 198 | anisotropicTextures: 1 199 | antiAliasing: 4 200 | softParticles: 1 201 | softVegetation: 1 202 | realtimeReflectionProbes: 1 203 | billboardsFaceCameraPosition: 1 204 | vSyncCount: 1 205 | lodBias: 2 206 | maximumLODLevel: 0 207 | streamingMipmapsActive: 0 208 | streamingMipmapsAddAllCameras: 1 209 | streamingMipmapsMemoryBudget: 512 210 | streamingMipmapsRenderersPerFrame: 512 211 | streamingMipmapsMaxLevelReduction: 2 212 | streamingMipmapsMaxFileIORequests: 1024 213 | particleRaycastBudget: 4096 214 | asyncUploadTimeSlice: 2 215 | asyncUploadBufferSize: 4 216 | asyncUploadPersistentBuffer: 1 217 | resolutionScalingFixedDPIFactor: 1 218 | excludedTargetPlatforms: [] 219 | m_PerPlatformDefaultQuality: {} 220 | -------------------------------------------------------------------------------- /ProjectSettings/InputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!13 &1 4 | InputManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Axes: 8 | - serializedVersion: 3 9 | m_Name: Horizontal 10 | descriptiveName: 11 | descriptiveNegativeName: 12 | negativeButton: left 13 | positiveButton: right 14 | altNegativeButton: a 15 | altPositiveButton: d 16 | gravity: 3 17 | dead: 0.001 18 | sensitivity: 3 19 | snap: 1 20 | invert: 0 21 | type: 0 22 | axis: 0 23 | joyNum: 0 24 | - serializedVersion: 3 25 | m_Name: Vertical 26 | descriptiveName: 27 | descriptiveNegativeName: 28 | negativeButton: down 29 | positiveButton: up 30 | altNegativeButton: s 31 | altPositiveButton: w 32 | gravity: 3 33 | dead: 0.001 34 | sensitivity: 3 35 | snap: 1 36 | invert: 0 37 | type: 0 38 | axis: 0 39 | joyNum: 0 40 | - serializedVersion: 3 41 | m_Name: Fire1 42 | descriptiveName: 43 | descriptiveNegativeName: 44 | negativeButton: 45 | positiveButton: left ctrl 46 | altNegativeButton: 47 | altPositiveButton: mouse 0 48 | gravity: 1000 49 | dead: 0.001 50 | sensitivity: 1000 51 | snap: 0 52 | invert: 0 53 | type: 0 54 | axis: 0 55 | joyNum: 0 56 | - serializedVersion: 3 57 | m_Name: Fire2 58 | descriptiveName: 59 | descriptiveNegativeName: 60 | negativeButton: 61 | positiveButton: left alt 62 | altNegativeButton: 63 | altPositiveButton: mouse 1 64 | gravity: 1000 65 | dead: 0.001 66 | sensitivity: 1000 67 | snap: 0 68 | invert: 0 69 | type: 0 70 | axis: 0 71 | joyNum: 0 72 | - serializedVersion: 3 73 | m_Name: Fire3 74 | descriptiveName: 75 | descriptiveNegativeName: 76 | negativeButton: 77 | positiveButton: left shift 78 | altNegativeButton: 79 | altPositiveButton: mouse 2 80 | gravity: 1000 81 | dead: 0.001 82 | sensitivity: 1000 83 | snap: 0 84 | invert: 0 85 | type: 0 86 | axis: 0 87 | joyNum: 0 88 | - serializedVersion: 3 89 | m_Name: Jump 90 | descriptiveName: 91 | descriptiveNegativeName: 92 | negativeButton: 93 | positiveButton: space 94 | altNegativeButton: 95 | altPositiveButton: 96 | gravity: 1000 97 | dead: 0.001 98 | sensitivity: 1000 99 | snap: 0 100 | invert: 0 101 | type: 0 102 | axis: 0 103 | joyNum: 0 104 | - serializedVersion: 3 105 | m_Name: Mouse X 106 | descriptiveName: 107 | descriptiveNegativeName: 108 | negativeButton: 109 | positiveButton: 110 | altNegativeButton: 111 | altPositiveButton: 112 | gravity: 0 113 | dead: 0 114 | sensitivity: 0.1 115 | snap: 0 116 | invert: 0 117 | type: 1 118 | axis: 0 119 | joyNum: 0 120 | - serializedVersion: 3 121 | m_Name: Mouse Y 122 | descriptiveName: 123 | descriptiveNegativeName: 124 | negativeButton: 125 | positiveButton: 126 | altNegativeButton: 127 | altPositiveButton: 128 | gravity: 0 129 | dead: 0 130 | sensitivity: 0.1 131 | snap: 0 132 | invert: 0 133 | type: 1 134 | axis: 1 135 | joyNum: 0 136 | - serializedVersion: 3 137 | m_Name: Mouse ScrollWheel 138 | descriptiveName: 139 | descriptiveNegativeName: 140 | negativeButton: 141 | positiveButton: 142 | altNegativeButton: 143 | altPositiveButton: 144 | gravity: 0 145 | dead: 0 146 | sensitivity: 0.1 147 | snap: 0 148 | invert: 0 149 | type: 1 150 | axis: 2 151 | joyNum: 0 152 | - serializedVersion: 3 153 | m_Name: Horizontal 154 | descriptiveName: 155 | descriptiveNegativeName: 156 | negativeButton: 157 | positiveButton: 158 | altNegativeButton: 159 | altPositiveButton: 160 | gravity: 0 161 | dead: 0.19 162 | sensitivity: 1 163 | snap: 0 164 | invert: 0 165 | type: 2 166 | axis: 0 167 | joyNum: 0 168 | - serializedVersion: 3 169 | m_Name: Vertical 170 | descriptiveName: 171 | descriptiveNegativeName: 172 | negativeButton: 173 | positiveButton: 174 | altNegativeButton: 175 | altPositiveButton: 176 | gravity: 0 177 | dead: 0.19 178 | sensitivity: 1 179 | snap: 0 180 | invert: 1 181 | type: 2 182 | axis: 1 183 | joyNum: 0 184 | - serializedVersion: 3 185 | m_Name: Fire1 186 | descriptiveName: 187 | descriptiveNegativeName: 188 | negativeButton: 189 | positiveButton: joystick button 0 190 | altNegativeButton: 191 | altPositiveButton: 192 | gravity: 1000 193 | dead: 0.001 194 | sensitivity: 1000 195 | snap: 0 196 | invert: 0 197 | type: 0 198 | axis: 0 199 | joyNum: 0 200 | - serializedVersion: 3 201 | m_Name: Fire2 202 | descriptiveName: 203 | descriptiveNegativeName: 204 | negativeButton: 205 | positiveButton: joystick button 1 206 | altNegativeButton: 207 | altPositiveButton: 208 | gravity: 1000 209 | dead: 0.001 210 | sensitivity: 1000 211 | snap: 0 212 | invert: 0 213 | type: 0 214 | axis: 0 215 | joyNum: 0 216 | - serializedVersion: 3 217 | m_Name: Fire3 218 | descriptiveName: 219 | descriptiveNegativeName: 220 | negativeButton: 221 | positiveButton: joystick button 2 222 | altNegativeButton: 223 | altPositiveButton: 224 | gravity: 1000 225 | dead: 0.001 226 | sensitivity: 1000 227 | snap: 0 228 | invert: 0 229 | type: 0 230 | axis: 0 231 | joyNum: 0 232 | - serializedVersion: 3 233 | m_Name: Jump 234 | descriptiveName: 235 | descriptiveNegativeName: 236 | negativeButton: 237 | positiveButton: joystick button 3 238 | altNegativeButton: 239 | altPositiveButton: 240 | gravity: 1000 241 | dead: 0.001 242 | sensitivity: 1000 243 | snap: 0 244 | invert: 0 245 | type: 0 246 | axis: 0 247 | joyNum: 0 248 | - serializedVersion: 3 249 | m_Name: Submit 250 | descriptiveName: 251 | descriptiveNegativeName: 252 | negativeButton: 253 | positiveButton: return 254 | altNegativeButton: 255 | altPositiveButton: joystick button 0 256 | gravity: 1000 257 | dead: 0.001 258 | sensitivity: 1000 259 | snap: 0 260 | invert: 0 261 | type: 0 262 | axis: 0 263 | joyNum: 0 264 | - serializedVersion: 3 265 | m_Name: Submit 266 | descriptiveName: 267 | descriptiveNegativeName: 268 | negativeButton: 269 | positiveButton: enter 270 | altNegativeButton: 271 | altPositiveButton: space 272 | gravity: 1000 273 | dead: 0.001 274 | sensitivity: 1000 275 | snap: 0 276 | invert: 0 277 | type: 0 278 | axis: 0 279 | joyNum: 0 280 | - serializedVersion: 3 281 | m_Name: Cancel 282 | descriptiveName: 283 | descriptiveNegativeName: 284 | negativeButton: 285 | positiveButton: escape 286 | altNegativeButton: 287 | altPositiveButton: joystick button 1 288 | gravity: 1000 289 | dead: 0.001 290 | sensitivity: 1000 291 | snap: 0 292 | invert: 0 293 | type: 0 294 | axis: 0 295 | joyNum: 0 296 | -------------------------------------------------------------------------------- /Assets/Patterns/Decorator/Decorator.unity: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!29 &1 4 | OcclusionCullingSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_OcclusionBakeSettings: 8 | smallestOccluder: 5 9 | smallestHole: 0.25 10 | backfaceThreshold: 100 11 | m_SceneGUID: 00000000000000000000000000000000 12 | m_OcclusionCullingData: {fileID: 0} 13 | --- !u!104 &2 14 | RenderSettings: 15 | m_ObjectHideFlags: 0 16 | serializedVersion: 9 17 | m_Fog: 0 18 | m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} 19 | m_FogMode: 3 20 | m_FogDensity: 0.01 21 | m_LinearFogStart: 0 22 | m_LinearFogEnd: 300 23 | m_AmbientSkyColor: {r: 1, g: 1, b: 1, a: 1} 24 | m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} 25 | m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} 26 | m_AmbientIntensity: 1 27 | m_AmbientMode: 1 28 | m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} 29 | m_SkyboxMaterial: {fileID: 0} 30 | m_HaloStrength: 0.5 31 | m_FlareStrength: 1 32 | m_FlareFadeSpeed: 3 33 | m_HaloTexture: {fileID: 0} 34 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} 35 | m_DefaultReflectionMode: 0 36 | m_DefaultReflectionResolution: 128 37 | m_ReflectionBounces: 1 38 | m_ReflectionIntensity: 1 39 | m_CustomReflection: {fileID: 0} 40 | m_Sun: {fileID: 0} 41 | m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} 42 | m_UseRadianceAmbientProbe: 0 43 | --- !u!157 &3 44 | LightmapSettings: 45 | m_ObjectHideFlags: 0 46 | serializedVersion: 11 47 | m_GIWorkflowMode: 0 48 | m_GISettings: 49 | serializedVersion: 2 50 | m_BounceScale: 1 51 | m_IndirectOutputScale: 1 52 | m_AlbedoBoost: 1 53 | m_TemporalCoherenceThreshold: 1 54 | m_EnvironmentLightingMode: 0 55 | m_EnableBakedLightmaps: 1 56 | m_EnableRealtimeLightmaps: 0 57 | m_LightmapEditorSettings: 58 | serializedVersion: 10 59 | m_Resolution: 2 60 | m_BakeResolution: 10 61 | m_AtlasSize: 512 62 | m_AO: 0 63 | m_AOMaxDistance: 1 64 | m_CompAOExponent: 1 65 | m_CompAOExponentDirect: 0 66 | m_Padding: 2 67 | m_LightmapParameters: {fileID: 0} 68 | m_LightmapsBakeMode: 1 69 | m_TextureCompression: 1 70 | m_FinalGather: 0 71 | m_FinalGatherFiltering: 1 72 | m_FinalGatherRayCount: 256 73 | m_ReflectionCompression: 2 74 | m_MixedBakeMode: 2 75 | m_BakeBackend: 1 76 | m_PVRSampling: 1 77 | m_PVRDirectSampleCount: 32 78 | m_PVRSampleCount: 256 79 | m_PVRBounces: 2 80 | m_PVRFilterTypeDirect: 0 81 | m_PVRFilterTypeIndirect: 0 82 | m_PVRFilterTypeAO: 0 83 | m_PVRFilteringMode: 1 84 | m_PVRCulling: 1 85 | m_PVRFilteringGaussRadiusDirect: 1 86 | m_PVRFilteringGaussRadiusIndirect: 5 87 | m_PVRFilteringGaussRadiusAO: 2 88 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5 89 | m_PVRFilteringAtrousPositionSigmaIndirect: 2 90 | m_PVRFilteringAtrousPositionSigmaAO: 1 91 | m_ShowResolutionOverlay: 1 92 | m_LightingDataAsset: {fileID: 0} 93 | m_UseShadowmask: 1 94 | --- !u!196 &4 95 | NavMeshSettings: 96 | serializedVersion: 2 97 | m_ObjectHideFlags: 0 98 | m_BuildSettings: 99 | serializedVersion: 2 100 | agentTypeID: 0 101 | agentRadius: 0.5 102 | agentHeight: 2 103 | agentSlope: 45 104 | agentClimb: 0.4 105 | ledgeDropHeight: 0 106 | maxJumpAcrossDistance: 0 107 | minRegionArea: 2 108 | manualCellSize: 0 109 | cellSize: 0.16666667 110 | manualTileSize: 0 111 | tileSize: 256 112 | accuratePlacement: 0 113 | debug: 114 | m_Flags: 0 115 | m_NavMeshData: {fileID: 0} 116 | --- !u!1 &87942742 117 | GameObject: 118 | m_ObjectHideFlags: 0 119 | m_CorrespondingSourceObject: {fileID: 0} 120 | m_PrefabInternal: {fileID: 0} 121 | serializedVersion: 6 122 | m_Component: 123 | - component: {fileID: 87942743} 124 | - component: {fileID: 87942744} 125 | m_Layer: 0 126 | m_Name: Client 127 | m_TagString: Untagged 128 | m_Icon: {fileID: 0} 129 | m_NavMeshLayer: 0 130 | m_StaticEditorFlags: 0 131 | m_IsActive: 1 132 | --- !u!4 &87942743 133 | Transform: 134 | m_ObjectHideFlags: 0 135 | m_CorrespondingSourceObject: {fileID: 0} 136 | m_PrefabInternal: {fileID: 0} 137 | m_GameObject: {fileID: 87942742} 138 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 139 | m_LocalPosition: {x: 2.105019, y: 1.7456479, z: -0.6781666} 140 | m_LocalScale: {x: 1, y: 1, z: 1} 141 | m_Children: [] 142 | m_Father: {fileID: 0} 143 | m_RootOrder: 0 144 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 145 | --- !u!114 &87942744 146 | MonoBehaviour: 147 | m_ObjectHideFlags: 0 148 | m_CorrespondingSourceObject: {fileID: 0} 149 | m_PrefabInternal: {fileID: 0} 150 | m_GameObject: {fileID: 87942742} 151 | m_Enabled: 1 152 | m_EditorHideFlags: 0 153 | m_Script: {fileID: 11500000, guid: 48968bfaf7dce704ea5da2a1dec682b5, type: 3} 154 | m_Name: 155 | m_EditorClassIdentifier: 156 | --- !u!1 &170076733 157 | GameObject: 158 | m_ObjectHideFlags: 0 159 | m_CorrespondingSourceObject: {fileID: 0} 160 | m_PrefabInternal: {fileID: 0} 161 | serializedVersion: 6 162 | m_Component: 163 | - component: {fileID: 170076735} 164 | - component: {fileID: 170076734} 165 | m_Layer: 0 166 | m_Name: Directional Light 167 | m_TagString: Untagged 168 | m_Icon: {fileID: 0} 169 | m_NavMeshLayer: 0 170 | m_StaticEditorFlags: 0 171 | m_IsActive: 1 172 | --- !u!108 &170076734 173 | Light: 174 | m_ObjectHideFlags: 0 175 | m_CorrespondingSourceObject: {fileID: 0} 176 | m_PrefabInternal: {fileID: 0} 177 | m_GameObject: {fileID: 170076733} 178 | m_Enabled: 1 179 | serializedVersion: 8 180 | m_Type: 1 181 | m_Color: {r: 1, g: 1, b: 1, a: 1} 182 | m_Intensity: 0.5 183 | m_Range: 10 184 | m_SpotAngle: 30 185 | m_CookieSize: 10 186 | m_Shadows: 187 | m_Type: 0 188 | m_Resolution: -1 189 | m_CustomResolution: -1 190 | m_Strength: 1 191 | m_Bias: 0.05 192 | m_NormalBias: 0.4 193 | m_NearPlane: 0.2 194 | m_Cookie: {fileID: 0} 195 | m_DrawHalo: 0 196 | m_Flare: {fileID: 0} 197 | m_RenderMode: 0 198 | m_CullingMask: 199 | serializedVersion: 2 200 | m_Bits: 4294967295 201 | m_Lightmapping: 4 202 | m_LightShadowCasterMode: 0 203 | m_AreaSize: {x: 1, y: 1} 204 | m_BounceIntensity: 1 205 | m_ColorTemperature: 6570 206 | m_UseColorTemperature: 0 207 | m_ShadowRadius: 0 208 | m_ShadowAngle: 0 209 | --- !u!4 &170076735 210 | Transform: 211 | m_ObjectHideFlags: 0 212 | m_CorrespondingSourceObject: {fileID: 0} 213 | m_PrefabInternal: {fileID: 0} 214 | m_GameObject: {fileID: 170076733} 215 | m_LocalRotation: {x: 0.19936788, y: 0, z: 0, w: 0.97992474} 216 | m_LocalPosition: {x: 0, y: 4.53, z: -7.03} 217 | m_LocalScale: {x: 1, y: 1, z: 1} 218 | m_Children: [] 219 | m_Father: {fileID: 0} 220 | m_RootOrder: 2 221 | m_LocalEulerAnglesHint: {x: 23, y: 0, z: 0} 222 | --- !u!1 &534669902 223 | GameObject: 224 | m_ObjectHideFlags: 0 225 | m_CorrespondingSourceObject: {fileID: 0} 226 | m_PrefabInternal: {fileID: 0} 227 | serializedVersion: 6 228 | m_Component: 229 | - component: {fileID: 534669905} 230 | - component: {fileID: 534669904} 231 | - component: {fileID: 534669903} 232 | m_Layer: 0 233 | m_Name: Main Camera 234 | m_TagString: Untagged 235 | m_Icon: {fileID: 0} 236 | m_NavMeshLayer: 0 237 | m_StaticEditorFlags: 0 238 | m_IsActive: 1 239 | --- !u!81 &534669903 240 | AudioListener: 241 | m_ObjectHideFlags: 0 242 | m_CorrespondingSourceObject: {fileID: 0} 243 | m_PrefabInternal: {fileID: 0} 244 | m_GameObject: {fileID: 534669902} 245 | m_Enabled: 1 246 | --- !u!20 &534669904 247 | Camera: 248 | m_ObjectHideFlags: 0 249 | m_CorrespondingSourceObject: {fileID: 0} 250 | m_PrefabInternal: {fileID: 0} 251 | m_GameObject: {fileID: 534669902} 252 | m_Enabled: 1 253 | serializedVersion: 2 254 | m_ClearFlags: 1 255 | m_BackGroundColor: {r: 1, g: 1, b: 1, a: 0} 256 | m_projectionMatrixMode: 1 257 | m_SensorSize: {x: 36, y: 24} 258 | m_LensShift: {x: 0, y: 0} 259 | m_FocalLength: 50 260 | m_NormalizedViewPortRect: 261 | serializedVersion: 2 262 | x: 0 263 | y: 0 264 | width: 1 265 | height: 1 266 | near clip plane: 0.3 267 | far clip plane: 1000 268 | field of view: 60 269 | orthographic: 0 270 | orthographic size: 5 271 | m_Depth: -1 272 | m_CullingMask: 273 | serializedVersion: 2 274 | m_Bits: 4294967295 275 | m_RenderingPath: -1 276 | m_TargetTexture: {fileID: 0} 277 | m_TargetDisplay: 0 278 | m_TargetEye: 3 279 | m_HDR: 1 280 | m_AllowMSAA: 1 281 | m_AllowDynamicResolution: 0 282 | m_ForceIntoRT: 0 283 | m_OcclusionCulling: 1 284 | m_StereoConvergence: 10 285 | m_StereoSeparation: 0.022 286 | --- !u!4 &534669905 287 | Transform: 288 | m_ObjectHideFlags: 0 289 | m_CorrespondingSourceObject: {fileID: 0} 290 | m_PrefabInternal: {fileID: 0} 291 | m_GameObject: {fileID: 534669902} 292 | m_LocalRotation: {x: 0.06825388, y: -0, z: -0, w: 0.997668} 293 | m_LocalPosition: {x: 0.078, y: 1.34, z: -3.54} 294 | m_LocalScale: {x: 1, y: 1, z: 1} 295 | m_Children: [] 296 | m_Father: {fileID: 0} 297 | m_RootOrder: 1 298 | m_LocalEulerAnglesHint: {x: 7.827, y: 0, z: 0} 299 | -------------------------------------------------------------------------------- /Assets/Patterns/ServiceLocator/ServiceLocator.unity: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!29 &1 4 | OcclusionCullingSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_OcclusionBakeSettings: 8 | smallestOccluder: 5 9 | smallestHole: 0.25 10 | backfaceThreshold: 100 11 | m_SceneGUID: 00000000000000000000000000000000 12 | m_OcclusionCullingData: {fileID: 0} 13 | --- !u!104 &2 14 | RenderSettings: 15 | m_ObjectHideFlags: 0 16 | serializedVersion: 9 17 | m_Fog: 0 18 | m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} 19 | m_FogMode: 3 20 | m_FogDensity: 0.01 21 | m_LinearFogStart: 0 22 | m_LinearFogEnd: 300 23 | m_AmbientSkyColor: {r: 1, g: 1, b: 1, a: 1} 24 | m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} 25 | m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} 26 | m_AmbientIntensity: 1 27 | m_AmbientMode: 1 28 | m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} 29 | m_SkyboxMaterial: {fileID: 0} 30 | m_HaloStrength: 0.5 31 | m_FlareStrength: 1 32 | m_FlareFadeSpeed: 3 33 | m_HaloTexture: {fileID: 0} 34 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} 35 | m_DefaultReflectionMode: 0 36 | m_DefaultReflectionResolution: 128 37 | m_ReflectionBounces: 1 38 | m_ReflectionIntensity: 1 39 | m_CustomReflection: {fileID: 0} 40 | m_Sun: {fileID: 0} 41 | m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} 42 | m_UseRadianceAmbientProbe: 0 43 | --- !u!157 &3 44 | LightmapSettings: 45 | m_ObjectHideFlags: 0 46 | serializedVersion: 11 47 | m_GIWorkflowMode: 0 48 | m_GISettings: 49 | serializedVersion: 2 50 | m_BounceScale: 1 51 | m_IndirectOutputScale: 1 52 | m_AlbedoBoost: 1 53 | m_TemporalCoherenceThreshold: 1 54 | m_EnvironmentLightingMode: 0 55 | m_EnableBakedLightmaps: 1 56 | m_EnableRealtimeLightmaps: 0 57 | m_LightmapEditorSettings: 58 | serializedVersion: 10 59 | m_Resolution: 2 60 | m_BakeResolution: 10 61 | m_AtlasSize: 512 62 | m_AO: 0 63 | m_AOMaxDistance: 1 64 | m_CompAOExponent: 1 65 | m_CompAOExponentDirect: 0 66 | m_Padding: 2 67 | m_LightmapParameters: {fileID: 0} 68 | m_LightmapsBakeMode: 1 69 | m_TextureCompression: 1 70 | m_FinalGather: 0 71 | m_FinalGatherFiltering: 1 72 | m_FinalGatherRayCount: 256 73 | m_ReflectionCompression: 2 74 | m_MixedBakeMode: 2 75 | m_BakeBackend: 1 76 | m_PVRSampling: 1 77 | m_PVRDirectSampleCount: 32 78 | m_PVRSampleCount: 256 79 | m_PVRBounces: 2 80 | m_PVRFilterTypeDirect: 0 81 | m_PVRFilterTypeIndirect: 0 82 | m_PVRFilterTypeAO: 0 83 | m_PVRFilteringMode: 1 84 | m_PVRCulling: 1 85 | m_PVRFilteringGaussRadiusDirect: 1 86 | m_PVRFilteringGaussRadiusIndirect: 5 87 | m_PVRFilteringGaussRadiusAO: 2 88 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5 89 | m_PVRFilteringAtrousPositionSigmaIndirect: 2 90 | m_PVRFilteringAtrousPositionSigmaAO: 1 91 | m_ShowResolutionOverlay: 1 92 | m_LightingDataAsset: {fileID: 0} 93 | m_UseShadowmask: 1 94 | --- !u!196 &4 95 | NavMeshSettings: 96 | serializedVersion: 2 97 | m_ObjectHideFlags: 0 98 | m_BuildSettings: 99 | serializedVersion: 2 100 | agentTypeID: 0 101 | agentRadius: 0.5 102 | agentHeight: 2 103 | agentSlope: 45 104 | agentClimb: 0.4 105 | ledgeDropHeight: 0 106 | maxJumpAcrossDistance: 0 107 | minRegionArea: 2 108 | manualCellSize: 0 109 | cellSize: 0.16666667 110 | manualTileSize: 0 111 | tileSize: 256 112 | accuratePlacement: 0 113 | debug: 114 | m_Flags: 0 115 | m_NavMeshData: {fileID: 0} 116 | --- !u!1 &87942742 117 | GameObject: 118 | m_ObjectHideFlags: 0 119 | m_CorrespondingSourceObject: {fileID: 0} 120 | m_PrefabInternal: {fileID: 0} 121 | serializedVersion: 6 122 | m_Component: 123 | - component: {fileID: 87942743} 124 | - component: {fileID: 87942744} 125 | m_Layer: 0 126 | m_Name: Client 127 | m_TagString: Untagged 128 | m_Icon: {fileID: 0} 129 | m_NavMeshLayer: 0 130 | m_StaticEditorFlags: 0 131 | m_IsActive: 1 132 | --- !u!4 &87942743 133 | Transform: 134 | m_ObjectHideFlags: 0 135 | m_CorrespondingSourceObject: {fileID: 0} 136 | m_PrefabInternal: {fileID: 0} 137 | m_GameObject: {fileID: 87942742} 138 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 139 | m_LocalPosition: {x: 2.105019, y: 1.7456479, z: -0.6781666} 140 | m_LocalScale: {x: 1, y: 1, z: 1} 141 | m_Children: [] 142 | m_Father: {fileID: 0} 143 | m_RootOrder: 0 144 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 145 | --- !u!114 &87942744 146 | MonoBehaviour: 147 | m_ObjectHideFlags: 0 148 | m_CorrespondingSourceObject: {fileID: 0} 149 | m_PrefabInternal: {fileID: 0} 150 | m_GameObject: {fileID: 87942742} 151 | m_Enabled: 1 152 | m_EditorHideFlags: 0 153 | m_Script: {fileID: 11500000, guid: d08a2ede4adf7f04abde3c8901f84abb, type: 3} 154 | m_Name: 155 | m_EditorClassIdentifier: 156 | --- !u!1 &170076733 157 | GameObject: 158 | m_ObjectHideFlags: 0 159 | m_CorrespondingSourceObject: {fileID: 0} 160 | m_PrefabInternal: {fileID: 0} 161 | serializedVersion: 6 162 | m_Component: 163 | - component: {fileID: 170076735} 164 | - component: {fileID: 170076734} 165 | m_Layer: 0 166 | m_Name: Directional Light 167 | m_TagString: Untagged 168 | m_Icon: {fileID: 0} 169 | m_NavMeshLayer: 0 170 | m_StaticEditorFlags: 0 171 | m_IsActive: 1 172 | --- !u!108 &170076734 173 | Light: 174 | m_ObjectHideFlags: 0 175 | m_CorrespondingSourceObject: {fileID: 0} 176 | m_PrefabInternal: {fileID: 0} 177 | m_GameObject: {fileID: 170076733} 178 | m_Enabled: 1 179 | serializedVersion: 8 180 | m_Type: 1 181 | m_Color: {r: 1, g: 1, b: 1, a: 1} 182 | m_Intensity: 0.5 183 | m_Range: 10 184 | m_SpotAngle: 30 185 | m_CookieSize: 10 186 | m_Shadows: 187 | m_Type: 0 188 | m_Resolution: -1 189 | m_CustomResolution: -1 190 | m_Strength: 1 191 | m_Bias: 0.05 192 | m_NormalBias: 0.4 193 | m_NearPlane: 0.2 194 | m_Cookie: {fileID: 0} 195 | m_DrawHalo: 0 196 | m_Flare: {fileID: 0} 197 | m_RenderMode: 0 198 | m_CullingMask: 199 | serializedVersion: 2 200 | m_Bits: 4294967295 201 | m_Lightmapping: 4 202 | m_LightShadowCasterMode: 0 203 | m_AreaSize: {x: 1, y: 1} 204 | m_BounceIntensity: 1 205 | m_ColorTemperature: 6570 206 | m_UseColorTemperature: 0 207 | m_ShadowRadius: 0 208 | m_ShadowAngle: 0 209 | --- !u!4 &170076735 210 | Transform: 211 | m_ObjectHideFlags: 0 212 | m_CorrespondingSourceObject: {fileID: 0} 213 | m_PrefabInternal: {fileID: 0} 214 | m_GameObject: {fileID: 170076733} 215 | m_LocalRotation: {x: 0.19936788, y: 0, z: 0, w: 0.97992474} 216 | m_LocalPosition: {x: 0, y: 4.53, z: -7.03} 217 | m_LocalScale: {x: 1, y: 1, z: 1} 218 | m_Children: [] 219 | m_Father: {fileID: 0} 220 | m_RootOrder: 2 221 | m_LocalEulerAnglesHint: {x: 23, y: 0, z: 0} 222 | --- !u!1 &534669902 223 | GameObject: 224 | m_ObjectHideFlags: 0 225 | m_CorrespondingSourceObject: {fileID: 0} 226 | m_PrefabInternal: {fileID: 0} 227 | serializedVersion: 6 228 | m_Component: 229 | - component: {fileID: 534669905} 230 | - component: {fileID: 534669904} 231 | - component: {fileID: 534669903} 232 | m_Layer: 0 233 | m_Name: Main Camera 234 | m_TagString: Untagged 235 | m_Icon: {fileID: 0} 236 | m_NavMeshLayer: 0 237 | m_StaticEditorFlags: 0 238 | m_IsActive: 1 239 | --- !u!81 &534669903 240 | AudioListener: 241 | m_ObjectHideFlags: 0 242 | m_CorrespondingSourceObject: {fileID: 0} 243 | m_PrefabInternal: {fileID: 0} 244 | m_GameObject: {fileID: 534669902} 245 | m_Enabled: 1 246 | --- !u!20 &534669904 247 | Camera: 248 | m_ObjectHideFlags: 0 249 | m_CorrespondingSourceObject: {fileID: 0} 250 | m_PrefabInternal: {fileID: 0} 251 | m_GameObject: {fileID: 534669902} 252 | m_Enabled: 1 253 | serializedVersion: 2 254 | m_ClearFlags: 1 255 | m_BackGroundColor: {r: 1, g: 1, b: 1, a: 0} 256 | m_projectionMatrixMode: 1 257 | m_SensorSize: {x: 36, y: 24} 258 | m_LensShift: {x: 0, y: 0} 259 | m_FocalLength: 50 260 | m_NormalizedViewPortRect: 261 | serializedVersion: 2 262 | x: 0 263 | y: 0 264 | width: 1 265 | height: 1 266 | near clip plane: 0.3 267 | far clip plane: 1000 268 | field of view: 60 269 | orthographic: 0 270 | orthographic size: 5 271 | m_Depth: -1 272 | m_CullingMask: 273 | serializedVersion: 2 274 | m_Bits: 4294967295 275 | m_RenderingPath: -1 276 | m_TargetTexture: {fileID: 0} 277 | m_TargetDisplay: 0 278 | m_TargetEye: 3 279 | m_HDR: 1 280 | m_AllowMSAA: 1 281 | m_AllowDynamicResolution: 0 282 | m_ForceIntoRT: 0 283 | m_OcclusionCulling: 1 284 | m_StereoConvergence: 10 285 | m_StereoSeparation: 0.022 286 | --- !u!4 &534669905 287 | Transform: 288 | m_ObjectHideFlags: 0 289 | m_CorrespondingSourceObject: {fileID: 0} 290 | m_PrefabInternal: {fileID: 0} 291 | m_GameObject: {fileID: 534669902} 292 | m_LocalRotation: {x: 0.06825388, y: -0, z: -0, w: 0.997668} 293 | m_LocalPosition: {x: 0.078, y: 1.34, z: -3.54} 294 | m_LocalScale: {x: 1, y: 1, z: 1} 295 | m_Children: [] 296 | m_Father: {fileID: 0} 297 | m_RootOrder: 1 298 | m_LocalEulerAnglesHint: {x: 7.827, y: 0, z: 0} 299 | --------------------------------------------------------------------------------