Browse Source

init

master
Ken Schaefer 8 months ago
parent
commit
2978dc55da
  1. 9
      Assets/Animation.meta
  2. 9
      Assets/Animation/Clips.meta
  3. 68
      Assets/Animation/Clips/PlayerIdleDown.anim
  4. 9
      Assets/Animation/Clips/PlayerIdleDown.anim.meta
  5. 68
      Assets/Animation/Clips/PlayerIdleHorizontal.anim
  6. 9
      Assets/Animation/Clips/PlayerIdleHorizontal.anim.meta
  7. 68
      Assets/Animation/Clips/PlayerIdleUp.anim
  8. 9
      Assets/Animation/Clips/PlayerIdleUp.anim.meta
  9. 77
      Assets/Animation/Clips/PlayerWalkDown.anim
  10. 9
      Assets/Animation/Clips/PlayerWalkDown.anim.meta
  11. 77
      Assets/Animation/Clips/PlayerWalkHorizontal.anim
  12. 9
      Assets/Animation/Clips/PlayerWalkHorizontal.anim.meta
  13. 77
      Assets/Animation/Clips/PlayerWalkUp.anim
  14. 9
      Assets/Animation/Clips/PlayerWalkUp.anim.meta
  15. 9
      Assets/Animation/Controllers.meta
  16. 446
      Assets/Animation/Controllers/BattleStateMachine.controller
  17. 9
      Assets/Animation/Controllers/BattleStateMachine.controller.meta
  18. 331
      Assets/Animation/Controllers/DragonAI.controller
  19. 9
      Assets/Animation/Controllers/DragonAI.controller.meta
  20. 391
      Assets/Animation/Controllers/PlayerWalking.controller
  21. 9
      Assets/Animation/Controllers/PlayerWalking.controller.meta
  22. 9
      Assets/Audio.meta
  23. 9
      Assets/Prefabs.meta
  24. 9
      Assets/Prefabs/Characters.meta
  25. 100
      Assets/Prefabs/Characters/Dragon.prefab
  26. 9
      Assets/Prefabs/Characters/Dragon.prefab.meta
  27. 198
      Assets/Prefabs/Characters/Player.prefab
  28. 9
      Assets/Prefabs/Characters/Player.prefab.meta
  29. 9
      Assets/Prefabs/Environment.meta
  30. 120
      Assets/Prefabs/Environment/MapPoint.prefab
  31. 9
      Assets/Prefabs/Environment/MapPoint.prefab.meta
  32. 82
      Assets/Prefabs/Environment/Zone.prefab
  33. 9
      Assets/Prefabs/Environment/Zone.prefab.meta
  34. 9
      Assets/Resources.meta
  35. 35
      Assets/Resources/MayorWarning.asset
  36. 9
      Assets/Resources/MayorWarning.asset.meta
  37. 9
      Assets/Scenes.meta
  38. 1233
      Assets/Scenes/BattleScene.unity
  39. 8
      Assets/Scenes/BattleScene.unity.meta
  40. 379
      Assets/Scenes/Campsite.unity
  41. 8
      Assets/Scenes/Campsite.unity.meta
  42. 832
      Assets/Scenes/Overworld.unity
  43. 8
      Assets/Scenes/Overworld.unity.meta
  44. 1877
      Assets/Scenes/Shop.unity
  45. 8
      Assets/Scenes/Shop.unity.meta
  46. 2539
      Assets/Scenes/Town.unity
  47. 8
      Assets/Scenes/Town.unity.meta
  48. 9
      Assets/Scripts.meta
  49. 9
      Assets/Scripts/Classes.meta
  50. 29
      Assets/Scripts/Classes/Entity.cs
  51. 12
      Assets/Scripts/Classes/Entity.cs.meta
  52. 14
      Assets/Scripts/Classes/NPC.cs
  53. 12
      Assets/Scripts/Classes/NPC.cs.meta
  54. 7
      Assets/Scripts/Classes/Player.cs
  55. 12
      Assets/Scripts/Classes/Player.cs.meta
  56. 9
      Assets/Scripts/Combat.meta
  57. 112
      Assets/Scripts/Combat/BattleManager.cs
  58. 12
      Assets/Scripts/Combat/BattleManager.cs.meta
  59. 78
      Assets/Scripts/Combat/RandomBattle.cs
  60. 12
      Assets/Scripts/Combat/RandomBattle.cs.meta
  61. 9
      Assets/Scripts/Conversation.meta
  62. 10
      Assets/Scripts/Conversation/Conversation.cs
  63. 12
      Assets/Scripts/Conversation/Conversation.cs.meta
  64. 10
      Assets/Scripts/Conversation/ConversationComponent.cs
  65. 12
      Assets/Scripts/Conversation/ConversationComponent.cs.meta
  66. 15
      Assets/Scripts/Conversation/ConversationEntry.cs
  67. 12
      Assets/Scripts/Conversation/ConversationEntry.cs.meta
  68. 83
      Assets/Scripts/Conversation/ConversationManager.cs
  69. 12
      Assets/Scripts/Conversation/ConversationManager.cs.meta
  70. 9
      Assets/Scripts/Editor.meta
  71. 15
      Assets/Scripts/Editor/ConversationAssetCreator.cs
  72. 12
      Assets/Scripts/Editor/ConversationAssetCreator.cs.meta
  73. 36
      Assets/Scripts/Editor/CustomAssetUtility.cs
  74. 12
      Assets/Scripts/Editor/CustomAssetUtility.cs.meta
  75. 9
      Assets/Scripts/Game.meta
  76. 56
      Assets/Scripts/Game/GameState.cs
  77. 12
      Assets/Scripts/Game/GameState.cs.meta
  78. 39
      Assets/Scripts/Game/MapPosition.cs
  79. 12
      Assets/Scripts/Game/MapPosition.cs.meta
  80. 9
      Assets/Scripts/Messaging.meta
  81. 17
      Assets/Scripts/Messaging/MessagingClientBroadcast.cs
  82. 12
      Assets/Scripts/Messaging/MessagingClientBroadcast.cs.meta
  83. 26
      Assets/Scripts/Messaging/MessagingClientReceiver.cs
  84. 12
      Assets/Scripts/Messaging/MessagingClientReceiver.cs.meta
  85. 59
      Assets/Scripts/Messaging/MessagingManager.cs
  86. 12
      Assets/Scripts/Messaging/MessagingManager.cs.meta
  87. 9
      Assets/Scripts/Movement.meta
  88. 150
      Assets/Scripts/Movement/CharacterMovement.cs
  89. 12
      Assets/Scripts/Movement/CharacterMovement.cs.meta
  90. 19
      Assets/Scripts/Movement/FollowCamera.cs
  91. 12
      Assets/Scripts/Movement/FollowCamera.cs.meta
  92. 9
      Assets/Scripts/Navigation.meta
  93. 55
      Assets/Scripts/Navigation/NavigationManager.cs
  94. 12
      Assets/Scripts/Navigation/NavigationManager.cs.meta
  95. 68
      Assets/Scripts/Navigation/NavigationPrompt.cs
  96. 12
      Assets/Scripts/Navigation/NavigationPrompt.cs.meta
  97. 25
      Assets/Scripts/Sorting.cs
  98. 12
      Assets/Scripts/Sorting.cs.meta
  99. 9
      Assets/Scripts/Utility.meta
  100. 78
      Assets/Scripts/Utility/Singleton.cs
  101. Some files were not shown because too many files have changed in this diff Show More

9
Assets/Animation.meta

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 7ab91d95b88aca1448de16041ed5ad3b
folderAsset: yes
timeCreated: 1491832299
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

9
Assets/Animation/Clips.meta

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 12d6c8fbb247b4b41bb3f75b747f9bed
folderAsset: yes
timeCreated: 1491832439
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

68
Assets/Animation/Clips/PlayerIdleDown.anim

@ -0,0 +1,68 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!74 &7400000
AnimationClip:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: PlayerIdleDown
serializedVersion: 6
m_Legacy: 0
m_Compressed: 0
m_UseHighQualityCurve: 1
m_RotationCurves: []
m_CompressedRotationCurves: []
m_EulerCurves: []
m_PositionCurves: []
m_ScaleCurves: []
m_FloatCurves: []
m_PPtrCurves:
- curve:
- time: 0
value: {fileID: 21300002, guid: 0f9f661601da5274890d6b9c9897203f, type: 3}
attribute: m_Sprite
path:
classID: 212
script: {fileID: 0}
m_SampleRate: 6
m_WrapMode: 0
m_Bounds:
m_Center: {x: 0, y: 0, z: 0}
m_Extent: {x: 0, y: 0, z: 0}
m_ClipBindingConstant:
genericBindings:
- serializedVersion: 2
path: 0
attribute: 0
script: {fileID: 0}
typeID: 212
customType: 23
isPPtrCurve: 1
pptrCurveMapping:
- {fileID: 21300002, guid: 0f9f661601da5274890d6b9c9897203f, type: 3}
m_AnimationClipSettings:
serializedVersion: 2
m_AdditiveReferencePoseClip: {fileID: 0}
m_AdditiveReferencePoseTime: 0
m_StartTime: 0
m_StopTime: 0.16666667
m_OrientationOffsetY: 0
m_Level: 0
m_CycleOffset: 0
m_HasAdditiveReferencePose: 0
m_LoopTime: 1
m_LoopBlend: 0
m_LoopBlendOrientation: 0
m_LoopBlendPositionY: 0
m_LoopBlendPositionXZ: 0
m_KeepOriginalOrientation: 0
m_KeepOriginalPositionY: 1
m_KeepOriginalPositionXZ: 0
m_HeightFromFeet: 0
m_Mirror: 0
m_EditorCurves: []
m_EulerEditorCurves: []
m_HasGenericRootTransform: 0
m_HasMotionFloatCurves: 0
m_GenerateMotionCurves: 0
m_Events: []

9
Assets/Animation/Clips/PlayerIdleDown.anim.meta

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 5bc8f5d58f3458b4ba8fff665b90ea3e
timeCreated: 1492106852
licenseType: Free
NativeFormatImporter:
mainObjectFileID: 7400000
userData:
assetBundleName:
assetBundleVariant:

68
Assets/Animation/Clips/PlayerIdleHorizontal.anim

@ -0,0 +1,68 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!74 &7400000
AnimationClip:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: PlayerIdleHorizontal
serializedVersion: 6
m_Legacy: 0
m_Compressed: 0
m_UseHighQualityCurve: 1
m_RotationCurves: []
m_CompressedRotationCurves: []
m_EulerCurves: []
m_PositionCurves: []
m_ScaleCurves: []
m_FloatCurves: []
m_PPtrCurves:
- curve:
- time: 0
value: {fileID: 21300008, guid: 0f9f661601da5274890d6b9c9897203f, type: 3}
attribute: m_Sprite
path:
classID: 212
script: {fileID: 0}
m_SampleRate: 6
m_WrapMode: 0
m_Bounds:
m_Center: {x: 0, y: 0, z: 0}
m_Extent: {x: 0, y: 0, z: 0}
m_ClipBindingConstant:
genericBindings:
- serializedVersion: 2
path: 0
attribute: 0
script: {fileID: 0}
typeID: 212
customType: 23
isPPtrCurve: 1
pptrCurveMapping:
- {fileID: 21300008, guid: 0f9f661601da5274890d6b9c9897203f, type: 3}
m_AnimationClipSettings:
serializedVersion: 2
m_AdditiveReferencePoseClip: {fileID: 0}
m_AdditiveReferencePoseTime: 0
m_StartTime: 0
m_StopTime: 0.16666667
m_OrientationOffsetY: 0
m_Level: 0
m_CycleOffset: 0
m_HasAdditiveReferencePose: 0
m_LoopTime: 1
m_LoopBlend: 0
m_LoopBlendOrientation: 0
m_LoopBlendPositionY: 0
m_LoopBlendPositionXZ: 0
m_KeepOriginalOrientation: 0
m_KeepOriginalPositionY: 1
m_KeepOriginalPositionXZ: 0
m_HeightFromFeet: 0
m_Mirror: 0
m_EditorCurves: []
m_EulerEditorCurves: []
m_HasGenericRootTransform: 0
m_HasMotionFloatCurves: 0
m_GenerateMotionCurves: 0
m_Events: []

9
Assets/Animation/Clips/PlayerIdleHorizontal.anim.meta

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 1e041e4e031e1e44080fc5435e0ababd
timeCreated: 1492107671
licenseType: Free
NativeFormatImporter:
mainObjectFileID: 7400000
userData:
assetBundleName:
assetBundleVariant:

68
Assets/Animation/Clips/PlayerIdleUp.anim

@ -0,0 +1,68 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!74 &7400000
AnimationClip:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: PlayerIdleUp
serializedVersion: 6
m_Legacy: 0
m_Compressed: 0
m_UseHighQualityCurve: 1
m_RotationCurves: []
m_CompressedRotationCurves: []
m_EulerCurves: []
m_PositionCurves: []
m_ScaleCurves: []
m_FloatCurves: []
m_PPtrCurves:
- curve:
- time: 0
value: {fileID: 21300014, guid: 0f9f661601da5274890d6b9c9897203f, type: 3}
attribute: m_Sprite
path:
classID: 212
script: {fileID: 0}
m_SampleRate: 6
m_WrapMode: 0
m_Bounds:
m_Center: {x: 0, y: 0, z: 0}
m_Extent: {x: 0, y: 0, z: 0}
m_ClipBindingConstant:
genericBindings:
- serializedVersion: 2
path: 0
attribute: 0
script: {fileID: 0}
typeID: 212
customType: 23
isPPtrCurve: 1
pptrCurveMapping:
- {fileID: 21300014, guid: 0f9f661601da5274890d6b9c9897203f, type: 3}
m_AnimationClipSettings:
serializedVersion: 2
m_AdditiveReferencePoseClip: {fileID: 0}
m_AdditiveReferencePoseTime: 0
m_StartTime: 0
m_StopTime: 0.16666667
m_OrientationOffsetY: 0
m_Level: 0
m_CycleOffset: 0
m_HasAdditiveReferencePose: 0
m_LoopTime: 1
m_LoopBlend: 0
m_LoopBlendOrientation: 0
m_LoopBlendPositionY: 0
m_LoopBlendPositionXZ: 0
m_KeepOriginalOrientation: 0
m_KeepOriginalPositionY: 1
m_KeepOriginalPositionXZ: 0
m_HeightFromFeet: 0
m_Mirror: 0
m_EditorCurves: []
m_EulerEditorCurves: []
m_HasGenericRootTransform: 0
m_HasMotionFloatCurves: 0
m_GenerateMotionCurves: 0
m_Events: []

9
Assets/Animation/Clips/PlayerIdleUp.anim.meta

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: e5a000827c404104ca0c1b8f99c607ff
timeCreated: 1492107634
licenseType: Free
NativeFormatImporter:
mainObjectFileID: 7400000
userData:
assetBundleName:
assetBundleVariant:

77
Assets/Animation/Clips/PlayerWalkDown.anim

@ -0,0 +1,77 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!74 &7400000
AnimationClip:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: PlayerWalkDown
serializedVersion: 6
m_Legacy: 0
m_Compressed: 0
m_UseHighQualityCurve: 1
m_RotationCurves: []
m_CompressedRotationCurves: []
m_EulerCurves: []
m_PositionCurves: []
m_ScaleCurves: []
m_FloatCurves: []
m_PPtrCurves:
- curve:
- time: 0
value: {fileID: 21300000, guid: 0f9f661601da5274890d6b9c9897203f, type: 3}
- time: 0.16666667
value: {fileID: 21300002, guid: 0f9f661601da5274890d6b9c9897203f, type: 3}
- time: 0.33333334
value: {fileID: 21300004, guid: 0f9f661601da5274890d6b9c9897203f, type: 3}
- time: 0.5
value: {fileID: 21300002, guid: 0f9f661601da5274890d6b9c9897203f, type: 3}
attribute: m_Sprite
path:
classID: 212
script: {fileID: 0}
m_SampleRate: 6
m_WrapMode: 0
m_Bounds:
m_Center: {x: 0, y: 0, z: 0}
m_Extent: {x: 0, y: 0, z: 0}
m_ClipBindingConstant:
genericBindings:
- serializedVersion: 2
path: 0
attribute: 0
script: {fileID: 0}
typeID: 212
customType: 23
isPPtrCurve: 1
pptrCurveMapping:
- {fileID: 21300000, guid: 0f9f661601da5274890d6b9c9897203f, type: 3}
- {fileID: 21300002, guid: 0f9f661601da5274890d6b9c9897203f, type: 3}
- {fileID: 21300004, guid: 0f9f661601da5274890d6b9c9897203f, type: 3}
- {fileID: 21300002, guid: 0f9f661601da5274890d6b9c9897203f, type: 3}
m_AnimationClipSettings:
serializedVersion: 2
m_AdditiveReferencePoseClip: {fileID: 0}
m_AdditiveReferencePoseTime: 0
m_StartTime: 0
m_StopTime: 0.6666667
m_OrientationOffsetY: 0
m_Level: 0
m_CycleOffset: 0
m_HasAdditiveReferencePose: 0
m_LoopTime: 1
m_LoopBlend: 0
m_LoopBlendOrientation: 0
m_LoopBlendPositionY: 0
m_LoopBlendPositionXZ: 0
m_KeepOriginalOrientation: 0
m_KeepOriginalPositionY: 1
m_KeepOriginalPositionXZ: 0
m_HeightFromFeet: 0
m_Mirror: 0
m_EditorCurves: []
m_EulerEditorCurves: []
m_HasGenericRootTransform: 0
m_HasMotionFloatCurves: 0
m_GenerateMotionCurves: 0
m_Events: []

9
Assets/Animation/Clips/PlayerWalkDown.anim.meta

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 26644fee32db91946bd88c874b57ca28
timeCreated: 1492106852
licenseType: Free
NativeFormatImporter:
mainObjectFileID: 7400000
userData:
assetBundleName:
assetBundleVariant:

77
Assets/Animation/Clips/PlayerWalkHorizontal.anim

@ -0,0 +1,77 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!74 &7400000
AnimationClip:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: PlayerWalkHorizontal
serializedVersion: 6
m_Legacy: 0
m_Compressed: 0
m_UseHighQualityCurve: 1
m_RotationCurves: []
m_CompressedRotationCurves: []
m_EulerCurves: []
m_PositionCurves: []
m_ScaleCurves: []
m_FloatCurves: []
m_PPtrCurves:
- curve:
- time: 0
value: {fileID: 21300006, guid: 0f9f661601da5274890d6b9c9897203f, type: 3}
- time: 0.16666667
value: {fileID: 21300008, guid: 0f9f661601da5274890d6b9c9897203f, type: 3}
- time: 0.33333334
value: {fileID: 21300010, guid: 0f9f661601da5274890d6b9c9897203f, type: 3}
- time: 0.5
value: {fileID: 21300008, guid: 0f9f661601da5274890d6b9c9897203f, type: 3}
attribute: m_Sprite
path:
classID: 212
script: {fileID: 0}
m_SampleRate: 6
m_WrapMode: 0
m_Bounds:
m_Center: {x: 0, y: 0, z: 0}
m_Extent: {x: 0, y: 0, z: 0}
m_ClipBindingConstant:
genericBindings:
- serializedVersion: 2
path: 0
attribute: 0
script: {fileID: 0}
typeID: 212
customType: 23
isPPtrCurve: 1
pptrCurveMapping:
- {fileID: 21300006, guid: 0f9f661601da5274890d6b9c9897203f, type: 3}
- {fileID: 21300008, guid: 0f9f661601da5274890d6b9c9897203f, type: 3}
- {fileID: 21300010, guid: 0f9f661601da5274890d6b9c9897203f, type: 3}
- {fileID: 21300008, guid: 0f9f661601da5274890d6b9c9897203f, type: 3}
m_AnimationClipSettings:
serializedVersion: 2
m_AdditiveReferencePoseClip: {fileID: 0}
m_AdditiveReferencePoseTime: 0
m_StartTime: 0
m_StopTime: 0.6666667
m_OrientationOffsetY: 0
m_Level: 0
m_CycleOffset: 0
m_HasAdditiveReferencePose: 0
m_LoopTime: 1
m_LoopBlend: 0
m_LoopBlendOrientation: 0
m_LoopBlendPositionY: 0
m_LoopBlendPositionXZ: 0
m_KeepOriginalOrientation: 0
m_KeepOriginalPositionY: 1
m_KeepOriginalPositionXZ: 0
m_HeightFromFeet: 0
m_Mirror: 0
m_EditorCurves: []
m_EulerEditorCurves: []
m_HasGenericRootTransform: 0
m_HasMotionFloatCurves: 0
m_GenerateMotionCurves: 0
m_Events: []

9
Assets/Animation/Clips/PlayerWalkHorizontal.anim.meta

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 8d437033082431e4987af496ec3b74e7
timeCreated: 1492107671
licenseType: Free
NativeFormatImporter:
mainObjectFileID: 7400000
userData:
assetBundleName:
assetBundleVariant:

77
Assets/Animation/Clips/PlayerWalkUp.anim

@ -0,0 +1,77 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!74 &7400000
AnimationClip:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: PlayerWalkUp
serializedVersion: 6
m_Legacy: 0
m_Compressed: 0
m_UseHighQualityCurve: 1
m_RotationCurves: []
m_CompressedRotationCurves: []
m_EulerCurves: []
m_PositionCurves: []
m_ScaleCurves: []
m_FloatCurves: []
m_PPtrCurves:
- curve:
- time: 0
value: {fileID: 21300012, guid: 0f9f661601da5274890d6b9c9897203f, type: 3}
- time: 0.16666667
value: {fileID: 21300014, guid: 0f9f661601da5274890d6b9c9897203f, type: 3}
- time: 0.33333334
value: {fileID: 21300016, guid: 0f9f661601da5274890d6b9c9897203f, type: 3}
- time: 0.5
value: {fileID: 21300014, guid: 0f9f661601da5274890d6b9c9897203f, type: 3}
attribute: m_Sprite
path:
classID: 212
script: {fileID: 0}
m_SampleRate: 6
m_WrapMode: 0
m_Bounds:
m_Center: {x: 0, y: 0, z: 0}
m_Extent: {x: 0, y: 0, z: 0}
m_ClipBindingConstant:
genericBindings:
- serializedVersion: 2
path: 0
attribute: 0
script: {fileID: 0}
typeID: 212
customType: 23
isPPtrCurve: 1
pptrCurveMapping:
- {fileID: 21300012, guid: 0f9f661601da5274890d6b9c9897203f, type: 3}
- {fileID: 21300014, guid: 0f9f661601da5274890d6b9c9897203f, type: 3}
- {fileID: 21300016, guid: 0f9f661601da5274890d6b9c9897203f, type: 3}
- {fileID: 21300014, guid: 0f9f661601da5274890d6b9c9897203f, type: 3}
m_AnimationClipSettings:
serializedVersion: 2
m_AdditiveReferencePoseClip: {fileID: 0}
m_AdditiveReferencePoseTime: 0
m_StartTime: 0
m_StopTime: 0.6666667
m_OrientationOffsetY: 0
m_Level: 0
m_CycleOffset: 0
m_HasAdditiveReferencePose: 0
m_LoopTime: 1
m_LoopBlend: 0
m_LoopBlendOrientation: 0
m_LoopBlendPositionY: 0
m_LoopBlendPositionXZ: 0
m_KeepOriginalOrientation: 0
m_KeepOriginalPositionY: 1
m_KeepOriginalPositionXZ: 0
m_HeightFromFeet: 0
m_Mirror: 0
m_EditorCurves: []
m_EulerEditorCurves: []
m_HasGenericRootTransform: 0
m_HasMotionFloatCurves: 0
m_GenerateMotionCurves: 0
m_Events: []

9
Assets/Animation/Clips/PlayerWalkUp.anim.meta

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 1edfb824ceaebf34b8bc8687b985cbc5
timeCreated: 1492107634
licenseType: Free
NativeFormatImporter:
mainObjectFileID: 7400000
userData:
assetBundleName:
assetBundleVariant:

9
Assets/Animation/Controllers.meta

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: ef16ceaee04f07349809b4e387e7f1c1
folderAsset: yes
timeCreated: 1491832446
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

446
Assets/Animation/Controllers/BattleStateMachine.controller

@ -0,0 +1,446 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!91 &9100000
AnimatorController:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: BattleStateMachine
serializedVersion: 5
m_AnimatorParameters:
- m_Name: BattleReady
m_Type: 4
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 0}
- m_Name: PlayerReady
m_Type: 4
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 0}
m_AnimatorLayers:
- serializedVersion: 5
m_Name: Base Layer
m_StateMachine: {fileID: 1107102490797773586}
m_Mask: {fileID: 0}
m_Motions: []
m_Behaviours: []
m_BlendingMode: 0
m_SyncedLayerIndex: -1
m_DefaultWeight: 0
m_IKPass: 0
m_SyncedLayerAffectsTiming: 0
m_Controller: {fileID: 9100000}
--- !u!1101 &1101316965605283288
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name:
m_Conditions:
- m_ConditionMode: 1
m_ConditionEvent: BattleReady
m_EventTreshold: 0
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 1102394036966003750}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0
m_TransitionOffset: 0
m_ExitTime: 0.75
m_HasExitTime: 0
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &1101417417823028304
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name:
m_Conditions: []
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 1102557942726930434}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 2
m_TransitionOffset: 0
m_ExitTime: 0.9
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &1101453930865512774
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name:
m_Conditions:
- m_ConditionMode: 1
m_ConditionEvent: PlayerReady
m_EventTreshold: 0
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 1102123260862795514}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0
m_TransitionOffset: 0
m_ExitTime: 0.75
m_HasExitTime: 0
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &1101538149509266640
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name:
m_Conditions:
- m_ConditionMode: 2
m_ConditionEvent: PlayerReady
m_EventTreshold: 0
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 1102615368341266184}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 2
m_TransitionOffset: 0
m_ExitTime: 0.75
m_HasExitTime: 0
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &1101583053815075932
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name:
m_Conditions: []
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 1102854545028146144}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.75
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &1101627873717349546
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name:
m_Conditions: []
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 1102386169586455834}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.75
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &1101916100871794892
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name:
m_Conditions: []
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 1102557942726930434}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.75
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &1101959084395419574
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name:
m_Conditions: []
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 1102026316029117520}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.75
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1102 &1102026316029117520
AnimatorState:
serializedVersion: 5
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Battle_End
m_Speed: 1
m_CycleOffset: 0
m_Transitions: []
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_Motion: {fileID: 0}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
--- !u!1102 &1102123260862795514
AnimatorState:
serializedVersion: 5
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Player_Attack
m_Speed: 1
m_CycleOffset: 0
m_Transitions:
- {fileID: 1101538149509266640}
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_Motion: {fileID: 0}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
--- !u!1102 &1102188976221899628
AnimatorState:
serializedVersion: 5
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Begin_Battle
m_Speed: 1
m_CycleOffset: 0
m_Transitions:
- {fileID: 1101316965605283288}
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_Motion: {fileID: 0}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
--- !u!1102 &1102386169586455834
AnimatorState:
serializedVersion: 5
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Enemy_Attack
m_Speed: 1
m_CycleOffset: 0
m_Transitions:
- {fileID: 1101916100871794892}
- {fileID: 1101583053815075932}
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_Motion: {fileID: 0}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
--- !u!1102 &1102394036966003750
AnimatorState:
serializedVersion: 5
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Intro
m_Speed: 1
m_CycleOffset: 0
m_Transitions:
- {fileID: 1101417417823028304}
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_Motion: {fileID: 0}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
--- !u!1102 &1102557942726930434
AnimatorState:
serializedVersion: 5
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Player_Move
m_Speed: 1
m_CycleOffset: 0
m_Transitions:
- {fileID: 1101453930865512774}
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_Motion: {fileID: 0}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
--- !u!1102 &1102615368341266184
AnimatorState:
serializedVersion: 5
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Change_Control
m_Speed: 1
m_CycleOffset: 0
m_Transitions:
- {fileID: 1101627873717349546}
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_Motion: {fileID: 0}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
--- !u!1102 &1102854545028146144
AnimatorState:
serializedVersion: 5
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Battle_Result
m_Speed: 1
m_CycleOffset: 0
m_Transitions:
- {fileID: 1101959084395419574}
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_Motion: {fileID: 0}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
--- !u!1107 &1107102490797773586
AnimatorStateMachine:
serializedVersion: 5
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Base Layer
m_ChildStates:
- serializedVersion: 1
m_State: {fileID: 1102188976221899628}
m_Position: {x: 24, y: 24, z: 0}
- serializedVersion: 1
m_State: {fileID: 1102394036966003750}
m_Position: {x: 24, y: 108, z: 0}
- serializedVersion: 1
m_State: {fileID: 1102557942726930434}
m_Position: {x: 24, y: 180, z: 0}
- serializedVersion: 1
m_State: {fileID: 1102123260862795514}
m_Position: {x: 24, y: 252, z: 0}
- serializedVersion: 1
m_State: {fileID: 1102615368341266184}
m_Position: {x: 360, y: 252, z: 0}
- serializedVersion: 1
m_State: {fileID: 1102386169586455834}
m_Position: {x: 360, y: 180, z: 0}
- serializedVersion: 1
m_State: {fileID: 1102854545028146144}
m_Position: {x: 360, y: 108, z: 0}
- serializedVersion: 1
m_State: {fileID: 1102026316029117520}
m_Position: {x: 360, y: 24, z: 0}
m_ChildStateMachines: []
m_AnyStateTransitions: []
m_EntryTransitions: []
m_StateMachineTransitions: {}
m_StateMachineBehaviours: []
m_AnyStatePosition: {x: 48, y: -120, z: 0}
m_EntryPosition: {x: 48, y: -72, z: 0}
m_ExitPosition: {x: 800, y: 120, z: 0}
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
m_DefaultState: {fileID: 1102188976221899628}

9
Assets/Animation/Controllers/BattleStateMachine.controller.meta

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 914e16e39484f07489821460858fe6b3
timeCreated: 1493478971
licenseType: Free
NativeFormatImporter:
mainObjectFileID: 9100000
userData:
assetBundleName:
assetBundleVariant:

331
Assets/Animation/Controllers/DragonAI.controller

@ -0,0 +1,331 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!91 &9100000
AnimatorController:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: DragonAI
serializedVersion: 5
m_AnimatorParameters:
- m_Name: EnemiesInBattle
m_Type: 3
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 9100000}
- m_Name: PlayerHealth
m_Type: 3
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 9100000}
- m_Name: EnemyHealth
m_Type: 3
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 9100000}
- m_Name: PlayerSeen
m_Type: 4
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 9100000}
- m_Name: PlayerAttacking
m_Type: 4
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 9100000}
m_AnimatorLayers:
- serializedVersion: 5
m_Name: Base Layer
m_StateMachine: {fileID: 1107397448436086772}
m_Mask: {fileID: 0}
m_Motions: []
m_Behaviours: []
m_BlendingMode: 0
m_SyncedLayerIndex: -1
m_DefaultWeight: 0
m_IKPass: 0
m_SyncedLayerAffectsTiming: 0
m_Controller: {fileID: 9100000}
--- !u!1101 &1101261133991098308
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name:
m_Conditions:
- m_ConditionMode: 1
m_ConditionEvent: PlayerSeen
m_EventTreshold: 0
- m_ConditionMode: 1
m_ConditionEvent: PlayerAttacking
m_EventTreshold: 0
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 1102352588190101760}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.75
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &1101271460156492494
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name:
m_Conditions:
- m_ConditionMode: 1
m_ConditionEvent: PlayerAttacking
m_EventTreshold: 0
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 1102352588190101760}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.75
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &1101418582764014030
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name:
m_Conditions:
- m_ConditionMode: 2
m_ConditionEvent: PlayerSeen
m_EventTreshold: 0
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 1102303184898610616}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.75
m_HasExitTime: 0
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &1101484260453200870
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name:
m_Conditions:
- m_ConditionMode: 4
m_ConditionEvent: EnemyHealth
m_EventTreshold: 2
- m_ConditionMode: 3
m_ConditionEvent: PlayerHealth
m_EventTreshold: 2
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 1102351793517724920}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.75
m_HasExitTime: 0
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &1101540202942083162
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name:
m_Conditions:
- m_ConditionMode: 1
m_ConditionEvent: PlayerSeen
m_EventTreshold: 0
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 1102253941702296236}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.75
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &1101593953885683004
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name:
m_Conditions:
- m_ConditionMode: 2
m_ConditionEvent: PlayerAttacking
m_EventTreshold: 0
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 1102253941702296236}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.75
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1102 &1102253941702296236
AnimatorState:
serializedVersion: 5
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Attack
m_Speed: 1
m_CycleOffset: 0
m_Transitions:
- {fileID: 1101271460156492494}
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_Motion: {fileID: 0}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
--- !u!1102 &1102303184898610616
AnimatorState:
serializedVersion: 5
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Idle
m_Speed: 1
m_CycleOffset: 0
m_Transitions:
- {fileID: 1101540202942083162}
- {fileID: 1101261133991098308}
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_Motion: {fileID: 0}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
--- !u!1102 &1102351793517724920
AnimatorState:
serializedVersion: 5
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Run Away
m_Speed: 1
m_CycleOffset: 0
m_Transitions: []
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_Motion: {fileID: 0}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
--- !u!1102 &1102352588190101760
AnimatorState:
serializedVersion: 5
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Defend
m_Speed: 1
m_CycleOffset: 0
m_Transitions:
- {fileID: 1101593953885683004}
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_Motion: {fileID: 0}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
--- !u!1107 &1107397448436086772
AnimatorStateMachine:
serializedVersion: 5
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Base Layer
m_ChildStates:
- serializedVersion: 1
m_State: {fileID: 1102303184898610616}
m_Position: {x: 300, y: 120, z: 0}
- serializedVersion: 1
m_State: {fileID: 1102351793517724920}
m_Position: {x: 552, y: -24, z: 0}
- serializedVersion: 1
m_State: {fileID: 1102253941702296236}
m_Position: {x: 552, y: 48, z: 0}
- serializedVersion: 1
m_State: {fileID: 1102352588190101760}
m_Position: {x: 552, y: 120, z: 0}
m_ChildStateMachines: []
m_AnyStateTransitions:
- {fileID: 1101418582764014030}
- {fileID: 1101484260453200870}
m_EntryTransitions: []
m_StateMachineTransitions: {}
m_StateMachineBehaviours: []
m_AnyStatePosition: {x: 50, y: 20, z: 0}
m_EntryPosition: {x: 50, y: 120, z: 0}
m_ExitPosition: {x: 800, y: 120, z: 0}
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
m_DefaultState: {fileID: 1102303184898610616}

9
Assets/Animation/Controllers/DragonAI.controller.meta

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 29daa16c50b7a7b4abe090dfb4a0d9b7
timeCreated: 1493148308
licenseType: Free
NativeFormatImporter:
mainObjectFileID: 9100000
userData:
assetBundleName:
assetBundleVariant:

391
Assets/Animation/Controllers/PlayerWalking.controller

@ -0,0 +1,391 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!91 &9100000
AnimatorController:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: PlayerWalking
serializedVersion: 5
m_AnimatorParameters:
- m_Name: yMove
m_Type: 3
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 9100000}
- m_Name: xMove
m_Type: 4
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 9100000}
- m_Name: moving
m_Type: 4
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 9100000}
m_AnimatorLayers:
- serializedVersion: 5
m_Name: Base Layer
m_StateMachine: {fileID: 1107890595991759778}
m_Mask: {fileID: 0}
m_Motions: []
m_Behaviours: []
m_BlendingMode: 0
m_SyncedLayerIndex: -1
m_DefaultWeight: 0
m_IKPass: 0
m_SyncedLayerAffectsTiming: 0
m_Controller: {fileID: 9100000}
--- !u!1101 &1101085009431393390
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name:
m_Conditions:
- m_ConditionMode: 2
m_ConditionEvent: moving
m_EventTreshold: 0
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 1102914916814759816}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.04962409
m_TransitionOffset: 0.009022591
m_ExitTime: 0.5505639
m_HasExitTime: 0
m_HasFixedDuration: 0
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &1101144097786403774
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name:
m_Conditions:
- m_ConditionMode: 3
m_ConditionEvent: yMove
m_EventTreshold: 0
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 1102648771246858236}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0
m_TransitionOffset: 0
m_ExitTime: 0.75
m_HasExitTime: 0
m_HasFixedDuration: 0
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 0
--- !u!1101 &1101294795735174928
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name:
m_Conditions:
- m_ConditionMode: 2
m_ConditionEvent: moving
m_EventTreshold: 0
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 1102276271826807790}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0
m_TransitionOffset: 0
m_ExitTime: 0.625
m_HasExitTime: 0
m_HasFixedDuration: 0
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &1101584986129284568
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name:
m_Conditions:
- m_ConditionMode: 2
m_ConditionEvent: moving
m_EventTreshold: 0
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 1102306103706578614}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0
m_TransitionOffset: 0
m_ExitTime: 0.625
m_HasExitTime: 0
m_HasFixedDuration: 0
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &1101772405139431624
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name:
m_Conditions:
- m_ConditionMode: 4
m_ConditionEvent: yMove
m_EventTreshold: 0
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 1102055965327651298}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0
m_TransitionOffset: 0
m_ExitTime: 0.75
m_HasExitTime: 0
m_HasFixedDuration: 0
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 0
--- !u!1101 &1101990229557036232
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name:
m_Conditions:
- m_ConditionMode: 1
m_ConditionEvent: xMove
m_EventTreshold: 0
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 1102814510101434362}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0
m_TransitionOffset: 0
m_ExitTime: 0.75
m_HasExitTime: 0
m_HasFixedDuration: 0
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 0
--- !u!1102 &1102055965327651298
AnimatorState:
serializedVersion: 5
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: PlayerWalkDown
m_Speed: 1
m_CycleOffset: 0
m_Transitions:
- {fileID: 1101085009431393390}
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_Motion: {fileID: 7400000, guid: 26644fee32db91946bd88c874b57ca28, type: 2}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
--- !u!1102 &1102129950369880066
AnimatorState:
serializedVersion: 5
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: PlayerStandDown
m_Speed: 1
m_CycleOffset: 0
m_Transitions: []
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_Motion: {fileID: 0}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
--- !u!1102 &1102276271826807790
AnimatorState:
serializedVersion: 5
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: PlayerIdleHorizontal
m_Speed: 1
m_CycleOffset: 0
m_Transitions: []
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_Motion: {fileID: 7400000, guid: 1e041e4e031e1e44080fc5435e0ababd, type: 2}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
--- !u!1102 &1102306103706578614
AnimatorState:
serializedVersion: 5
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: PlayerIdleUp
m_Speed: 1
m_CycleOffset: 0
m_Transitions: []
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_Motion: {fileID: 7400000, guid: e5a000827c404104ca0c1b8f99c607ff, type: 2}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
--- !u!1102 &1102648771246858236
AnimatorState:
serializedVersion: 5
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: PlayerWalkUp
m_Speed: 1
m_CycleOffset: 0
m_Transitions:
- {fileID: 1101584986129284568}
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_Motion: {fileID: 7400000, guid: 1edfb824ceaebf34b8bc8687b985cbc5, type: 2}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
--- !u!1102 &1102814510101434362
AnimatorState:
serializedVersion: 5
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: PlayerWalkHorizontal
m_Speed: 1
m_CycleOffset: 0
m_Transitions:
- {fileID: 1101294795735174928}
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_Motion: {fileID: 7400000, guid: 8d437033082431e4987af496ec3b74e7, type: 2}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
--- !u!1102 &1102914916814759816
AnimatorState:
serializedVersion: 5
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: PlayerIdleDown
m_Speed: 1
m_CycleOffset: 0
m_Transitions: []
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_Motion: {fileID: 7400000, guid: 5bc8f5d58f3458b4ba8fff665b90ea3e, type: 2}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
--- !u!1107 &1107890595991759778
AnimatorStateMachine:
serializedVersion: 5
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Base Layer
m_ChildStates:
- serializedVersion: 1
m_State: {fileID: 1102055965327651298}
m_Position: {x: 300, y: -96, z: 0}
- serializedVersion: 1
m_State: {fileID: 1102129950369880066}
m_Position: {x: 300, y: 120, z: 0}
- serializedVersion: 1
m_State: {fileID: 1102648771246858236}
m_Position: {x: 300, y: -24, z: 0}
- serializedVersion: 1
m_State: {fileID: 1102814510101434362}
m_Position: {x: 300, y: 48, z: 0}
- serializedVersion: 1
m_State: {fileID: 1102914916814759816}
m_Position: {x: 576, y: -96, z: 0}
- serializedVersion: 1
m_State: {fileID: 1102276271826807790}
m_Position: {x: 576, y: 48, z: 0}
- serializedVersion: 1
m_State: {fileID: 1102306103706578614}
m_Position: {x: 576, y: -24, z: 0}
m_ChildStateMachines: []
m_AnyStateTransitions:
- {fileID: 1101772405139431624}
- {fileID: 1101144097786403774}
- {fileID: 1101990229557036232}
m_EntryTransitions: []
m_StateMachineTransitions: {}
m_StateMachineBehaviours: []
m_AnyStatePosition: {x: 48, y: -12, z: 0}
m_EntryPosition: {x: 50, y: 120, z: 0}
m_ExitPosition: {x: 800, y: 120, z: 0}
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
m_DefaultState: {fileID: 1102129950369880066}

9
Assets/Animation/Controllers/PlayerWalking.controller.meta

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 073d8c13d4b2b4349bcf9dc6feabf88a
timeCreated: 1492106852
licenseType: Free
NativeFormatImporter:
mainObjectFileID: 9100000
userData:
assetBundleName:
assetBundleVariant:

9
Assets/Audio.meta

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: d4e940a822fb8914781c1a5cbfabd872
folderAsset: yes
timeCreated: 1491832305
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

9
Assets/Prefabs.meta

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: b68851cd10ef3df41a14331a848358bb
folderAsset: yes
timeCreated: 1491832412
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

9
Assets/Prefabs/Characters.meta

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: a1b12348ca444ac468036a09b3648a9f
folderAsset: yes
timeCreated: 1491832479
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

100
Assets/Prefabs/Characters/Dragon.prefab

@ -0,0 +1,100 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1001 &100100000
Prefab:
m_ObjectHideFlags: 1
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications: []
m_RemovedComponents: []
m_ParentPrefab: {fileID: 0}
m_RootGameObject: {fileID: 1686984086465254}
m_IsPrefabParent: 1
--- !u!1 &1686984086465254
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_Component:
- component: {fileID: 4007554439924928}
- component: {fileID: 212438167125511406}
- component: {fileID: 95215297859355316}
m_Layer: 0
m_Name: Dragon
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &4007554439924928
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1686984086465254}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.5, y: 0.5, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!95 &95215297859355316
Animator:
serializedVersion: 3
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1686984086465254}
m_Enabled: 1
m_Avatar: {fileID: 0}
m_Controller: {fileID: 9100000, guid: 29daa16c50b7a7b4abe090dfb4a0d9b7, type: 2}
m_CullingMode: 0
m_UpdateMode: 0
m_ApplyRootMotion: 0
m_LinearVelocityBlending: 0
m_WarningMessage:
m_HasTransformHierarchy: 1
m_AllowConstantClipSamplingOptimization: 1
--- !u!212 &212438167125511406
SpriteRenderer:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1686984086465254}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_Materials:
- {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_SelectedEditorRenderState: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 563150655
m_SortingLayer: 2
m_SortingOrder: 0
m_Sprite: {fileID: 21300000, guid: 106b608590cd73840a33aea859004a50, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_FlipX: 0
m_FlipY: 0
m_DrawMode: 0
m_Size: {x: 4.39, y: 2.27}
m_AdaptiveModeThreshold: 0.5
m_SpriteTileMode: 0

9
Assets/Prefabs/Characters/Dragon.prefab.meta

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 62b5cab7d5bec984882708db13202044
timeCreated: 1493149433
licenseType: Free
NativeFormatImporter:
mainObjectFileID: 100100000
userData:
assetBundleName:
assetBundleVariant:

198
Assets/Prefabs/Characters/Player.prefab

@ -0,0 +1,198 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1001 &100100000
Prefab:
m_ObjectHideFlags: 1
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications: []
m_RemovedComponents: []
m_ParentPrefab: {fileID: 0}
m_RootGameObject: {fileID: 1786929220422034}
m_IsPrefabParent: 1
--- !u!1 &1786929220422034
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_Component:
- component: {fileID: 4050560241422700}
- component: {fileID: 212435432280584192}
- component: {fileID: 50920194378828502}
- component: {fileID: 61563769951088544}
- component: {fileID: 61335781612626552}
- component: {fileID: 95166761000550592}
- component: {fileID: 114532571001185710}
- component: {fileID: 114959188820548700}
m_Layer: 0
m_Name: Player
m_TagString: Player
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &4050560241422700
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1786929220422034}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: -4.42, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!50 &50920194378828502
Rigidbody2D:
serializedVersion: 4
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1786929220422034}
m_BodyType: 0
m_Simulated: 1
m_UseFullKinematicContacts: 0
m_UseAutoMass: 0
m_Mass: 1
m_LinearDrag: 0
m_AngularDrag: 0.05
m_GravityScale: 0
m_Material: {fileID: 0}
m_Interpolate: 0
m_SleepingMode: 1
m_CollisionDetection: 0
m_Constraints: 4
--- !u!61 &61335781612626552
BoxCollider2D:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1786929220422034}
m_Enabled: 1
m_Density: 1
m_Material: {fileID: 0}
m_IsTrigger: 0
m_UsedByEffector: 0
m_UsedByComposite: 0
m_Offset: {x: 0, y: 0.765}
m_SpriteTilingProperty:
border: {x: 0, y: 0, z: 0, w: 0}
pivot: {x: 0.5, y: 0}
oldSize: {x: 1.2, y: 1.53}
newSize: {x: 1.2, y: 1.53}
adaptiveTilingThreshold: 0.5
drawMode: 0
adaptiveTiling: 0
m_AutoTiling: 0
serializedVersion: 2
m_Size: {x: 1.2, y: 1.53}
m_EdgeRadius: 0
--- !u!61 &61563769951088544
BoxCollider2D:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1786929220422034}
m_Enabled: 1
m_Density: 1
m_Material: {fileID: 0}
m_IsTrigger: 1
m_UsedByEffector: 0
m_UsedByComposite: 0
m_Offset: {x: 0, y: 0.765}
m_SpriteTilingProperty:
border: {x: 0, y: 0, z: 0, w: 0}
pivot: {x: 0.5, y: 0}
oldSize: {x: 1.2, y: 1.53}
newSize: {x: 1.2, y: 1.53}
adaptiveTilingThreshold: 0.5
drawMode: 0
adaptiveTiling: 0
m_AutoTiling: 0
serializedVersion: 2
m_Size: {x: 1.2, y: 1.53}
m_EdgeRadius: 0
--- !u!95 &95166761000550592
Animator:
serializedVersion: 3
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1786929220422034}
m_Enabled: 1
m_Avatar: {fileID: 0}
m_Controller: {fileID: 9100000, guid: 073d8c13d4b2b4349bcf9dc6feabf88a, type: 2}
m_CullingMode: 0
m_UpdateMode: 0
m_ApplyRootMotion: 0
m_LinearVelocityBlending: 0
m_WarningMessage:
m_HasTransformHierarchy: 1
m_AllowConstantClipSamplingOptimization: 1
--- !u!114 &114532571001185710
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1786929220422034}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fdbdfe5bac8dd85419ad1e1c291c20a2, type: 3}
m_Name:
m_EditorClassIdentifier:
speed: 4
--- !u!114 &114959188820548700
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1786929220422034}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 41a9009d10bfc13458ddba5d973c5597, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!212 &212435432280584192
SpriteRenderer:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1786929220422034}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_Materials:
- {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_SelectedEditorRenderState: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 563150655
m_SortingLayer: 2
m_SortingOrder: 0
m_Sprite: {fileID: 21300002, guid: 0f9f661601da5274890d6b9c9897203f, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_FlipX: 0
m_FlipY: 0
m_DrawMode: 0
m_Size: {x: 1.2, y: 1.53}
m_AdaptiveModeThreshold: 0.5
m_SpriteTileMode: 0

9
Assets/Prefabs/Characters/Player.prefab.meta

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 95d488ac80a938a408cfac528ca39a60
timeCreated: 1492637007
licenseType: Free
NativeFormatImporter:
mainObjectFileID: 100100000
userData:
assetBundleName:
assetBundleVariant:

9
Assets/Prefabs/Environment.meta

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: a76eaaf63d9502d4f8e25b088c1a4d2f
folderAsset: yes
timeCreated: 1491832486
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

120
Assets/Prefabs/Environment/MapPoint.prefab

@ -0,0 +1,120 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1001 &100100000
Prefab:
m_ObjectHideFlags: 1
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications: []
m_RemovedComponents: []
m_ParentPrefab: {fileID: 0}
m_RootGameObject: {fileID: 1753432946590668}
m_IsPrefabParent: 1
--- !u!1 &1753432946590668
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_Component:
- component: {fileID: 4767908380614790}
- component: {fileID: 212498469537218090}
- component: {fileID: 61667733951181070}
- component: {fileID: 114018739340795734}
m_Layer: 0
m_Name: MapPoint
m_TagString: Town
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &4767908380614790
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1753432946590668}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: -5.3, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!61 &61667733951181070
BoxCollider2D:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1753432946590668}
m_Enabled: 1
m_Density: 1
m_Material: {fileID: 0}
m_IsTrigger: 1
m_UsedByEffector: 0
m_UsedByComposite: 0
m_Offset: {x: 0, y: 0}
m_SpriteTilingProperty:
border: {x: 0, y: 0, z: 0, w: 0}
pivot: {x: 0.5, y: 0.5}
oldSize: {x: 1.2, y: 1.4}
newSize: {x: 1.2, y: 1.4}
adaptiveTilingThreshold: 0.5
drawMode: 0
adaptiveTiling: 0
m_AutoTiling: 0
serializedVersion: 2
m_Size: {x: 1.2, y: 1.4}
m_EdgeRadius: 0
--- !u!114 &114018739340795734
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1753432946590668}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 59688b613ac30504d9689ded15fc5350, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!212 &212498469537218090
SpriteRenderer:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1753432946590668}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_Materials:
- {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_SelectedEditorRenderState: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 1
m_Sprite: {fileID: 21300000, guid: c03faaa402f2d1f4cb097d01d27c3a4e, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_FlipX: 0
m_FlipY: 0
m_DrawMode: 0
m_Size: {x: 1.2, y: 1.4}
m_AdaptiveModeThreshold: 0.5
m_SpriteTileMode: 0

9
Assets/Prefabs/Environment/MapPoint.prefab.meta

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: f083eb3adc9a00f488cd97ea69ade9c2
timeCreated: 1493126565
licenseType: Free
NativeFormatImporter:
mainObjectFileID: 100100000
userData:
assetBundleName:
assetBundleVariant:

82
Assets/Prefabs/Environment/Zone.prefab

@ -0,0 +1,82 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1001 &100100000
Prefab:
m_ObjectHideFlags: 1
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications: []
m_RemovedComponents: []
m_ParentPrefab: {fileID: 0}
m_RootGameObject: {fileID: 1666110256119014}
m_IsPrefabParent: 1
--- !u!1 &1666110256119014
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_Component:
- component: {fileID: 4776354189665642}
- component: {fileID: 61734287056174016}
- component: {fileID: 114060167888641058}
m_Layer: 0
m_Name: Zone
m_TagString: Untagged
m_Icon: {fileID: 5132851093641282708, guid: 0000000000000000d000000000000000, type: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &4776354189665642
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1666110256119014}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!61 &61734287056174016
BoxCollider2D:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1666110256119014}
m_Enabled: 1
m_Density: 1
m_Material: {fileID: 0}
m_IsTrigger: 1
m_UsedByEffector: 0
m_UsedByComposite: 0
m_Offset: {x: 0, y: 0}
m_SpriteTilingProperty:
border: {x: 0, y: 0, z: 0, w: 0}
pivot: {x: 0, y: 0}
oldSize: {x: 0, y: 0}
newSize: {x: 0, y: 0}
adaptiveTilingThreshold: 0
drawMode: 0
adaptiveTiling: 0
m_AutoTiling: 0
serializedVersion: 2
m_Size: {x: 1, y: 1}
m_EdgeRadius: 0
--- !u!114 &114060167888641058
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1666110256119014}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 7d5d08dd0970f4e42ace95f57830df75, type: 3}
m_Name:
m_EditorClassIdentifier:
battleProbability: 30
secondsBetweenBattles: 1
battleSceneName: BattleScene

9
Assets/Prefabs/Environment/Zone.prefab.meta

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 6c182ede6c535db4d8c221dc036508c0
timeCreated: 1493297462
licenseType: Free
NativeFormatImporter:
mainObjectFileID: 100100000
userData:
assetBundleName:
assetBundleVariant:

9
Assets/Resources.meta

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 8ce715d33999a83449f9709df1692742
folderAsset: yes
timeCreated: 1492778542
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

35
Assets/Resources/MayorWarning.asset

@ -0,0 +1,35 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 103cdac72ec160241bac90294881c4b6, type: 3}
m_Name: MayorWarning
m_EditorClassIdentifier:
ConversationLines:
- SpeakingCharacterName: Mayor
ConversationText: Where do you think you are going?
DisplayPic: {fileID: 21300000, guid: 0eb87a57cf2827c46bab4de44e72c605, type: 3}
- SpeakingCharacterName: Player
ConversationText: I was wondering what was over here.
DisplayPic: {fileID: 21300000, guid: 9cdce7a59c37290439fe2eece5432a11, type: 3}
- SpeakingCharacterName: Mayor
ConversationText: Well, you can't go this way!
DisplayPic: {fileID: 21300000, guid: 0eb87a57cf2827c46bab4de44e72c605, type: 3}
- SpeakingCharacterName: Mayor
ConversationText: There is a lot of construction going on that side of that.
DisplayPic: {fileID: 21300000, guid: 0eb87a57cf2827c46bab4de44e72c605, type: 3}
- SpeakingCharacterName: Mayor
ConversationText: and there's also a lot of monsters
DisplayPic: {fileID: 21300000, guid: 0eb87a57cf2827c46bab4de44e72c605, type: 3}
- SpeakingCharacterName: Mayor
ConversationText: But we don't talk about that...
DisplayPic: {fileID: 21300000, guid: 0eb87a57cf2827c46bab4de44e72c605, type: 3}
- SpeakingCharacterName: Mayor
ConversationText: Forget I said anything
DisplayPic: {fileID: 21300000, guid: 0eb87a57cf2827c46bab4de44e72c605, type: 3}

9
Assets/Resources/MayorWarning.asset.meta

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 2e5b3efc3d9ea9245bda57bc9b392782
timeCreated: 1492778594
licenseType: Free
NativeFormatImporter:
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

9
Assets/Scenes.meta

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: a126afa674f52a94ab68a4c82f6fdb04
folderAsset: yes
timeCreated: 1491832416
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

1233
Assets/Scenes/BattleScene.unity

File diff suppressed because it is too large Load Diff

8
Assets/Scenes/BattleScene.unity.meta

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 69b7ff5b0884a604db2fb5b6efb2485f
timeCreated: 1491832823
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

379
Assets/Scenes/Campsite.unity

@ -0,0 +1,379 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!29 &1
OcclusionCullingSettings:
m_ObjectHideFlags: 0
serializedVersion: 2
m_OcclusionBakeSettings:
smallestOccluder: 5
smallestHole: 0.25
backfaceThreshold: 100
m_SceneGUID: 00000000000000000000000000000000
m_OcclusionCullingData: {fileID: 0}
--- !u!104 &2
RenderSettings:
m_ObjectHideFlags: 0
serializedVersion: 8
m_Fog: 0
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
m_FogMode: 3
m_FogDensity: 0.01
m_LinearFogStart: 0
m_LinearFogEnd: 300
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
m_AmbientIntensity: 1
m_AmbientMode: 3
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
m_SkyboxMaterial: {fileID: 0}
m_HaloStrength: 0.5
m_FlareStrength: 1
m_FlareFadeSpeed: 3
m_HaloTexture: {fileID: 0}
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
m_DefaultReflectionMode: 0
m_DefaultReflectionResolution: 128
m_ReflectionBounces: 1
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1}
--- !u!157 &3
LightmapSettings:
m_ObjectHideFlags: 0
serializedVersion: 11
m_GIWorkflowMode: 1
m_GISettings:
serializedVersion: 2
m_BounceScale: 1
m_IndirectOutputScale: 1
m_AlbedoBoost: 1
m_TemporalCoherenceThreshold: 1
m_EnvironmentLightingMode: 0
m_EnableBakedLightmaps: 0
m_EnableRealtimeLightmaps: 0
m_LightmapEditorSettings:
serializedVersion: 9
m_Resolution: 2
m_BakeResolution: 40
m_TextureWidth: 1024
m_TextureHeight: 1024
m_AO: 0
m_AOMaxDistance: 1
m_CompAOExponent: 1
m_CompAOExponentDirect: 0
m_Padding: 2
m_LightmapParameters: {fileID: 0}
m_LightmapsBakeMode: 1
m_TextureCompression: 1
m_FinalGather: 0
m_FinalGatherFiltering: 1
m_FinalGatherRayCount: 256
m_ReflectionCompression: 2
m_MixedBakeMode: 2
m_BakeBackend: 0
m_PVRSampling: 1
m_PVRDirectSampleCount: 32
m_PVRSampleCount: 500
m_PVRBounces: 2
m_PVRFiltering: 0
m_PVRFilteringMode: 1
m_PVRCulling: 1
m_PVRFilteringGaussRadiusDirect: 1
m_PVRFilteringGaussRadiusIndirect: 5
m_PVRFilteringGaussRadiusAO: 2
m_PVRFilteringAtrousColorSigma: 1
m_PVRFilteringAtrousNormalSigma: 1
m_PVRFilteringAtrousPositionSigma: 1
m_LightingDataAsset: {fileID: 0}
m_UseShadowmask: 1
--- !u!196 &4
NavMeshSettings:
serializedVersion: 2
m_ObjectHideFlags: 0
m_BuildSettings:
serializedVersion: 2
agentTypeID: 0
agentRadius: 0.5
agentHeight: 2
agentSlope: 45
agentClimb: 0.4
ledgeDropHeight: 0
maxJumpAcrossDistance: 0
minRegionArea: 2
manualCellSize: 0
cellSize: 0.16666667
manualTileSize: 0
tileSize: 256
accuratePlacement: 0
m_NavMeshData: {fileID: 0}
--- !u!1 &313594358
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 313594363}
- component: {fileID: 313594362}
- component: {fileID: 313594361}
- component: {fileID: 313594360}
- component: {fileID: 313594359}
m_Layer: 0
m_Name: Main Camera
m_TagString: MainCamera
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!81 &313594359
AudioListener:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 313594358}
m_Enabled: 1
--- !u!124 &313594360
Behaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 313594358}
m_Enabled: 1
--- !u!92 &313594361
Behaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 313594358}
m_Enabled: 1
--- !u!20 &313594362
Camera:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 313594358}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 1
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
near clip plane: 0.3
far clip plane: 1000
field of view: 60
orthographic: 1
orthographic size: 5
m_Depth: -1
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingPath: -1
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
m_TargetEye: 3
m_HDR: 1
m_AllowMSAA: 1
m_ForceIntoRT: 0
m_OcclusionCulling: 1
m_StereoConvergence: 10
m_StereoSeparation: 0.022
m_StereoMirrorMode: 0
--- !u!4 &313594363
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 313594358}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: -10}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &401481171
Prefab:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 4050560241422700, guid: 95d488ac80a938a408cfac528ca39a60, type: 2}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4050560241422700, guid: 95d488ac80a938a408cfac528ca39a60, type: 2}
propertyPath: m_LocalPosition.y
value: -4.42
objectReference: {fileID: 0}
- target: {fileID: 4050560241422700, guid: 95d488ac80a938a408cfac528ca39a60, type: 2}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4050560241422700, guid: 95d488ac80a938a408cfac528ca39a60, type: 2}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4050560241422700, guid: 95d488ac80a938a408cfac528ca39a60, type: 2}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4050560241422700, guid: 95d488ac80a938a408cfac528ca39a60, type: 2}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4050560241422700, guid: 95d488ac80a938a408cfac528ca39a60, type: 2}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4050560241422700, guid: 95d488ac80a938a408cfac528ca39a60, type: 2}
propertyPath: m_RootOrder
value: 2
objectReference: {fileID: 0}
m_RemovedComponents: []
m_ParentPrefab: {fileID: 100100000, guid: 95d488ac80a938a408cfac528ca39a60, type: 2}
m_IsPrefabParent: 0
--- !u!1 &713601549
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 713601551}
- component: {fileID: 713601550}
m_Layer: 0
m_Name: ForestBackground
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!212 &713601550
SpriteRenderer:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 713601549}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_Materials:
- {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_SelectedEditorRenderState: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_Sprite: {fileID: 21300000, guid: 19daf908548af8942b0da96d1fad6686, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_FlipX: 0
m_FlipY: 0
m_DrawMode: 0
m_Size: {x: 11.36, y: 6.4}
m_AdaptiveModeThreshold: 0.5
m_SpriteTileMode: 0
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
--- !u!4 &713601551
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 713601549}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 2.1718569, y: 2.1718578, z: 2.1718578}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1542646690
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 1542646693}
- component: {fileID: 1542646692}
- component: {fileID: 1542646691}
m_Layer: 0
m_Name: LeftBoundary
m_TagString: Overworld
m_Icon: {fileID: -964228994112308473, guid: 0000000000000000d000000000000000, type: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1542646691
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1542646690}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 59688b613ac30504d9689ded15fc5350, type: 3}
m_Name:
m_EditorClassIdentifier:
startingPosition: {x: 0, y: 0, z: 0}
--- !u!61 &1542646692
BoxCollider2D:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1542646690}
m_Enabled: 1
m_Density: 1
m_Material: {fileID: 0}
m_IsTrigger: 0
m_UsedByEffector: 0
m_UsedByComposite: 0
m_Offset: {x: 0, y: 0}
m_SpriteTilingProperty:
border: {x: 0, y: 0, z: 0, w: 0}
pivot: {x: 0, y: 0}
oldSize: {x: 0, y: 0}
newSize: {x: 0, y: 0}
adaptiveTilingThreshold: 0
drawMode: 0
adaptiveTiling: 0
m_AutoTiling: 0
serializedVersion: 2
m_Size: {x: 1, y: 1}
m_EdgeRadius: 0
--- !u!4 &1542646693
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1542646690}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -11.5, y: -0.13, z: 0}
m_LocalScale: {x: 1, y: 14.6375, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}

8
Assets/Scenes/Campsite.unity.meta

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 234032b8e66ea0b44b5944853910e747
timeCreated: 1507557114
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

832
Assets/Scenes/Overworld.unity

@ -0,0 +1,832 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!29 &1
OcclusionCullingSettings:
m_ObjectHideFlags: 0
serializedVersion: 2
m_OcclusionBakeSettings:
smallestOccluder: 5
smallestHole: 0.25
backfaceThreshold: 100
m_SceneGUID: 00000000000000000000000000000000
m_OcclusionCullingData: {fileID: 0}
--- !u!104 &2
RenderSettings:
m_ObjectHideFlags: 0
serializedVersion: 8
m_Fog: 0
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
m_FogMode: 3
m_FogDensity: 0.01
m_LinearFogStart: 0
m_LinearFogEnd: 300
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
m_AmbientIntensity: 1
m_AmbientMode: 3
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
m_SkyboxMaterial: {fileID: 0}
m_HaloStrength: 0.5
m_FlareStrength: 1
m_FlareFadeSpeed: 3
m_HaloTexture: {fileID: 0}
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
m_DefaultReflectionMode: 0
m_DefaultReflectionResolution: 128
m_ReflectionBounces: 1
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1}
--- !u!157 &3
LightmapSettings:
m_ObjectHideFlags: 0
serializedVersion: 11
m_GIWorkflowMode: 1
m_GISettings:
serializedVersion: 2
m_BounceScale: 1
m_IndirectOutputScale: 1
m_AlbedoBoost: 1
m_TemporalCoherenceThreshold: 1
m_EnvironmentLightingMode: 0
m_EnableBakedLightmaps: 0
m_EnableRealtimeLightmaps: 0
m_LightmapEditorSettings:
serializedVersion: 9
m_Resolution: 2
m_BakeResolution: 40
m_TextureWidth: 1024
m_TextureHeight: 1024
m_AO: 0
m_AOMaxDistance: 1
m_CompAOExponent: 1
m_CompAOExponentDirect: 0
m_Padding: 2
m_LightmapParameters: {fileID: 0}
m_LightmapsBakeMode: 1
m_TextureCompression: 1
m_FinalGather: 0
m_FinalGatherFiltering: 1
m_FinalGatherRayCount: 256
m_ReflectionCompression: 2
m_MixedBakeMode: 2
m_BakeBackend: 0
m_PVRSampling: 1
m_PVRDirectSampleCount: 32
m_PVRSampleCount: 500
m_PVRBounces: 2
m_PVRFiltering: 0
m_PVRFilteringMode: 1
m_PVRCulling: 1
m_PVRFilteringGaussRadiusDirect: 1
m_PVRFilteringGaussRadiusIndirect: 5
m_PVRFilteringGaussRadiusAO: 2
m_PVRFilteringAtrousColorSigma: 1
m_PVRFilteringAtrousNormalSigma: 1
m_PVRFilteringAtrousPositionSigma: 1
m_LightingDataAsset: {fileID: 0}
m_UseShadowmask: 1
--- !u!196 &4
NavMeshSettings:
serializedVersion: 2
m_ObjectHideFlags: 0
m_BuildSettings:
serializedVersion: 2
agentTypeID: 0
agentRadius: 0.5
agentHeight: 2
agentSlope: 45
agentClimb: 0.4
ledgeDropHeight: 0
maxJumpAcrossDistance: 0
minRegionArea: 2
manualCellSize: 0
cellSize: 0.16666667
manualTileSize: 0
tileSize: 256
accuratePlacement: 0
m_NavMeshData: {fileID: 0}
--- !u!1 &29694749
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 29694750}
- component: {fileID: 29694751}
m_Layer: 0
m_Name: TopBorder
m_TagString: Untagged
m_Icon: {fileID: -964228994112308473, guid: 0000000000000000d000000000000000, type: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &29694750
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 29694749}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 6.33, z: 0}
m_LocalScale: {x: 16.362526, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 1258601525}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!61 &29694751
BoxCollider2D:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 29694749}
m_Enabled: 1
m_Density: 1
m_Material: {fileID: 0}
m_IsTrigger: 0
m_UsedByEffector: 0
m_UsedByComposite: 0
m_Offset: {x: 0, y: 0}
m_SpriteTilingProperty:
border: {x: 0, y: 0, z: 0, w: 0}
pivot: {x: 0, y: 0}
oldSize: {x: 0, y: 0}
newSize: {x: 0, y: 0}
adaptiveTilingThreshold: 0
drawMode: 0
adaptiveTiling: 0
m_AutoTiling: 0
serializedVersion: 2
m_Size: {x: 1, y: 1}
m_EdgeRadius: 0
--- !u!1001 &84517089
Prefab:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 4767908380614790, guid: f083eb3adc9a00f488cd97ea69ade9c2, type: 2}
propertyPath: m_LocalPosition.x
value: -4.44
objectReference: {fileID: 0}
- target: {fileID: 4767908380614790, guid: f083eb3adc9a00f488cd97ea69ade9c2, type: 2}
propertyPath: m_LocalPosition.y
value: 3.18
objectReference: {fileID: 0}
- target: {fileID: 4767908380614790, guid: f083eb3adc9a00f488cd97ea69ade9c2, type: 2}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4767908380614790, guid: f083eb3adc9a00f488cd97ea69ade9c2, type: 2}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4767908380614790, guid: f083eb3adc9a00f488cd97ea69ade9c2, type: 2}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4767908380614790, guid: f083eb3adc9a00f488cd97ea69ade9c2, type: 2}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4767908380614790, guid: f083eb3adc9a00f488cd97ea69ade9c2, type: 2}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4767908380614790, guid: f083eb3adc9a00f488cd97ea69ade9c2, type: 2}
propertyPath: m_RootOrder
value: 4
objectReference: {fileID: 0}
- target: {fileID: 1753432946590668, guid: f083eb3adc9a00f488cd97ea69ade9c2, type: 2}
propertyPath: m_Name
value: Campsite
objectReference: {fileID: 0}
- target: {fileID: 212498469537218090, guid: f083eb3adc9a00f488cd97ea69ade9c2,
type: 2}
propertyPath: m_Sprite
value:
objectReference: {fileID: 21300000, guid: 73d70a7349e2790429f3f3f9ac3bea18,
type: 3}
- target: {fileID: 1753432946590668, guid: f083eb3adc9a00f488cd97ea69ade9c2, type: 2}
propertyPath: m_TagString
value: Campsite
objectReference: {fileID: 0}
m_RemovedComponents: []
m_ParentPrefab: {fileID: 100100000, guid: f083eb3adc9a00f488cd97ea69ade9c2, type: 2}
m_IsPrefabParent: 0
--- !u!1 &653072594
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 653072595}
m_Layer: 0
m_Name: BattleZones
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &653072595
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 653072594}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 1289625498}
- {fileID: 1804016086}
m_Father: {fileID: 0}
m_RootOrder: 6
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &654859620
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 654859621}
- component: {fileID: 654859622}
m_Layer: 0
m_Name: RightBorder
m_TagString: Untagged
m_Icon: {fileID: -964228994112308473, guid: 0000000000000000d000000000000000, type: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &654859621
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 654859620}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 8.24, y: 0.05, z: 0.0390625}
m_LocalScale: {x: 1, y: 12.300018, z: 1}
m_Children: []
m_Father: {fileID: 1258601525}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!61 &654859622
BoxCollider2D:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 654859620}
m_Enabled: 1
m_Density: 1
m_Material: {fileID: 0}
m_IsTrigger: 0
m_UsedByEffector: 0
m_UsedByComposite: 0
m_Offset: {x: 0, y: 0}
m_SpriteTilingProperty:
border: {x: 0, y: 0, z: 0, w: 0}
pivot: {x: 0, y: 0}
oldSize: {x: 0, y: 0}
newSize: {x: 0, y: 0}
adaptiveTilingThreshold: 0
drawMode: 0
adaptiveTiling: 0
m_AutoTiling: 0
serializedVersion: 2
m_Size: {x: 1, y: 1}
m_EdgeRadius: 0
--- !u!1001 &770226152
Prefab:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 653072595}
m_Modifications:
- target: {fileID: 4776354189665642, guid: 6c182ede6c535db4d8c221dc036508c0, type: 2}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4776354189665642, guid: 6c182ede6c535db4d8c221dc036508c0, type: 2}
propertyPath: m_LocalPosition.y
value: 1.6
objectReference: {fileID: 0}
- target: {fileID: 4776354189665642, guid: 6c182ede6c535db4d8c221dc036508c0, type: 2}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4776354189665642, guid: 6c182ede6c535db4d8c221dc036508c0, type: 2}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4776354189665642, guid: 6c182ede6c535db4d8c221dc036508c0, type: 2}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4776354189665642, guid: 6c182ede6c535db4d8c221dc036508c0, type: 2}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4776354189665642, guid: 6c182ede6c535db4d8c221dc036508c0, type: 2}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4776354189665642, guid: 6c182ede6c535db4d8c221dc036508c0, type: 2}
propertyPath: m_RootOrder
value: 0
objectReference: {fileID: 0}
- target: {fileID: 61734287056174016, guid: 6c182ede6c535db4d8c221dc036508c0,
type: 2}
propertyPath: m_Size.x
value: 7
objectReference: {fileID: 0}
- target: {fileID: 61734287056174016, guid: 6c182ede6c535db4d8c221dc036508c0,
type: 2}
propertyPath: m_Size.y
value: 7
objectReference: {fileID: 0}
- target: {fileID: 1666110256119014, guid: 6c182ede6c535db4d8c221dc036508c0, type: 2}
propertyPath: m_Name
value: Zone1
objectReference: {fileID: 0}
- target: {fileID: 114060167888641058, guid: 6c182ede6c535db4d8c221dc036508c0,
type: 2}
propertyPath: battleProbability
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_ParentPrefab: {fileID: 100100000, guid: 6c182ede6c535db4d8c221dc036508c0, type: 2}
m_IsPrefabParent: 0
--- !u!1 &827644346
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 827644351}
- component: {fileID: 827644350}
- component: {fileID: 827644349}
- component: {fileID: 827644348}
- component: {fileID: 827644347}
m_Layer: 0
m_Name: Main Camera
m_TagString: MainCamera
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!81 &827644347
AudioListener:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 827644346}
m_Enabled: 1
--- !u!124 &827644348
Behaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 827644346}
m_Enabled: 1
--- !u!92 &827644349
Behaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 827644346}
m_Enabled: 1
--- !u!20 &827644350
Camera:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 827644346}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 1
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
near clip plane: 0.3
far clip plane: 1000
field of view: 60
orthographic: 1
orthographic size: 6
m_Depth: -1
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingPath: -1
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
m_TargetEye: 3
m_HDR: 1
m_AllowMSAA: 1
m_ForceIntoRT: 0
m_OcclusionCulling: 1
m_StereoConvergence: 10
m_StereoSeparation: 0.022
m_StereoMirrorMode: 0
--- !u!4 &827644351
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 827644346}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: -10}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &1061021809
Prefab:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 4050560241422700, guid: 95d488ac80a938a408cfac528ca39a60, type: 2}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4050560241422700, guid: 95d488ac80a938a408cfac528ca39a60, type: 2}
propertyPath: m_LocalPosition.y
value: -4.5
objectReference: {fileID: 0}
- target: {fileID: 4050560241422700, guid: 95d488ac80a938a408cfac528ca39a60, type: 2}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4050560241422700, guid: 95d488ac80a938a408cfac528ca39a60, type: 2}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4050560241422700, guid: 95d488ac80a938a408cfac528ca39a60, type: 2}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4050560241422700, guid: 95d488ac80a938a408cfac528ca39a60, type: 2}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4050560241422700, guid: 95d488ac80a938a408cfac528ca39a60, type: 2}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4050560241422700, guid: 95d488ac80a938a408cfac528ca39a60, type: 2}
propertyPath: m_RootOrder
value: 2
objectReference: {fileID: 0}
m_RemovedComponents: []
m_ParentPrefab: {fileID: 100100000, guid: 95d488ac80a938a408cfac528ca39a60, type: 2}
m_IsPrefabParent: 0
--- !u!1 &1149786977
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 1149786978}
- component: {fileID: 1149786979}
m_Layer: 0
m_Name: LeftBorder
m_TagString: Untagged
m_Icon: {fileID: -964228994112308473, guid: 0000000000000000d000000000000000, type: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1149786978
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1149786977}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -8.28, y: 0.05, z: 0.0390625}
m_LocalScale: {x: 1, y: 12.300018, z: 1}
m_Children: []
m_Father: {fileID: 1258601525}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!61 &1149786979
BoxCollider2D:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1149786977}
m_Enabled: 1
m_Density: 1
m_Material: {fileID: 0}
m_IsTrigger: 0
m_UsedByEffector: 0
m_UsedByComposite: 0
m_Offset: {x: 0, y: 0}
m_SpriteTilingProperty:
border: {x: 0, y: 0, z: 0, w: 0}
pivot: {x: 0, y: 0}
oldSize: {x: 0, y: 0}
newSize: {x: 0, y: 0}
adaptiveTilingThreshold: 0
drawMode: 0
adaptiveTiling: 0
m_AutoTiling: 0
serializedVersion: 2
m_Size: {x: 1, y: 1}
m_EdgeRadius: 0
--- !u!1 &1258601524
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 1258601525}
m_Layer: 0
m_Name: Borders
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1258601525
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1258601524}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 29694750}
- {fileID: 1875832781}
- {fileID: 654859621}
- {fileID: 1149786978}
m_Father: {fileID: 0}
m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!4 &1289625498 stripped
Transform:
m_PrefabParentObject: {fileID: 4776354189665642, guid: 6c182ede6c535db4d8c221dc036508c0,
type: 2}
m_PrefabInternal: {fileID: 770226152}
--- !u!1001 &1623307241
Prefab:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 653072595}
m_Modifications:
- target: {fileID: 4776354189665642, guid: 6c182ede6c535db4d8c221dc036508c0, type: 2}
propertyPath: m_LocalPosition.x
value: 6.31
objectReference: {fileID: 0}
- target: {fileID: 4776354189665642, guid: 6c182ede6c535db4d8c221dc036508c0, type: 2}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4776354189665642, guid: 6c182ede6c535db4d8c221dc036508c0, type: 2}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4776354189665642, guid: 6c182ede6c535db4d8c221dc036508c0, type: 2}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4776354189665642, guid: 6c182ede6c535db4d8c221dc036508c0, type: 2}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4776354189665642, guid: 6c182ede6c535db4d8c221dc036508c0, type: 2}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4776354189665642, guid: 6c182ede6c535db4d8c221dc036508c0, type: 2}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4776354189665642, guid: 6c182ede6c535db4d8c221dc036508c0, type: 2}
propertyPath: m_RootOrder
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1666110256119014, guid: 6c182ede6c535db4d8c221dc036508c0, type: 2}
propertyPath: m_Name
value: Zone2
objectReference: {fileID: 0}
- target: {fileID: 4776354189665642, guid: 6c182ede6c535db4d8c221dc036508c0, type: 2}
propertyPath: m_LocalScale.y
value: 11.087513
objectReference: {fileID: 0}
- target: {fileID: 4776354189665642, guid: 6c182ede6c535db4d8c221dc036508c0, type: 2}
propertyPath: m_LocalScale.x
value: 2.6625023
objectReference: {fileID: 0}
- target: {fileID: 114060167888641058, guid: 6c182ede6c535db4d8c221dc036508c0,
type: 2}
propertyPath: battleProbability
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_ParentPrefab: {fileID: 100100000, guid: 6c182ede6c535db4d8c221dc036508c0, type: 2}
m_IsPrefabParent: 0
--- !u!1001 &1725212732
Prefab:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 4767908380614790, guid: f083eb3adc9a00f488cd97ea69ade9c2, type: 2}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4767908380614790, guid: f083eb3adc9a00f488cd97ea69ade9c2, type: 2}
propertyPath: m_LocalPosition.y
value: -5.3
objectReference: {fileID: 0}
- target: {fileID: 4767908380614790, guid: f083eb3adc9a00f488cd97ea69ade9c2, type: 2}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4767908380614790, guid: f083eb3adc9a00f488cd97ea69ade9c2, type: 2}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4767908380614790, guid: f083eb3adc9a00f488cd97ea69ade9c2, type: 2}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4767908380614790, guid: f083eb3adc9a00f488cd97ea69ade9c2, type: 2}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4767908380614790, guid: f083eb3adc9a00f488cd97ea69ade9c2, type: 2}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4767908380614790, guid: f083eb3adc9a00f488cd97ea69ade9c2, type: 2}
propertyPath: m_RootOrder
value: 3
objectReference: {fileID: 0}
- target: {fileID: 1753432946590668, guid: f083eb3adc9a00f488cd97ea69ade9c2, type: 2}
propertyPath: m_Name
value: Town
objectReference: {fileID: 0}
- target: {fileID: 114018739340795734, guid: f083eb3adc9a00f488cd97ea69ade9c2,
type: 2}
propertyPath: startingPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 114018739340795734, guid: f083eb3adc9a00f488cd97ea69ade9c2,
type: 2}
propertyPath: startingPosition.y
value: -4.5
objectReference: {fileID: 0}
m_RemovedComponents: []
m_ParentPrefab: {fileID: 100100000, guid: f083eb3adc9a00f488cd97ea69ade9c2, type: 2}
m_IsPrefabParent: 0
--- !u!4 &1804016086 stripped
Transform:
m_PrefabParentObject: {fileID: 4776354189665642, guid: 6c182ede6c535db4d8c221dc036508c0,
type: 2}
m_PrefabInternal: {fileID: 1623307241}
--- !u!1 &1875832780
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 1875832781}
- component: {fileID: 1875832782}
m_Layer: 0
m_Name: BottomBorder
m_TagString: Untagged
m_Icon: {fileID: -964228994112308473, guid: 0000000000000000d000000000000000, type: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1875832781
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1875832780}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: -6.35, z: 0}
m_LocalScale: {x: 16.36253, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 1258601525}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!61 &1875832782
BoxCollider2D:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1875832780}
m_Enabled: 1
m_Density: 1
m_Material: {fileID: 0}
m_IsTrigger: 0
m_UsedByEffector: 0
m_UsedByComposite: 0
m_Offset: {x: 0, y: 0}
m_SpriteTilingProperty:
border: {x: 0, y: 0, z: 0, w: 0}
pivot: {x: 0, y: 0}
oldSize: {x: 0, y: 0}
newSize: {x: 0, y: 0}
adaptiveTilingThreshold: 0
drawMode: 0
adaptiveTiling: 0
m_AutoTiling: 0
serializedVersion: 2
m_Size: {x: 1, y: 1}
m_EdgeRadius: 0
--- !u!1 &2054773215
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 2054773217}
- component: {fileID: 2054773216}
m_Layer: 0
m_Name: map
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!212 &2054773216
SpriteRenderer:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 2054773215}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_Materials:
- {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_SelectedEditorRenderState: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_Sprite: {fileID: 21300000, guid: 45b37a154c7e0da48b32107758a1d384, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_FlipX: 0
m_FlipY: 0
m_DrawMode: 0
m_Size: {x: 20.48, y: 20.48}
m_AdaptiveModeThreshold: 0.5
m_SpriteTileMode: 0
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
--- !u!4 &2054773217
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 2054773215}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 2.12, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}

8
Assets/Scenes/Overworld.unity.meta

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 71eb8319775a32d4cbbf51929cc09759
timeCreated: 1491832838
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

1877
Assets/Scenes/Shop.unity

File diff suppressed because it is too large Load Diff

8
Assets/Scenes/Shop.unity.meta

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: b1ca2f8fa8df19247ace37ab0c495d52
timeCreated: 1491832850
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

2539
Assets/Scenes/Town.unity

File diff suppressed because it is too large Load Diff

8
Assets/Scenes/Town.unity.meta

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: c7329241b4d866a40bb4fda72cb9c02a
timeCreated: 1491832868
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

9
Assets/Scripts.meta

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: e7cd504d12f5fb74f804458bd19ad1bd
folderAsset: yes
timeCreated: 1491832422
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

9
Assets/Scripts/Classes.meta

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: ba1eb05c8e3b5124bafefdb2c900f134
folderAsset: yes
timeCreated: 1492636615
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

29
Assets/Scripts/Classes/Entity.cs

@ -0,0 +1,29 @@
using UnityEngine;
public class Entity : ScriptableObject
{
public string Name;
public int Age;
string Faction;
public string Occupation;
public int Level = 1;
public int Health = 2;
public int Strength = 1;
public int Magic = 0;
public int Defense = 0;
public int Speed = 1;
public int Damage = 1;
public int Armor = 0;
public int NoOfAttacks = 1;
public string Weapon;
public Vector2 Position;
public void TakeDamage(int Amount)
{
Health = Health - Mathf.Clamp((Amount - Armor), 0, int.MaxValue);
}
public void Attack(Entity Entity)
{
Entity.TakeDamage(Strength);
}
}

12
Assets/Scripts/Classes/Entity.cs.meta

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 51a4f1f4f2f99a246824797a3bfd9696
timeCreated: 1491841875
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

14
Assets/Scripts/Classes/NPC.cs

@ -0,0 +1,14 @@
using UnityEngine;
public class NPC : MonoBehaviour
{
public string Name;
[Range(0, 100)]
public int Age;
//[PopUp("Good Guy", "Independent", "Bad Guy")]
public string Faction;
//[PopUp("Mayor", "Shopkeep", "Layabout")]
public string Occupation;
[Range(0, 10)]
public int Level;
}

12
Assets/Scripts/Classes/NPC.cs.meta

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 1c4ed462e63edc545b86cea33da14179
timeCreated: 1493304647
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

7
Assets/Scripts/Classes/Player.cs

@ -0,0 +1,7 @@
using UnityEngine;
public class Player : Entity
{
public string[] inventory;
public string[] skills;
public int money;
}

12
Assets/Scripts/Classes/Player.cs.meta

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: f91efd5c5d0aecd469a0ad3cec9e0d49
timeCreated: 1491841928
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

9
Assets/Scripts/Combat.meta

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 8d9d0fb12a13e6041ab0efd68c48f1ba
folderAsset: yes
timeCreated: 1493304564
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

112
Assets/Scripts/Combat/BattleManager.cs

@ -0,0 +1,112 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
/// <summary>
/// This is attached to an empty game object in the battle scene. This class
/// manages all aspects of the battle that occurs.
/// </summary>
public class BattleManager : MonoBehaviour {
// The locations where enemies may appear within the scene.
public GameObject[] EnemySpawnPoints;
// The enemies that may be placed on the spawn points
public GameObject[] EnemyPrefabs;
// When enemies are placed they slide into place based on the curve
public AnimationCurve SpawnAnimationCurve;
// Reference to the actions that a player may perform
public CanvasGroup theButtons;
// The number of enemies in the scene
private int enemyCount;
// This enumeration defines the components of a turn
enum BattlePhase
{
PlayerAttack,
EnemyAttack
}
// Track which phase of the turn we are on
private BattlePhase phase;
// Use this for initialization
void Start () {
// Calculate how many enemies will be in the scene (battle)
enemyCount = Random.Range(1, EnemySpawnPoints.Length);
// Spawn the enemies in
StartCoroutine(SpawnEnemies());
// Set the beginning battle phase - player always has initiative in this game
phase = BattlePhase.PlayerAttack;
}
void Update()
{
// Control the display of the player action buttons. Only show when it is the
// player's turn
if (phase == BattlePhase.PlayerAttack)
{
theButtons.alpha = 1;
theButtons.interactable = true;
theButtons.blocksRaycasts = true;
}
else
{
theButtons.alpha = 0;
theButtons.interactable = false;
theButtons.blocksRaycasts = false;
}
}
/// <summary>
/// A player action. This action leaves the battle scene and returns to the world.
/// </summary>
public void RunAway()
{
GameState.justExitedBattle = true;
NavigationManager.NavigateTo("Overworld");
}
/// <summary>
/// This method creates enemies from the prefabs and calls the method
/// that moves the enemies to the spawn points.
/// </summary>
/// <returns></returns>
IEnumerator SpawnEnemies()
{
// Spawn enemies in over time
for (int i = 0; i < enemyCount; i++)
{
var newEnemy = (GameObject)Instantiate(EnemyPrefabs[0]);
newEnemy.transform.position = new Vector3(10, -1, 0);
yield return StartCoroutine(MoveCharacterToPoint(EnemySpawnPoints[i], newEnemy));
newEnemy.transform.parent = EnemySpawnPoints[i].transform;
}
}
/// <summary>
/// Moves the character into position using an animation that slides the char into place.
/// </summary>
/// <param name="destination"></param>
/// <param name="character"></param>
/// <returns></returns>
IEnumerator MoveCharacterToPoint(GameObject destination, GameObject character)
{
float timer = 0f;
var StartPosition = character.transform.position;
if (SpawnAnimationCurve.length > 0)
{
while (timer < SpawnAnimationCurve.keys[SpawnAnimationCurve.length - 1].time)
{
character.transform.position = Vector3.Lerp(StartPosition, destination.transform.position, SpawnAnimationCurve.Evaluate(timer));
timer += Time.deltaTime;
yield return new WaitForEndOfFrame();
}
}
else
{
character.transform.position = destination.transform.position;
}
}
}

12
Assets/Scripts/Combat/BattleManager.cs.meta

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: fb9db9b0b5dce48819a4f5a81f0e8cbc
timeCreated: 1493211347
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

78
Assets/Scripts/Combat/RandomBattle.cs

@ -0,0 +1,78 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
/// <summary>
/// This script is attached to "Zone" objects in the world scene. When the player collides with
/// the zone, there is a chance of a battle. This script will load that battle scene when a
/// battle occurs.
/// </summary>
public class RandomBattle : MonoBehaviour {
public int battleProbability;
int encounterChance = 100;
public int secondsBetweenBattles;
public string battleSceneName;
/// <summary>
/// When a player object enters the 'zone' there is a chance for a battle
/// </summary>
/// <param name="col"></param>
void OnTriggerEnter2D(Collider2D col)
{
// Prevents a loop condition between the world and the battle scene
if (!GameState.justExitedBattle)
{
// Roll the dice
encounterChance = Random.Range(1, 100);
// Check the DC :)
if (encounterChance > battleProbability)
{
StartCoroutine(RecalculateChance());
}
}
else
{
StartCoroutine(RecalculateChance());
GameState.justExitedBattle = false;
}
}
/// <summary>
/// Continue to roll the dice for a random encounter while the player is in the zone
/// </summary>
/// <returns></returns>
IEnumerator RecalculateChance()
{
while (encounterChance > battleProbability)
{
yield return new WaitForSeconds(secondsBetweenBattles);
encounterChance = Random.Range(1, 100);
}
}
/// <summary>
/// As long as the player is in the zone, there is a chance of a battle. When
/// that chance hits, load the battle scene.
/// </summary>
/// <param name="col"></param>
void OnTriggerStay2D(Collider2D col)
{
if (encounterChance <= battleProbability)
{
Debug.Log("Battle");
SceneManager.LoadScene(battleSceneName);
}
}
/// <summary>
/// When the player leaves the zone, clean up.
/// </summary>
/// <param name="col"></param>
void OnTriggerExit2D(Collider2D col)
{
encounterChance = 100;
StopCoroutine(RecalculateChance());
}
}

12
Assets/Scripts/Combat/RandomBattle.cs.meta

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 7d5d08dd0970f4e42ace95f57830df75
timeCreated: 1493241341
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

9
Assets/Scripts/Conversation.meta

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 3309bc0486ed2436583d1faf62afc178
folderAsset: yes
timeCreated: 1493153442
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

10
Assets/Scripts/Conversation/Conversation.cs

@ -0,0 +1,10 @@
using UnityEngine;
/// <summary>
/// This class represents a single conversation between 2 or more characters / players in the game. The
/// conversation consists of ConversatinEntry items that provide the details of each step of the conversation.
/// </summary>
public class Conversation : ScriptableObject
{
public ConversationEntry[] ConversationLines;
}

12
Assets/Scripts/Conversation/Conversation.cs.meta

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 103cdac72ec160241bac90294881c4b6
timeCreated: 1492707985
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

10
Assets/Scripts/Conversation/ConversationComponent.cs

@ -0,0 +1,10 @@
using UnityEngine;
/// <summary>
/// Attach this script to a character or GameObject. The script allows you to
/// configure conversations for the character.
/// </summary>
public class ConversationComponent : MonoBehaviour
{
public Conversation[] Conversations;
}

12
Assets/Scripts/Conversation/ConversationComponent.cs.meta

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 35ed22f902a1ce148957e66f52f7ec0b
timeCreated: 1492787269
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

15
Assets/Scripts/Conversation/ConversationEntry.cs

@ -0,0 +1,15 @@
using UnityEngine;
/// <summary>
/// This class represents a single conversation element (phrase, sentence, etc.). The properties represent the
/// components of a dialog UI that may be shown to the player. In this implementation the dialog is shown with a
/// character name, a small profile photo of the character, and the content of the entry. A given conversation
/// would comprise of an array of this class.
/// </summary>
[System.Serializable]
public class ConversationEntry
{
public string SpeakingCharacterName;
public string ConversationText;
public Sprite DisplayPic;
}

12
Assets/Scripts/Conversation/ConversationEntry.cs.meta

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 7503dc642bf7b6a49956e0b7de39d42e
timeCreated: 1492704002
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

83
Assets/Scripts/Conversation/ConversationManager.cs

@ -0,0 +1,83 @@
using System.Collections;
using UnityEngine;
using UnityEngine.UI;
/// <summary>
/// This Manager is singleton that handles teh display and running of conversations in the game. Other components will
/// use the StartConversation method to launch a pre-defined conversation component.
/// </summary>
public class ConversationManager : Singleton<ConversationManager>
{
//Is there a converastion going on
bool talking = false;
//The current line of text being displayed
ConversationEntry currentConversationLine;
//the Canvas Group for the dialog box
public CanvasGroup dialogBox;
//the image holder
public Image imageHolder;
//the text holder
public Text textHolder;
//Guarantee this will always be a singleton only - can't use the constructor!
protected ConversationManager() { }
/// <summary>
/// Starts the conversation by getting a reference to the dialog UI and then calling a
/// coroutine to show the content of the conversation.
/// </summary>
/// <param name="conversation">Conversation.</param>
public void StartConversation(Conversation conversation)
{
dialogBox = GameObject.Find("Dialog Box").GetComponent<CanvasGroup>();
imageHolder = GameObject.Find("Speaker Image").GetComponent<Image>();
textHolder = GameObject.Find("Dialog Text").GetComponent<Text>();
//Start displying the supplied conversation
if (!talking)
{
StartCoroutine(DisplayConversation(conversation));
}
}
/// <summary>
/// This coroutine simply iterates through each of the entries in the conversation and displays the content
/// of the entry in the dialog UI. It waits 3 seconds between entries. This is a very simple implementation of
/// a conversation that does not maintain state or allow for player input or phrase options.
/// </summary>
/// <returns>The conversation.</returns>
/// <param name="conversation">Conversation.</param>
IEnumerator DisplayConversation(Conversation conversation)
{
talking = true;
foreach (var conversationLine in conversation.ConversationLines)
{
currentConversationLine = conversationLine;
textHolder.text = currentConversationLine.ConversationText;
imageHolder.sprite = currentConversationLine.DisplayPic;
yield return new WaitForSeconds(3);
}
talking = false;
}
/// <summary>
/// This method handles showing and hiding the dialog box for the conversation. It is a
/// simple alpha switch from visible to invisible.
/// </summary>
void OnGUI()
{
if (talking)
{
dialogBox.alpha = 1;
dialogBox.blocksRaycasts = true;
}
else
{
dialogBox.alpha = 0;
dialogBox.blocksRaycasts = false;
}
}
}

12
Assets/Scripts/Conversation/ConversationManager.cs.meta

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: f372b719286df334d9687e377361e395
timeCreated: 1492804013
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

9
Assets/Scripts/Editor.meta

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: f014645aaf7949e4caf57d1c1a392737
folderAsset: yes
timeCreated: 1492719072
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

15
Assets/Scripts/Editor/ConversationAssetCreator.cs

@ -0,0 +1,15 @@
using UnityEditor;
using UnityEngine;
public class ConversationAssetCreator : MonoBehaviour
{
// This will create a menu option in the Editor menu to create a conversation asset.
// The CreateAsset method will fire in response to the menu selection, it uses the
// CustomAssetUtility helper class to create the Asset file.
[MenuItem("Assets/Create/Conversation")]
public static void CreateAsset()
{
// Create an asset file based on the Conversation ScriptableObject.
CustomAssetUtility.CreateAsset<Conversation>();
}
}

12
Assets/Scripts/Editor/ConversationAssetCreator.cs.meta

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: f283568d1fa341a43a98425cb3a90291
timeCreated: 1492777585
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

36
Assets/Scripts/Editor/CustomAssetUtility.cs

@ -0,0 +1,36 @@
using System.IO;
using UnityEditor;
using UnityEngine;
/// <summary>
/// Helper class that will create assets for serializable objects.
/// </summary>
public static class CustomAssetUtility {
public static void CreateAsset<T>() where T : ScriptableObject
{
string path = AssetDatabase.GetAssetPath(Selection.activeObject);
if (path == "")
{
path = "Assets";
}
else if (Path.GetExtension(path) != "")
{
path = path.Replace(Path.GetFileName(AssetDatabase.GetAssetPath(Selection.activeObject)), "");
}
CreateAsset<T>(path);
}
public static void CreateAsset<T>(string path) where T : ScriptableObject
{
T asset = ScriptableObject.CreateInstance<T>();
string assetPathAndName = AssetDatabase.GenerateUniqueAssetPath(path + "/New " + typeof(T).ToString() + ".asset");
AssetDatabase.CreateAsset(asset, assetPathAndName);
AssetDatabase.SaveAssets();
EditorUtility.FocusProjectWindow();
Selection.activeObject = asset;
}
}

12
Assets/Scripts/Editor/CustomAssetUtility.cs.meta

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 4451262257d93c54287e942fb5bb0029
timeCreated: 1492777223
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

9
Assets/Scripts/Game.meta

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: df8fdf2f64c7767459921743fdf0a5f4
folderAsset: yes
timeCreated: 1493304630
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

56
Assets/Scripts/Game/GameState.cs

@ -0,0 +1,56 @@
using System.Collections.Generic;
using UnityEngine;
/// <summary>
/// This is a static class that loads with the game and maintains objects across scenes.
/// In other words, this is a collection of globals. This script is not attached to a specific
/// game object in any scene. Since it is static, it will be available all of the time.
/// </summary>
public static class GameState
{
// The Player class maintains character stats for the player
public static Player CurrentPlayer = ScriptableObject.CreateInstance<Player>();
// This dictionary helps scenes keep track of the player's position on the map
public static Dictionary<string, Vector3> LastScenePositions = new Dictionary<string, Vector3>();
// This switch prevents a situation in which the scene can start switching between the
// world and a battle scene in an infinite loop.
public static bool justExitedBattle;
// This switch prevents an infinite loop between locations (towns) on the world map and the world map
public static bool saveLastPosition = true;
/// <summary>
/// This method gets that last known position of the player on the given scene. This allows a
/// scene to place the player at the last know position within that same scene.
/// </summary>
/// <param name="sceneName"></param>
/// <returns></returns>
public static Vector3 GetLastScenePosition(string sceneName)
{
if (GameState.LastScenePositions.ContainsKey(sceneName))
{
var lastPos = GameState.LastScenePositions[sceneName];
return lastPos;
}
else
{
return Vector3.zero;
}
}
/// <summary>
/// This method allows a scene to save a character's position when the player leaves the scene.
/// </summary>
/// <param name="sceneName"></param>
/// <param name="position"></param>
public static void SetLastScenePosition(string sceneName, Vector3 position)
{
if (GameState.LastScenePositions.ContainsKey(sceneName))
{
GameState.LastScenePositions[sceneName] = position;
}
else
{
GameState.LastScenePositions.Add(sceneName, position);
}
}
}

12
Assets/Scripts/Game/GameState.cs.meta

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 184f32a9d424ac2438f51463e6e179b2
timeCreated: 1493299130
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

39
Assets/Scripts/Game/MapPosition.cs

@ -0,0 +1,39 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
/// <summary>
/// This class is attached to the player object (prefab). It will call the GameState class
/// to set and get the player's position in a scene and place the player at that position.
/// </summary>
public class MapPosition : MonoBehaviour {
/// <summary>
/// When the player enters a scene, this method will query the GameState to get the player's
/// last know position in this scene. Then it will place the player object at that location.
/// </summary>
void Awake()
{
var lastPosition = GameState.GetLastScenePosition(SceneManager.GetActiveScene().name);
if (lastPosition != Vector3.zero)
{
transform.position = lastPosition;
}
}
/// <summary>
/// When the player leaves a scene, this method will save the player's position in the scene.
/// Scenes that are loaded with the Navigation Manager will cause an infinite loading loop, so
/// they will set the saveLastPosition flag to false and not save the position rather using a
/// configured starting position to place the player object.
/// </summary>
void OnDestroy()
{
if (GameState.saveLastPosition)
{
GameState.SetLastScenePosition(SceneManager.GetActiveScene().name, transform.position);
}
}
}

12
Assets/Scripts/Game/MapPosition.cs.meta

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 41a9009d10bfc13458ddba5d973c5597
timeCreated: 1493301948
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

9
Assets/Scripts/Messaging.meta

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: c502b16d85b43a04cb483b24da2db572
folderAsset: yes
timeCreated: 1492636623
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

17
Assets/Scripts/Messaging/MessagingClientBroadcast.cs

@ -0,0 +1,17 @@
using UnityEngine;
// Attach this script to an object with a 2D collider. This will trigger a broadcast when something collides with it.
public class MessagingClientBroadcast : MonoBehaviour
{
void OnCollisionEnter2D(Collision2D col)
{
MessagingManager.Instance.Broadcast();
}
void OnTriggerEnter2D(Collider2D col)
{
MessagingManager.Instance.Broadcast();
}
}

12
Assets/Scripts/Messaging/MessagingClientBroadcast.cs.meta

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 8f815e83ccaba7a4db8bb94bd5a9576e
timeCreated: 1492632244
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

26
Assets/Scripts/Messaging/MessagingClientReceiver.cs

@ -0,0 +1,26 @@
using UnityEngine;
// Register to events broadcast by the Message Client
public class MessagingClientReceiver : MonoBehaviour
{
void Start()
{
MessagingManager.Instance.Subscribe(ThePlayerIsTryingToLeave);
}
void ThePlayerIsTryingToLeave()
{
var dialog = GetComponent<ConversationComponent>();
if (dialog != null)
{
if (dialog.Conversations != null && dialog.Conversations.Length > 0)
{
var conversation = dialog.Conversations[0];
if (conversation != null)
{
ConversationManager.Instance.StartConversation(conversation);
}
}
}
}
}

12
Assets/Scripts/Messaging/MessagingClientReceiver.cs.meta

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: a0d021e125889f642b7d43b328c569a6
timeCreated: 1492632172
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

59
Assets/Scripts/Messaging/MessagingManager.cs

@ -0,0 +1,59 @@
using System;
using System.Collections.Generic;
using UnityEngine;
public class MessagingManager : MonoBehaviour
{
//Static singleton property
public static MessagingManager Instance { get; private set; }
// public property for manager
private List<Action> subscribers = new List<Action>();
void Awake()
{
Debug.Log("Messaging Manager Started");
//First, we check if there are any other instances conflicting
if (Instance != null && Instance != this)
{
//Destroy other instances if it's not the same
Destroy(gameObject);
}
//Save our current singleton instance
Instance = this;
//Make sure that the instance is not destroyed between scenes
//(this is optional)
DontDestroyOnLoad(gameObject);
}
//The Subscribe method for manager
public void Subscribe(Action subscriber)
{
Debug.Log("Subscriber registered");
subscribers.Add(subscriber);
}
//The Unsubscribe method for manager
public void UnSubscribe(Action subscriber)
{
Debug.Log("Subscriber registered");
subscribers.Remove(subscriber);
}
//Clear subscribers method for manager
public void ClearAllSubscribers()
{
subscribers.Clear();
}
public void Broadcast()
{
Debug.Log("Broadcast requested, No of Subscribers = " + subscribers.Count);
foreach (var subscriber in subscribers)
{
subscriber();
}
}
}

12
Assets/Scripts/Messaging/MessagingManager.cs.meta

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: d69a93cafa210714483abdb29893d55d
timeCreated: 1492385158
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

9
Assets/Scripts/Movement.meta

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 57ae5bd2497e594409048989759cddb9
folderAsset: yes
timeCreated: 1493304544
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

150
Assets/Scripts/Movement/CharacterMovement.cs

@ -0,0 +1,150 @@
using UnityEngine;
/******************************************************************************
* This class provides basic movement controls to a player sprite in the scene.
* It responds to the basic keyboard movement commands and will use the sprite
* and animator to face the object in the correct direction as it moves.
*
* SETUP
* SpriteRenderer
* Start by setting up the player object using a SpriteRenderer, easily done by
* dragging the image into the scene.
*
* RigidBody2D
* This script moves the player object on screen by interacting with the
* rigidbody2d component. Don't forget to set the Gravity Scale to 0 and check
* the Freeze Rotation Z option. If you forget the object will slowly slide
* down the screen.
*
* Animator
* Add an animator component to the player object. The referenced Animator
* controller will have the walking, running, etc animations setup in mecanim
* For the purpose of this script, you will need to configure the following
* parameters in the controller and then set the animation transitions to
* match.
* - yMove : Integer
* - xMove : Boolean
* - moving : Boolean
*
* Finally, attach this script to the player object. At this point, create a
* prefab out of the object.
*
* Enhancements:
* - Add mouse click control to the movement.
******************************************************************************/
public class CharacterMovement : MonoBehaviour
{
/**************************************************************************
* These variables setup references to the player object in the game scene.
* At a minimum, the player object needs to be a 2D sprite and have a 2D
* RigidBody for this script to work. The animation component is not
* critical to the script, but the script will attempt to set animation
* variables so that the player image will appear to move on the screen.
**************************************************************************/
private SpriteRenderer playerSpriteImage;
private Rigidbody2D playerRigidBody2D;
private Animator playerAnim;
/**************************************************************************
* These variables manage the player's movement on screen. Speed can be set
* in the Unity IDE or in code.
**************************************************************************/
//Variable to track how much movement is needed from input
private float movePlayerHorizontal;
private float movePlayerVertical;
private Vector2 movement;
// Speed modifier for player movement
public float speed = 4.0f;
/// <summary>
/// This method is connecting the script to the components of the player object
/// in the scene. The player object should have each of these components added
/// along with this script to make up a complete player.
/// </summary>
void Awake()
{
playerRigidBody2D = (Rigidbody2D)GetComponent(typeof(Rigidbody2D));
playerAnim = (Animator)GetComponent(typeof(Animator));
playerSpriteImage = (SpriteRenderer)GetComponent(typeof(SpriteRenderer));
}
/// <summary>
/// The update method does the work of moving the player object on the screen
/// in the desired direction. It also uses the animation and sprite components
/// to "face" the player in the right direction.
/// </summary>
void Update()
{
// The first step is to get the player's input to determine which direction
// to move the player object, then use speed to set the movement.
movePlayerHorizontal = Input.GetAxis("Horizontal");
movePlayerVertical = Input.GetAxis("Vertical");
movement = new Vector2(movePlayerHorizontal, movePlayerVertical);
playerRigidBody2D.velocity = movement * speed;
// This section handles the animation control to make sure that the player
// object is facing in the right direction during movement. It is basically
// setting animation variables that should be setup in the mecanim library.
// Mecanim does the work of dislaying animations.
if (movePlayerVertical == 0 && movePlayerHorizontal == 0)
{
playerAnim.SetBool("moving", false);
}
else
{
playerAnim.SetBool("moving", true);
}
if (movePlayerVertical != 0)
{
playerAnim.SetBool("xMove", false);
playerSpriteImage.flipX = false;
if (movePlayerVertical > 0)
{
playerAnim.SetInteger("yMove", 1);
}
else if (movePlayerVertical < 0)
{
playerAnim.SetInteger("yMove", -1);
}
}
else
{
playerAnim.SetInteger("yMove", 0);
if (movePlayerHorizontal > 0)
{
playerAnim.SetBool("xMove", true);
playerSpriteImage.flipX = false;
}
else if (movePlayerHorizontal < 0)
{
playerAnim.SetBool("xMove", true);
playerSpriteImage.flipX = true;
}
else
{
playerAnim.SetBool("xMove", false);
}
}
if (movePlayerVertical == 0 && movePlayerHorizontal == 0)
{
playerAnim.SetBool("moving", false);
}
else
{
playerAnim.SetBool("moving", true);
}
}
}

12
Assets/Scripts/Movement/CharacterMovement.cs.meta

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: fdbdfe5bac8dd85419ad1e1c291c20a2
timeCreated: 1491842286
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

19
Assets/Scripts/Movement/FollowCamera.cs

@ -0,0 +1,19 @@
using UnityEngine;
using System.Collections;
public class FollowCamera : MonoBehaviour
{
// Distance between player and camera in horizontal direction
public float xOffset = 0f;
// Distance between player and camera in vertical direction
public float yOffset = 0f;
// Reference to the player's transform.
public Transform player;
void LateUpdate()
{
this.transform.position = new Vector3(player.transform.position.x + xOffset, this.transform.position.y + yOffset, -10);
}
}

12
Assets/Scripts/Movement/FollowCamera.cs.meta

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: dfef3df00cdbaae4399afd9a6df422c9
timeCreated: 1492215937
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

9
Assets/Scripts/Navigation.meta

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: ab58e1276a7891f4ea6a706aaf88f028
folderAsset: yes
timeCreated: 1492636631
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

55
Assets/Scripts/Navigation/NavigationManager.cs

@ -0,0 +1,55 @@
using System.Collections.Generic;
using UnityEngine.SceneManagement;
/// <summary>
/// Maintains information about each possible destination (scene) in the game
/// </summary>
public struct Route
{
public string RouteDescription;
public bool CanTravel;
}
public static class NavigationManager
{
/// <summary>
/// This dictioanry defines all destinations that exist in the game.
/// </summary>
public static Dictionary<string, Route> RouteInformation = new Dictionary<string, Route>()
{
{ "Overworld", new Route { RouteDescription = "The big bad world", CanTravel = true } },
{ "Construction", new Route { RouteDescription = "The construction area", CanTravel = false } },
{ "Town", new Route { RouteDescription = "The main town", CanTravel = true } },
{ "Campsite", new Route { RouteDescription = "The campsite", CanTravel = true } },
};
/// <summary>
/// Searches the dictionary to find if the given destination is defined.
/// </summary>
/// <param name="destination"></param>
/// <returns></returns>
public static string GetRouteInfo(string destination)
{
return RouteInformation.ContainsKey(destination) ? RouteInformation[destination].RouteDescription : null;
}
/// <summary>
/// Determines whether the given destination can be travelled to or not.
/// </summary>
/// <param name="destination"></param>
/// <returns></returns>
public static bool CanNavigate(string destination)
{
return RouteInformation.ContainsKey(destination) ? RouteInformation[destination].CanTravel : false;
}
/// <summary>
/// This method performs the action of loading a new scene. The destination value needs
/// to match the name of a scene in the project.
/// </summary>
/// <param name="destination"></param>
public static void NavigateTo(string destination)
{
SceneManager.LoadScene(destination);
}
}

12
Assets/Scripts/Navigation/NavigationManager.cs.meta

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 7e58405b4e6e73a4da75b63a33adfb28
timeCreated: 1493144484
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

68
Assets/Scripts/Navigation/NavigationPrompt.cs

@ -0,0 +1,68 @@
using UnityEngine;
using UnityEngine.SceneManagement;
/// <summary>
/// This class is attached to a "boundary" in a scene. It handles moving from the
/// current scene to the next scene that the "boundary leads to. For example, this
/// script can be attached to a collider along the side of the scene that leads
/// from a cityscape to an overland.Or this script can be attached to a collider
/// that represents the door on a building that leads to the interior of the building.
///
/// SETUP
/// BoxCollider2D
/// Add a BoxCollider2D to the scene where the "boundary" exists.This class makes
/// use of the object's tag to determine the destination, so add a tag that matches
/// the name of the destination.The name of the destination will match a key in a
/// Dictionary in the NavigationManager. So make sure the spelling matches. Also use
/// the icon feature to make the collider easier to see in the scene view.
/// </summary>
public class NavigationPrompt : MonoBehaviour
{
/// <summary>
/// Used to track the player's starting position on the map when the scene is loaded.
/// </summary>
public Vector3 startingPosition;
/// <summary>
/// When the player object enters the "boundary" check the tag of the boundary
/// and compare it to the Dictionary values in the NavigationManager. If the
/// manager has an entry for the tag AND allows navigation to the tag, then
/// this method will load the scene that matches the tag.
///
/// NOTE: Notice that all three things match; the tag, the key in the Dictionary,
/// and the name of the scene.
/// </summary>
/// <param name="col"></param>
void OnCollisionEnter2D(Collision2D col)
{
// Check if the tag on this object is defined in the Nav Manager
if (NavigationManager.CanNavigate(this.tag))
{
// Log the tag so we can track what we are trying to find in the Dictionary
Debug.Log("attempting to exit via " + tag);
// Use the NavigationManager to load the scene whose name matches the tag
NavigationManager.NavigateTo(this.tag);
// Should we save the player's position on the map?
GameState.saveLastPosition = false;
// Save the Player's position on the map so that when we return the object
// will be in the right place
GameState.SetLastScenePosition(SceneManager.GetActiveScene().name, startingPosition);
}
}
/// <summary>
/// Use this method for objects that are set as triggers.
/// </summary>
/// <param name="col"></param>
void OnTriggerEnter2D(Collider2D col)
{
if (NavigationManager.CanNavigate(this.tag))
{
Debug.Log("attempting to exit via " + tag);
NavigationManager.NavigateTo(this.tag);
GameState.saveLastPosition = false;
GameState.SetLastScenePosition(SceneManager.GetActiveScene().name, startingPosition);
}
}
}

12
Assets/Scripts/Navigation/NavigationPrompt.cs.meta

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 59688b613ac30504d9689ded15fc5350
timeCreated: 1492255614
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

25
Assets/Scripts/Sorting.cs

@ -0,0 +1,25 @@
using UnityEngine;
public class Sorting : MonoBehaviour
{
public Transform player;
// Update is called once per frame
void Update()
{
if (transform.position.y >= player.transform.position.y)
{
//Debug.Log("behind player");
GetComponent<SpriteRenderer>().sortingOrder = (player.GetComponent<SpriteRenderer>().sortingOrder) - 1;
GetComponents<BoxCollider2D>()[1].enabled = false;
GetComponents<BoxCollider2D>()[2].enabled = true;
}
if (transform.position.y < player.transform.position.y)
{
//Debug.Log("in front of player");
GetComponent<SpriteRenderer>().sortingOrder = (player.GetComponent<SpriteRenderer>().sortingOrder) + 1;
GetComponents<BoxCollider2D>()[1].enabled = true;
GetComponents<BoxCollider2D>()[2].enabled = false;
}
}
}

12
Assets/Scripts/Sorting.cs.meta

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 6e41b51eab5f880408888df7bfb02a9a
timeCreated: 1492637346
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

9
Assets/Scripts/Utility.meta

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: dc04eb1fd476b4a4fb2d6a2905554a71
folderAsset: yes
timeCreated: 1493304594
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

78
Assets/Scripts/Utility/Singleton.cs

@ -0,0 +1,78 @@
using UnityEngine;
/// <summary>
/// Be aware this will not prevent a non singleton constructor
/// such as `T myT = new T();`
/// To prevent that, add `protected T () {}` to your singleton class.
///
/// As a note, this is made as MonoBehaviour because we need Coroutines.
/// </summary>
public class Singleton<T> : MonoBehaviour where T : MonoBehaviour
{
private static T _instance;
private static object _lock = new object();
public static T Instance
{
get
{
if (applicationIsQuitting)
{
Debug.LogWarning("[Singleton] Instance '" + typeof(T) +
"' already destroyed on application quit." +
" Won't create again - returning null.");
return null;
}
lock (_lock)
{
if (_instance == null)
{
_instance = (T)FindObjectOfType(typeof(T));
if (FindObjectsOfType(typeof(T)).Length > 1)
{
Debug.LogError("[Singleton] Something went really wrong " +
" - there should never be more than 1 singleton!" +
" Reopenning the scene might fix it.");
return _instance;
}
if (_instance == null)
{
GameObject singleton = new GameObject();
_instance = singleton.AddComponent<T>();
singleton.name = "(singleton) " + typeof(T).ToString();
DontDestroyOnLoad(singleton);
Debug.Log("[Singleton] An instance of " + typeof(T) +
" is needed in the scene, so '" + singleton +
"' was created with DontDestroyOnLoad.");
}
else
{
Debug.Log("[Singleton] Using instance already created: " +
_instance.gameObject.name);
}
}
return _instance;
}
}
}
private static bool applicationIsQuitting = false;
/// <summary>
/// When Unity quits, it destroys objects in a random order.
/// In principle, a Singleton is only destroyed when application quits.
/// If any script calls Instance after it have been destroyed,
/// it will create a buggy ghost object that will stay on the Editor scene
/// even after stopping playing the Application. Really bad!
/// So, this was made to be sure we're not creating that buggy ghost object.
/// </summary>
public void OnDestroy()
{
applicationIsQuitting = true;
}
}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save