Add scene manager for items

Start rebuild Save & Load game system
This commit is contained in:
kabix09 2022-06-17 22:22:19 +02:00
parent af2542f26d
commit 602c94726a
55 changed files with 9606 additions and 2354 deletions

View File

@ -51,16 +51,19 @@
<Compile Include="Assets\Scripts\SettingsButton.cs" />
<Compile Include="Assets\Scripts\UI\ISlot.cs" />
<Compile Include="Assets\Scripts\Enemies&apos; Scprits\Enemy.cs" />
<Compile Include="Assets\Scripts\Objects\GoldOre.cs" />
<Compile Include="Assets\closePossibleButtonInfo.cs" />
<Compile Include="Assets\BreakOre.cs" />
<Compile Include="Assets\Scripts\Inventory\InventorySlot.cs" />
<Compile Include="Assets\Scripts\Task\TaskPanelController.cs" />
<Compile Include="Assets\Scripts\Task\TaskManager.cs" />
<Compile Include="Assets\Scripts\QuitGame.cs" />
<Compile Include="Assets\Scripts\SceneManager\SaveItem\EquippableItemData\EquippableItemData.cs" />
<Compile Include="Assets\NewGame.cs" />
<Compile Include="Assets\Scripts\Knockback.cs" />
<Compile Include="Assets\Scripts\Inventory\InventoryManager.cs" />
<Compile Include="Assets\Scripts\Dialogue.cs" />
<Compile Include="Assets\Scripts\SceneManager\SaveItem\ItemData\ItemData.cs" />
<Compile Include="Assets\Scripts\Item\ItemSlot.cs" />
<Compile Include="Assets\Scripts\Item\Item.cs" />
<Compile Include="Assets\Scripts\Equipment\EquipmentPanelController.cs" />
@ -70,14 +73,18 @@
<Compile Include="Assets\CloseIfQuestPanel.cs" />
<Compile Include="Assets\TreeParticleEffect.cs" />
<Compile Include="Assets\SaveMusicSettings.cs" />
<Compile Include="Assets\Scripts\SceneManager\SaveItem\EquippableItemPrefarbAssetData.cs" />
<Compile Include="Assets\Scripts\Equipment\EquipmentSlot.cs" />
<Compile Include="Assets\Scripts\DealDamage.cs" />
<Compile Include="Assets\Scripts\SaveSoundSettings.cs" />
<Compile Include="Assets\Scripts\MenuGUI.cs" />
<Compile Include="Assets\Scripts\SaveSystem.cs" />
<Compile Include="Assets\Scripts\NPCs&apos; Scripts\NPCQuest.cs" />
<Compile Include="Assets\Scripts\Task\Task.cs" />
<Compile Include="Assets\Scripts\FloatValue.cs" />
<Compile Include="Assets\Scripts\SceneManager\SaveItem\SaveEquitableItemSystem.cs" />
<Compile Include="Assets\Scripts\Item\EquippableItem.cs" />
<Compile Include="Assets\Scripts\SceneManager\LocalSceneManager.cs" />
<Compile Include="Assets\PlayerName.cs" />
<Compile Include="Assets\breakable.cs" />
<Compile Include="Assets\Scripts\Task\TaskBox.cs" />
@ -90,6 +97,7 @@
<Compile Include="Assets\Scripts\Item\PickableController.cs" />
<Compile Include="Assets\Scripts\Chest\ChestController.cs" />
<Compile Include="Assets\Scripts\DoorBehaviour.cs" />
<Compile Include="Assets\Scripts\SceneManager\SaveItem\EquippableItemPrefarbAsset.cs" />
<Compile Include="Assets\Scripts\Enemies&apos; Scprits\PatrollingEnemy.cs" />
<Compile Include="Assets\Scripts\Chest\ChestPanelController.cs" />
<Compile Include="Assets\Scripts\Inventory\InventoryPanelController.cs" />

View File

@ -49,6 +49,7 @@ public class BreakOre : MonoBehaviour
gameObject.SetActive(false);
PlayerPrefs.SetInt(name, isBroken);
Debug.Log("drop item");
// drop item
gameObject.GetComponent<GoldOre>().DropItem();
}
yield return new WaitForSeconds(1);

View File

@ -13,11 +13,11 @@ MonoBehaviour:
m_Name: Axe
m_EditorClassIdentifier:
id: 0
name: Axe1
name: Axe_one
description: Lumberjack's Axe
level: 1
image: {fileID: 21300000, guid: d7a7292796eda0941a6a863b7d66bbcb, type: 3}
itemModel: {fileID: 0}
itemModel: {fileID: 1826809974269949497, guid: 83fa1f81238efb541bd77405dcf33dd1, type: 3}
StrengthBonus: 0
AgilityBonus: 0
InteligenceBonus: 0

215
Assets/Items/Axe.prefab Normal file
View File

@ -0,0 +1,215 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &561869551291378102
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 561869551291378103}
- component: {fileID: 561869551291378106}
- component: {fileID: 561869551291378105}
- component: {fileID: 561869551291378104}
m_Layer: 0
m_Name: E-InteractionMSG
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &561869551291378103
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 561869551291378102}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: -321.1878}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 7621034958370762905}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!58 &561869551291378106
CircleCollider2D:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 561869551291378102}
m_Enabled: 1
m_Density: 1
m_Material: {fileID: 0}
m_IsTrigger: 1
m_UsedByEffector: 0
m_UsedByComposite: 0
m_Offset: {x: 0.03623438, y: -0.0849843}
serializedVersion: 2
m_Radius: 2
--- !u!114 &561869551291378105
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 561869551291378102}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 19883581ad8bbd9458fc7bc8c4bb3279, type: 3}
m_Name:
m_EditorClassIdentifier:
Panel: {fileID: 1131349084736352762, guid: bd644a38094b0334b979c0234699f069, type: 3}
OtherPanel: {fileID: 9124304227729624651, guid: e9cbfeb9e69af1245bc3180e86ff23f6, type: 3}
SecondPanel: {fileID: 4888099765917562817, guid: c5397665a1fef4d4e8de420a7ee4ad74, type: 3}
PanelAbove: {fileID: 4787883790006063180, guid: b224f3239791233448271af67a076b03, type: 3}
_tmpPanel: {fileID: 0}
_tmpOtherPanel: {fileID: 0}
_tmpSecondPanel: {fileID: 0}
_tmpPanelAbove: {fileID: 0}
obj: {fileID: 1826809974269949497}
isAllowedToShowPanels: 1
--- !u!114 &561869551291378104
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 561869551291378102}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 1413ab24006454d478890f637949d6d4, type: 3}
m_Name:
m_EditorClassIdentifier:
Obj: {fileID: 1826809974269949497}
--- !u!1 &1826809974269949497
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7621034958370762905}
- component: {fileID: 2338847391325924405}
- component: {fileID: 4445501478028932064}
- component: {fileID: 240224230425431318}
m_Layer: 0
m_Name: Axe
m_TagString: Pickable
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &7621034958370762905
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1826809974269949497}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.4, y: 0.4, z: 1}
m_Children:
- {fileID: 561869551291378103}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!212 &2338847391325924405
SpriteRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1826809974269949497}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 0
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
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_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
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: d7a7292796eda0941a6a863b7d66bbcb, 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, y: 1}
m_AdaptiveModeThreshold: 0.5
m_SpriteTileMode: 0
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
m_SpriteSortPoint: 0
--- !u!114 &4445501478028932064
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1826809974269949497}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: c261410eee3e5d640abd23159c28b3cc, type: 3}
m_Name:
m_EditorClassIdentifier:
item: {fileID: 11400000, guid: 6e4f9a44bbdb0b5418932889316a45eb, type: 2}
name:
name2:
triggered: 0
isPicked: 0
HandleIndexInScelenObjectList: 0
--- !u!61 &240224230425431318
BoxCollider2D:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1826809974269949497}
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.0625, w: 0.0625}
pivot: {x: 0.5, y: 0.5}
oldSize: {x: 1, y: 1}
newSize: {x: 1, y: 1}
adaptiveTilingThreshold: 0.5
drawMode: 0
adaptiveTiling: 0
m_AutoTiling: 0
serializedVersion: 2
m_Size: {x: 1, y: 1}
m_EdgeRadius: 0

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 83fa1f81238efb541bd77405dcf33dd1
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -13,11 +13,11 @@ MonoBehaviour:
m_Name: Gold Ore
m_EditorClassIdentifier:
id: 0
name: Gold Ore(Clone)
name: Gold Ore
description:
level: 0
image: {fileID: 21300000, guid: 83bbd515e788cbd4090c1c6649b76a29, type: 3}
itemModel: {fileID: 6411895813158790434, guid: 94d8ee5818227e5488d532924c24f2d3, type: 3}
itemModel: {fileID: 6960265943931164901, guid: 7aaf1038c5485164ea90044b40c5baa1, type: 3}
StrengthBonus: 0
AgilityBonus: 0
InteligenceBonus: 0

View File

@ -1,6 +1,6 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &6411895813158790434
--- !u!1 &4147099991001364001
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
@ -8,10 +8,93 @@ GameObject:
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2220863587792944922}
- component: {fileID: 1840587176586899375}
- component: {fileID: 610457179104247339}
- component: {fileID: 4595244416196753667}
- component: {fileID: 3467416686219291746}
- component: {fileID: 7871896645143177152}
- component: {fileID: 1079832373391868897}
- component: {fileID: 8110589656666280150}
m_Layer: 0
m_Name: E-InteractionMSG
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &3467416686219291746
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4147099991001364001}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1.4285713, y: 1.4285713, z: 1}
m_Children: []
m_Father: {fileID: 2791776640389055197}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!58 &7871896645143177152
CircleCollider2D:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4147099991001364001}
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}
serializedVersion: 2
m_Radius: 1
--- !u!114 &1079832373391868897
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4147099991001364001}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 19883581ad8bbd9458fc7bc8c4bb3279, type: 3}
m_Name:
m_EditorClassIdentifier:
Panel: {fileID: 1131349084736352762, guid: bd644a38094b0334b979c0234699f069, type: 3}
OtherPanel: {fileID: 9124304227729624651, guid: e9cbfeb9e69af1245bc3180e86ff23f6, type: 3}
SecondPanel: {fileID: 4888099765917562817, guid: c5397665a1fef4d4e8de420a7ee4ad74, type: 3}
PanelAbove: {fileID: 4787883790006063180, guid: b224f3239791233448271af67a076b03, type: 3}
_tmpPanel: {fileID: 0}
_tmpOtherPanel: {fileID: 0}
_tmpSecondPanel: {fileID: 0}
_tmpPanelAbove: {fileID: 0}
obj: {fileID: 6960265943931164901}
--- !u!114 &8110589656666280150
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4147099991001364001}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 1413ab24006454d478890f637949d6d4, type: 3}
m_Name:
m_EditorClassIdentifier:
Obj: {fileID: 6960265943931164901}
--- !u!1 &6960265943931164901
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2791776640389055197}
- component: {fileID: 2443029021407646312}
- component: {fileID: 3464589912944706540}
- component: {fileID: 552222884607673540}
m_Layer: 0
m_Name: Gold Ore
m_TagString: Untagged
@ -19,27 +102,28 @@ GameObject:
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &2220863587792944922
--- !u!4 &2791776640389055197
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6411895813158790434}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: -20.07, z: 0}
m_LocalScale: {x: 0.7, y: 0.7, z: 1}
m_Children: []
m_GameObject: {fileID: 6960265943931164901}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 70.5, y: 39.5, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 3467416686219291746}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!212 &1840587176586899375
--- !u!212 &2443029021407646312
SpriteRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6411895813158790434}
m_GameObject: {fileID: 6960265943931164901}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
@ -84,13 +168,13 @@ SpriteRenderer:
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
m_SpriteSortPoint: 0
--- !u!114 &610457179104247339
--- !u!114 &3464589912944706540
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6411895813158790434}
m_GameObject: {fileID: 6960265943931164901}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: c261410eee3e5d640abd23159c28b3cc, type: 3}
@ -101,13 +185,14 @@ MonoBehaviour:
name2:
triggered: 0
isPicked: 0
--- !u!61 &4595244416196753667
HandleIndexInScelenObjectList: 0
--- !u!61 &552222884607673540
BoxCollider2D:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6411895813158790434}
m_GameObject: {fileID: 6960265943931164901}
m_Enabled: 1
m_Density: 1
m_Material: {fileID: 0}

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 94d8ee5818227e5488d532924c24f2d3
guid: 7aaf1038c5485164ea90044b40c5baa1
PrefabImporter:
externalObjects: {}
userData:

View File

@ -13,7 +13,7 @@ MonoBehaviour:
m_Name: Pickaxe
m_EditorClassIdentifier:
id: 0
name: Pickaxe1
name: pickaxe_test
description: Example pickaxe
level: 1
image: {fileID: 8959118705387878318, guid: 25e473b59d2d7534e803be0a2825e0f7, type: 3}
@ -23,4 +23,4 @@ MonoBehaviour:
InteligenceBonus: 0
VitalityBonus: 0
isStackable: 0
EquipmentType: 4
EquipmentType: 0

View File

@ -1,5 +1,88 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &1754993745
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1754993746}
- component: {fileID: 1754993748}
- component: {fileID: 1754993747}
- component: {fileID: 1754993749}
m_Layer: 0
m_Name: E-InteractionMSG
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1754993746
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1754993745}
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: 9081071845930167557}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!58 &1754993748
CircleCollider2D:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1754993745}
m_Enabled: 1
m_Density: 1
m_Material: {fileID: 0}
m_IsTrigger: 1
m_UsedByEffector: 0
m_UsedByComposite: 0
m_Offset: {x: 0.03623438, y: -0.0849843}
serializedVersion: 2
m_Radius: 2.3203936
--- !u!114 &1754993747
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1754993745}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 19883581ad8bbd9458fc7bc8c4bb3279, type: 3}
m_Name:
m_EditorClassIdentifier:
Panel: {fileID: 1131349084736352762, guid: bd644a38094b0334b979c0234699f069, type: 3}
OtherPanel: {fileID: 9124304227729624651, guid: e9cbfeb9e69af1245bc3180e86ff23f6, type: 3}
SecondPanel: {fileID: 4888099765917562817, guid: c5397665a1fef4d4e8de420a7ee4ad74, type: 3}
PanelAbove: {fileID: 4787883790006063180, guid: b224f3239791233448271af67a076b03, type: 3}
_tmpPanel: {fileID: 0}
_tmpOtherPanel: {fileID: 0}
_tmpSecondPanel: {fileID: 0}
_tmpPanelAbove: {fileID: 0}
obj: {fileID: 9081071845930167562}
--- !u!114 &1754993749
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1754993745}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 1413ab24006454d478890f637949d6d4, type: 3}
m_Name:
m_EditorClassIdentifier:
Obj: {fileID: 9081071845930167562}
--- !u!1 &9081071845930167562
GameObject:
m_ObjectHideFlags: 0
@ -29,8 +112,9 @@ Transform:
m_GameObject: {fileID: 9081071845930167562}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 5, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_LocalScale: {x: 0.4, y: 0.4, z: 1}
m_Children:
- {fileID: 1754993746}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -145,3 +229,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
item: {fileID: 11400000, guid: aaa7c520aded1bc42a26b7ce43484010, type: 2}
name:
name2:
triggered: 0
isPicked: 0
HandleIndexInScelenObjectList: 0

View File

@ -10,50 +10,85 @@ public class OpenPanelOnCollision : MonoBehaviour
public GameObject SecondPanel;
public GameObject PanelAbove;
// Handle dynamic build GameObject's
public GameObject _tmpPanel;
public GameObject _tmpOtherPanel;
public GameObject _tmpSecondPanel;
public GameObject _tmpPanelAbove;
private GameObject globalGUI;
public GameObject obj;
private bool inRange = false;
public bool isAllowedToShowPanels = true; // TODO: controle its value - mprove later with cooperaition with "closePossibleButtonInfo" script
public void Awake()
{
this.globalGUI = GameObject.FindGameObjectsWithTag("GUI")[0];
}
public void ClearPanels()
{
if(_tmpPanel) Destroy(_tmpPanel);
if(_tmpSecondPanel) Destroy(_tmpSecondPanel);
if(_tmpPanelAbove) Destroy(_tmpPanelAbove);
}
private void OnDestroy()
{
this.ClearPanels();
}
private void OnTriggerEnter2D(Collider2D collision)
{
if(collision.tag == "Player")
if(collision.tag == "Player" && isAllowedToShowPanels)
{
inRange = true;
if(SecondPanel.active == false)
if(!_tmpSecondPanel)
{
Panel.SetActive(true);
if(!_tmpPanel) {_tmpPanel = Instantiate(Panel, Panel.transform.position, Quaternion.identity, globalGUI.transform); _tmpPanel.transform.localPosition = Panel.transform.position;}
//Panel.SetActive(true);
}
else
{
PanelAbove.SetActive(true);
if(!_tmpPanelAbove) { _tmpPanelAbove = Instantiate(PanelAbove, PanelAbove.transform.position, Quaternion.identity, globalGUI.transform); _tmpPanelAbove.transform.localPosition = PanelAbove.transform.position;}
//PanelAbove.SetActive(true);
}
}
}
private void OnTriggerStay2D(Collider2D collision)
{
if (collision.tag == "Player")
if (collision.tag == "Player" && isAllowedToShowPanels)
{
inRange = true;
if(OtherPanel.active == true)
if(_tmpOtherPanel) //OtherPanel.active == true
{
if (SecondPanel.active == false)
if (!_tmpSecondPanel) //SecondPanel.active == false
{
Panel.SetActive(false);
if(_tmpPanel) Destroy(_tmpPanel);
//Panel.SetActive(false);
}
else
{
SecondPanel.SetActive(false);
PanelAbove.SetActive(false);
if(_tmpSecondPanel) Destroy(_tmpSecondPanel);
if(_tmpPanelAbove) Destroy(_tmpPanelAbove);
// SecondPanel.SetActive(false);
// PanelAbove.SetActive(false);
}
}
else if (SecondPanel.active == false)
else if (!_tmpSecondPanel) // SecondPanel.active == false
{
Panel.SetActive(true);
if(!_tmpPanel) { _tmpPanel = Instantiate(Panel, Panel.transform.position, Quaternion.identity, globalGUI.transform); _tmpPanel.transform.localPosition = Panel.transform.position;}
//Panel.SetActive(true);
}
else
{
PanelAbove.SetActive(true);
if(!_tmpPanelAbove) { _tmpPanelAbove = Instantiate(PanelAbove, PanelAbove.transform.position, Quaternion.identity, globalGUI.transform); _tmpPanelAbove.transform.localPosition = PanelAbove.transform.position;}
//PanelAbove.SetActive(true);
}
}
}
@ -64,7 +99,8 @@ public class OpenPanelOnCollision : MonoBehaviour
yield return new WaitForSeconds(0.3f);
if(inRange == false)
{
Panel.SetActive(false);
if(_tmpPanel) Destroy(_tmpPanel);
//Panel.SetActive(false);
}
}
@ -73,7 +109,8 @@ public class OpenPanelOnCollision : MonoBehaviour
yield return new WaitForSeconds(0.3f);
if (inRange == false)
{
PanelAbove.SetActive(false);
if(_tmpPanelAbove) Destroy(_tmpPanelAbove);
//PanelAbove.SetActive(false);
}
}
@ -82,27 +119,32 @@ public class OpenPanelOnCollision : MonoBehaviour
if(obj.active == false)
{
if (Panel.active == true)
if (_tmpPanel) //Panel.active == true
{
Panel.SetActive(false);
Destroy(_tmpPanel);
//Panel.SetActive(false);
}
else if (PanelAbove.active == true)
else if (_tmpPanelAbove) //PanelAbove.active == true
{
PanelAbove.SetActive(false);
Destroy(_tmpPanelAbove);
//PanelAbove.SetActive(false);
}
}
if(OtherPanel.active == true)
if(_tmpOtherPanel) //OtherPanel.active == true
{
StartCoroutine(Timer1());
}
if(SecondPanel.active == false)
if(!_tmpSecondPanel) //SecondPanel.active == false
{
if(PanelAbove.active == true)
if(_tmpPanelAbove) //PanelAbove.active == true
{
StartCoroutine(Timer2());
PanelAbove.SetActive(false);
Panel.SetActive(true);
Destroy(_tmpPanelAbove);
//PanelAbove.SetActive(false);
if(!_tmpPanel) { _tmpPanel = Instantiate(Panel, Panel.transform.position, Quaternion.identity, globalGUI.transform); _tmpPanel.transform.localPosition = Panel.transform.position;}
//Panel.SetActive(true);
}
}
}
@ -110,11 +152,11 @@ public class OpenPanelOnCollision : MonoBehaviour
private void OnTriggerExit2D(Collider2D collision)
{
inRange = false;
if(Panel.active == true)
if(_tmpPanel) //Panel.active == true
{
StartCoroutine(Timer1());
}
else if(PanelAbove.active == true)
else if(_tmpPanelAbove) //PanelAbove.active == true
{
StartCoroutine(Timer2());
}

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: a119bcb1083fe584d9fa28bd1fd8f761
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,419 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &1885730411804952347
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1885730411804952346}
- component: {fileID: 1885730411804952344}
- component: {fileID: 1885730411804952345}
m_Layer: 5
m_Name: DialoguePanel
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
--- !u!224 &1885730411804952346
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1885730411804952347}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.94999987, y: 0.19999997, z: 4.799999}
m_Children:
- {fileID: 1885730413093907279}
- {fileID: 1885730412086419536}
- {fileID: 1885730412951883911}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0.00012207031, y: -127.5}
m_SizeDelta: {x: 0, y: 255}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &1885730411804952344
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1885730411804952347}
m_CullTransparentMesh: 1
--- !u!114 &1885730411804952345
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1885730411804952347}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: 99ef742ea21894b4d995d1bc6209bd91, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!1 &1885730412086419537
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1885730412086419536}
- component: {fileID: 1885730412086419542}
- component: {fileID: 1885730412086419543}
m_Layer: 5
m_Name: DialogueText
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1885730412086419536
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1885730412086419537}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 5, z: 1}
m_Children: []
m_Father: {fileID: 1885730411804952346}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -6, y: -80}
m_SizeDelta: {x: 700, y: 60}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &1885730412086419542
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1885730412086419537}
m_CullTransparentMesh: 1
--- !u!114 &1885730412086419543
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1885730412086419537}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 14
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 10
m_MaxSize: 40
m_Alignment: 0
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: Here is what the dialogue says
--- !u!1 &1885730412951883904
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1885730412951883911}
- component: {fileID: 1885730412951883909}
- component: {fileID: 1885730412951883910}
m_Layer: 5
m_Name: ContinueDialogue
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1885730412951883911
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1885730412951883904}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1.2, y: 1.2, z: 1}
m_Children:
- {fileID: 1885730413234353643}
m_Father: {fileID: 1885730411804952346}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 310, y: -200}
m_SizeDelta: {x: 100, y: 60}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &1885730412951883909
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1885730412951883904}
m_CullTransparentMesh: 1
--- !u!114 &1885730412951883910
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1885730412951883904}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_WrapAround: 0
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 0}
m_OnClick:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 0}
m_TargetAssemblyTypeName: NPCDialogue, Assembly-CSharp
m_MethodName: DisplayNextSentence
m_Mode: 1
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
--- !u!1 &1885730413093907272
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1885730413093907279}
- component: {fileID: 1885730413093907277}
- component: {fileID: 1885730413093907278}
m_Layer: 5
m_Name: NPC name
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1885730413093907279
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1885730413093907272}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1.2, y: 6, z: 1}
m_Children: []
m_Father: {fileID: 1885730411804952346}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -260, y: 177.28549}
m_SizeDelta: {x: 160, y: 30}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &1885730413093907277
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1885730413093907272}
m_CullTransparentMesh: 1
--- !u!114 &1885730413093907278
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1885730413093907272}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 2100000, guid: 6b506a7e42917d6489d0e806d6b4f62d, type: 2}
m_Color: {r: 0.63529414, g: 0.44705886, b: 0.2901961, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 12800000, guid: 6b506a7e42917d6489d0e806d6b4f62d, type: 2}
m_FontSize: 0
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 0
m_MaxSize: 40
m_Alignment: 3
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: NPC NAME
--- !u!1 &1885730413234353652
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1885730413234353643}
- component: {fileID: 1885730413234353641}
- component: {fileID: 1885730413234353642}
m_Layer: 5
m_Name: Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1885730413234353643
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1885730413234353652}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.95, y: 4.5, z: 1}
m_Children: []
m_Father: {fileID: 1885730412951883911}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &1885730413234353641
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1885730413234353652}
m_CullTransparentMesh: 1
--- !u!114 &1885730413234353642
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1885730413234353652}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.63529414, g: 0.44705883, b: 0.2901961, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 12800000, guid: 6b506a7e42917d6489d0e806d6b4f62d, type: 2}
m_FontSize: 0
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 0
m_MaxSize: 40
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: continue >>

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 65dcf7a268ef38b49ad53e76fd096980
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,157 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &1131349084736352762
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1131349084736352765}
- component: {fileID: 1131349084736352767}
- component: {fileID: 1131349084736352764}
m_Layer: 5
m_Name: E-InteractivePanel
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1131349084736352765
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1131349084736352762}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.3, y: 0.07, z: 1}
m_Children:
- {fileID: 1131349086280024339}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: -180}
m_SizeDelta: {x: 800, y: 810}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &1131349084736352767
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1131349084736352762}
m_CullTransparentMesh: 1
--- !u!114 &1131349084736352764
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1131349084736352762}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: 3d8241e686411ad46a7e2927a20025e7, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!1 &1131349086280024336
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1131349086280024339}
- component: {fileID: 1131349086280024341}
- component: {fileID: 1131349086280024338}
m_Layer: 5
m_Name: Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1131349086280024339
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1131349086280024336}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 4.2, y: 22, z: 1}
m_Children: []
m_Father: {fileID: 1131349084736352765}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 160, y: 30}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &1131349086280024341
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1131349086280024336}
m_CullTransparentMesh: 1
--- !u!114 &1131349086280024338
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1131349086280024336}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.63529414, g: 0.44705883, b: 0.2901961, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 12800000, guid: 5bdfdf09c91525342a034f10141adb76, type: 2}
m_FontSize: 0
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 0
m_MaxSize: 40
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: PRESS 'E' TO INTERACT

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: bd644a38094b0334b979c0234699f069
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,157 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &4787883790006063180
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4787883790006063183}
- component: {fileID: 4787883790006063169}
- component: {fileID: 4787883790006063182}
m_Layer: 5
m_Name: E-InteractivePanelAbove
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &4787883790006063183
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4787883790006063180}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.3, y: 0.07, z: 1}
m_Children:
- {fileID: 4787883790401429461}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: -122.5}
m_SizeDelta: {x: 800, y: 695}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &4787883790006063169
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4787883790006063180}
m_CullTransparentMesh: 1
--- !u!114 &4787883790006063182
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4787883790006063180}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: 3d8241e686411ad46a7e2927a20025e7, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!1 &4787883790401429458
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4787883790401429461}
- component: {fileID: 4787883790401429463}
- component: {fileID: 4787883790401429460}
m_Layer: 5
m_Name: Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &4787883790401429461
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4787883790401429458}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 4.2, y: 22, z: 1}
m_Children: []
m_Father: {fileID: 4787883790006063183}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 160, y: 30}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &4787883790401429463
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4787883790401429458}
m_CullTransparentMesh: 1
--- !u!114 &4787883790401429460
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4787883790401429458}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.63529414, g: 0.44705883, b: 0.2901961, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 12800000, guid: 5bdfdf09c91525342a034f10141adb76, type: 2}
m_FontSize: 0
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 0
m_MaxSize: 40
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: PRESS 'E' TO INTERACT

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: b224f3239791233448271af67a076b03
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,601 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &5245844910936323229
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5245844910936323230}
- component: {fileID: 5245844910936323232}
- component: {fileID: 5245844910936323231}
m_Layer: 5
m_Name: YesButton
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &5245844910936323230
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5245844910936323229}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1.2, y: 1.2, z: 1}
m_Children:
- {fileID: 5245844911406616997}
m_Father: {fileID: 5245844912172010178}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -316.9, y: -40}
m_SizeDelta: {x: 100, y: 60}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &5245844910936323232
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5245844910936323229}
m_CullTransparentMesh: 1
--- !u!114 &5245844910936323231
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5245844910936323229}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_WrapAround: 0
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 0}
m_OnClick:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 0}
m_TargetAssemblyTypeName: NPCDialogue, Assembly-CSharp
m_MethodName: QuestAccepted
m_Mode: 1
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
--- !u!1 &5245844911406616996
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5245844911406616997}
- component: {fileID: 5245844911406616999}
- component: {fileID: 5245844911406616998}
m_Layer: 5
m_Name: Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &5245844911406616997
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5245844911406616996}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.95, y: 4.5, z: 1}
m_Children: []
m_Father: {fileID: 5245844910936323230}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 100, y: 20}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &5245844911406616999
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5245844911406616996}
m_CullTransparentMesh: 1
--- !u!114 &5245844911406616998
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5245844911406616996}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.63529414, g: 0.44705883, b: 0.2901961, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 12800000, guid: 6b506a7e42917d6489d0e806d6b4f62d, type: 2}
m_FontSize: 0
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 0
m_MaxSize: 40
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: << yes >>
--- !u!1 &5245844911608747604
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5245844911608747605}
- component: {fileID: 5245844911608747607}
- component: {fileID: 5245844911608747606}
m_Layer: 5
m_Name: NotNowButton
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &5245844911608747605
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5245844911608747604}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1.2, y: 1.2, z: 1}
m_Children:
- {fileID: 5245844912008955765}
m_Father: {fileID: 5245844912172010178}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -292.2, y: -160}
m_SizeDelta: {x: 130, y: 60}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &5245844911608747607
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5245844911608747604}
m_CullTransparentMesh: 1
--- !u!114 &5245844911608747606
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5245844911608747604}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_WrapAround: 0
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 0}
m_OnClick:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 0}
m_TargetAssemblyTypeName: NPCDialogue, Assembly-CSharp
m_MethodName: EndDialogue
m_Mode: 1
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
--- !u!1 &5245844912008955764
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5245844912008955765}
- component: {fileID: 5245844912008955767}
- component: {fileID: 5245844912008955766}
m_Layer: 5
m_Name: Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &5245844912008955765
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5245844912008955764}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.95, y: 4.5, z: 1}
m_Children: []
m_Father: {fileID: 5245844911608747605}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 130, y: 20}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &5245844912008955767
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5245844912008955764}
m_CullTransparentMesh: 1
--- !u!114 &5245844912008955766
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5245844912008955764}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.63529414, g: 0.44705883, b: 0.2901961, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 12800000, guid: 6b506a7e42917d6489d0e806d6b4f62d, type: 2}
m_FontSize: 0
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 0
m_MaxSize: 40
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: << not now >>
--- !u!1 &5245844912172010177
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5245844912172010178}
- component: {fileID: 5245844912172010180}
- component: {fileID: 5245844912172010179}
m_Layer: 5
m_Name: QuestPanel
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
--- !u!224 &5245844912172010178
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5245844912172010177}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.95000404, y: 0.19999997, z: 4.799999}
m_Children:
- {fileID: 5245844912441090182}
- {fileID: 5245844912540369922}
- {fileID: 5245844910936323230}
- {fileID: 5245844911608747605}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: -127.5}
m_SizeDelta: {x: 0, y: 255}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &5245844912172010180
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5245844912172010177}
m_CullTransparentMesh: 1
--- !u!114 &5245844912172010179
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5245844912172010177}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: 99ef742ea21894b4d995d1bc6209bd91, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!1 &5245844912441090181
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5245844912441090182}
- component: {fileID: 5245844912441090184}
- component: {fileID: 5245844912441090183}
m_Layer: 5
m_Name: NPC name
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &5245844912441090182
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5245844912441090181}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1.2, y: 6, z: 1}
m_Children: []
m_Father: {fileID: 5245844912172010178}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -265.6798, y: 199.35913}
m_SizeDelta: {x: 150.5337, y: 22.642}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &5245844912441090184
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5245844912441090181}
m_CullTransparentMesh: 1
--- !u!114 &5245844912441090183
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5245844912441090181}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 2100000, guid: 6b506a7e42917d6489d0e806d6b4f62d, type: 2}
m_Color: {r: 0.63529414, g: 0.44705886, b: 0.2901961, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 12800000, guid: 6b506a7e42917d6489d0e806d6b4f62d, type: 2}
m_FontSize: 0
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 0
m_MaxSize: 40
m_Alignment: 3
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: NPC NAME
--- !u!1 &5245844912540369921
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5245844912540369922}
- component: {fileID: 5245844912540369924}
- component: {fileID: 5245844912540369923}
m_Layer: 5
m_Name: DialogueText
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &5245844912540369922
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5245844912540369921}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 5, z: 1}
m_Children: []
m_Father: {fileID: 5245844912172010178}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -4.4509, y: 65}
m_SizeDelta: {x: 703.0981, y: 20}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &5245844912540369924
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5245844912540369921}
m_CullTransparentMesh: 1
--- !u!114 &5245844912540369923
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5245844912540369921}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 0
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 0
m_MaxSize: 40
m_Alignment: 0
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: Will you help me?

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: bb5308fba8936aa479d242e38a056110
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,157 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &4888099765392282739
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4888099765392282738}
- component: {fileID: 4888099765392282736}
- component: {fileID: 4888099765392282737}
m_Layer: 5
m_Name: Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &4888099765392282738
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4888099765392282739}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 4.2, y: 22, z: 1}
m_Children: []
m_Father: {fileID: 4888099765917562816}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 160, y: 30}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &4888099765392282736
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4888099765392282739}
m_CullTransparentMesh: 1
--- !u!114 &4888099765392282737
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4888099765392282739}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.63529414, g: 0.44705883, b: 0.2901961, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 12800000, guid: 5bdfdf09c91525342a034f10141adb76, type: 2}
m_FontSize: 0
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 0
m_MaxSize: 40
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: PRESS 'SPACEBAR' TO HIT
--- !u!1 &4888099765917562817
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4888099765917562816}
- component: {fileID: 4888099765917562822}
- component: {fileID: 4888099765917562823}
m_Layer: 5
m_Name: Spacebar-InteractivePanel
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &4888099765917562816
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4888099765917562817}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.3, y: 0.07, z: 1}
m_Children:
- {fileID: 4888099765392282738}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: -180}
m_SizeDelta: {x: 800, y: 810}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &4888099765917562822
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4888099765917562817}
m_CullTransparentMesh: 1
--- !u!114 &4888099765917562823
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4888099765917562817}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: 3d8241e686411ad46a7e2927a20025e7, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: c5397665a1fef4d4e8de420a7ee4ad74
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,157 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &1870329928343061683
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1870329928343061684}
- component: {fileID: 1870329928343061686}
- component: {fileID: 1870329928343061685}
m_Layer: 5
m_Name: Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1870329928343061684
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1870329928343061683}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 4.2, y: 22, z: 1}
m_Children: []
m_Father: {fileID: 1870329930056654066}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 160, y: 30}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &1870329928343061686
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1870329928343061683}
m_CullTransparentMesh: 1
--- !u!114 &1870329928343061685
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1870329928343061683}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.63529414, g: 0.44705883, b: 0.2901961, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 12800000, guid: 5bdfdf09c91525342a034f10141adb76, type: 2}
m_FontSize: 0
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 0
m_MaxSize: 40
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: PRESS 'SPACEBAR' TO HIT
--- !u!1 &1870329930056654065
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1870329930056654066}
- component: {fileID: 1870329930056654068}
- component: {fileID: 1870329930056654067}
m_Layer: 5
m_Name: Spacebar-InteractivePanelAbove
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1870329930056654066
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1870329930056654065}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.3, y: 0.07, z: 1}
m_Children:
- {fileID: 1870329928343061684}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: -122.5}
m_SizeDelta: {x: 800, y: 695}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &1870329930056654068
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1870329930056654065}
m_CullTransparentMesh: 1
--- !u!114 &1870329930056654067
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1870329930056654065}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: 3d8241e686411ad46a7e2927a20025e7, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 870d031bd74ba344398c8c1f5a3430b6
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

Before

Width:  |  Height:  |  Size: 342 B

After

Width:  |  Height:  |  Size: 342 B

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -17,6 +17,7 @@ public enum EquipmentType
}
[CreateAssetMenu]
[System.Serializable]
public class EquippableItem : Item
{
public int StrengthBonus;
@ -30,8 +31,11 @@ public class EquippableItem : Item
[Space]
public EquipmentType EquipmentType;
public EquippableItem(){}
public EquippableItem(Item _item) : base(_item){}
public EquippableItem(string _name, string _description, int _level, GameObject _itemModel, Sprite _image) : base(_name, _description, _level, _itemModel, _image)
{
}
}

View File

@ -50,6 +50,17 @@ public class Item : ScriptableObject
set { itemModel = value; }
}
public Item() {}
public Item(Item _item)
{
this.Name = _item.Name;
this.Description = _item.Description;
this.Level = _item.Level;
this.ItemModel = _item.ItemModel;
this.Image = _item.Image;
}
public Item(string _name, string _description, int _level, GameObject _itemModel, Sprite _image)
{
this.Name = _name;
@ -58,4 +69,20 @@ public class Item : ScriptableObject
this.ItemModel = _itemModel;
this.Image = _image;
}
// public void SaveItem()
// {
// SaveItemSystem.SaveItem(this);
// }
// public void LoadItem()
// {
// ItemData data = SaveItemSystem.LoadIten();
// id = data.id;
// name = data.name;
// description = data.description;
// level = data.level;
// }
}

View File

@ -11,20 +11,25 @@ public class PickableController : MonoBehaviour
public bool triggered;
public int isPicked;
public int HandleIndexInScelenObjectList;
public void Start()
{
// if object after beeing created by Instaniate() gets "Clone)" postfix, EquippableItem.name gets this
item.Name = gameObject.name;
if (PlayerPrefs.GetInt("continued") == 1)
{
isPicked = PlayerPrefs.GetInt(name2);
}
else
{
isPicked = PlayerPrefs.GetInt(name);
}
// if (PlayerPrefs.GetInt("continued") == 1)
// {
// isPicked = PlayerPrefs.GetInt(name2);
// }
// else
// {
// isPicked = PlayerPrefs.GetInt(name);
// }
if(isPicked == 1)
{
gameObject.SetActive(false);
//gameObject.SetActive(false);
Destroy(gameObject);
}
}
@ -36,8 +41,12 @@ public class PickableController : MonoBehaviour
{
InventoryManager.Instance.AddToInventory(this.item);
isPicked = 1;
PlayerPrefs.SetInt(name, isPicked);
gameObject.SetActive(false);
//PlayerPrefs.SetInt(name, isPicked);
//gameObject.SetActive(false);
SceneEquippableItemManager.Instance.RemoveDynamicItem(item.name); // remove
Destroy(gameObject);
}
}
}
@ -55,9 +64,9 @@ public class PickableController : MonoBehaviour
triggered = false;
}
public void SaveCheckpoint()
{
PlayerPrefs.SetInt(name2, isPicked);
}
// public void SaveCheckpoint()
// {
// PlayerPrefs.SetInt(name2, isPicked);
// }
}

View File

@ -170,9 +170,13 @@ public class NPCDialogue : MonoBehaviour
QuestPanel.SetActive(false);
if(!gameObject.GetComponent<NPCQuest>().IsTaskAccepted())
{
// 1. Add task to palyer quests list
Task myTask = gameObject.GetComponent<NPCQuest>().AcceptTask();
TaskManager.Instance.AddTask(myTask);
// 2. Drop Axe On Map
gameObject.GetComponent<NPCQuest>().DropItem();
} else {
Debug.Log("Ten task został juz rozpoczęty!");
}

View File

@ -10,6 +10,7 @@ public class NPCQuest : MonoBehaviour
get { return quest; }
set { quest = value; }
}
[SerializeField] public GameObject axe;
[SerializeField] private bool isTaskAccepted = false;
@ -19,10 +20,9 @@ public class NPCQuest : MonoBehaviour
this.Quest = new Task(1, "Help the Lumberjack", "Find his axe in the forest and bring it back to him.", TaskHardship.Easy);
}
// Update is called once per frame
// Update is called once per frame
void Update()
{
}
public Task AcceptTask()
@ -36,4 +36,25 @@ public class NPCQuest : MonoBehaviour
{
return this.isTaskAccepted;
}
public void DropItem()
{
GameObject globalGUI = GameObject.FindGameObjectsWithTag("GUI")[0];
if(globalGUI)
{
// 1. Drop item on map
GameObject _axe = Instantiate(axe, new Vector3(37.1f, -31.7f, 0), Quaternion.identity, globalGUI.transform);
// 1.2 Fix names (prevent add "(Clone)" postfix)
_axe.name = axe.name;
_axe.GetComponent<PickableController>().item.name = axe.name;
// 2. Add object to DynamicList in LocalSceneManager
SceneEquippableItemManager.Instance.AddDynamicItem(_axe);
} else {
Debug.Log("Can't find global GUI object!!!");
}
}
}

View File

@ -1,15 +1,15 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System;
public class GoldOre : MonoBehaviour
{
[SerializeField] public GameObject dropedItem;
[SerializeField] public GameObject goldOre;
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
@ -24,7 +24,13 @@ public class GoldOre : MonoBehaviour
if(globalGUI)
{
Instantiate(dropedItem, gameObject.transform.position, Quaternion.identity, globalGUI.transform);
GameObject droppedItem = Instantiate(goldOre, gameObject.transform.position, Quaternion.identity, globalGUI.transform);
// Object and also ith binded piclable object gets "(Clone)" to its names - we must cut it
droppedItem.name = goldOre.name;
droppedItem.GetComponent<PickableController>().item.name = goldOre.name;
//droppedItem.GetComponent<PickableController>().HandleIndexInScelenObjectList =
SceneEquippableItemManager.Instance.AddDynamicItem(droppedItem);
} else {
Debug.Log("Can't find global GUI object!!!");
}

View File

@ -18,4 +18,9 @@ public class SaveController : MonoBehaviour
int continued = 1;
PlayerPrefs.SetInt("continued", continued);
}
public void SaveItems()
{
SceneEquippableItemManager.Instance.SaveEquippableItems();
}
}

View File

@ -0,0 +1,12 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System.IO;
public static class SaveSystem
{
public static string GetSavePath(string SubFolder)
{
return Application.persistentDataPath + "/" + SubFolder;
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 2102a8ad08aba3746afd06ad6dd508d9
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: c8c5e5dadc149fd41b44ad222a147a02
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 548b485870d670642bf4533d56921bdd
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: e39995ada1a75cf4bb0857afc6d14d67
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,61 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
[System.Serializable]
public class EquippableItemData : ItemData
{
public int strengthBonus;
public int agilityBonus;
public int inteligenceBonus;
public int vitalityBonus;
public bool isStackable;
public EquipmentType equipmentType;
private const string ITEM_LOCALIZATION = "Assets/Items/";
public EquippableItemData(EquippableItem equippableItem) : base(equippableItem)
{
strengthBonus = equippableItem.StrengthBonus;
agilityBonus = equippableItem.AgilityBonus;
inteligenceBonus = equippableItem.InteligenceBonus;
vitalityBonus = equippableItem.VitalityBonus;
isStackable = equippableItem.isStackable;
equipmentType = equippableItem.EquipmentType;
}
public EquippableItem MapDataToEquippableItem(string prefarbAssetName)
{
// Find prefarb in Assets/
//Debug.Log("MapDataToEquippableItem: " + ITEM_LOCALIZATION + prefarbAssetName + ".asset");
EquippableItem equippableItem = (EquippableItem)AssetDatabase.LoadAssetAtPath(ITEM_LOCALIZATION + prefarbAssetName + ".asset", typeof(EquippableItem));
///
// DONT OVERWRITE PROPERTIES BECOUSE ITS EDIT MAIN OBJECT IN ASSET/
///
// equippableItem.StrengthBonus = strengthBonus;
// equippableItem.AgilityBonus = agilityBonus;
// equippableItem.InteligenceBonus = inteligenceBonus;
// equippableItem.VitalityBonus = vitalityBonus;
// equippableItem.isStackable = isStackable;
// equippableItem.EquipmentType = equipmentType;
// Item item = base.MapDataToItem(prefarbAssetName);
// equippableItem.Name = item.Name;
// equippableItem.Description = item.Description;
// equippableItem.Level = item.Level;
// equippableItem.ItemModel = item.ItemModel;
// equippableItem.Image = item.Image;
return equippableItem;
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 2b75d6e7321021f43b90bf38877adaa5
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,27 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[System.Serializable]
public class EquippableItemPrefarbAsset
{
[SerializeField]
public string name;
[SerializeField]
public string prefarbAssetName;
[SerializeField]
public Vector3 position;
[SerializeField]
public EquippableItem equippableItem;
public EquippableItemPrefarbAsset(){}
public EquippableItemPrefarbAsset(string _name, string _prefarbAssetName, Vector3 _position, EquippableItem _equippableItem)
{
name = _name;
prefarbAssetName = _prefarbAssetName;
position = _position;
equippableItem = _equippableItem;
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 3954b63bce496d04a9fa9f9f1eac3e76
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,45 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[System.Serializable]
public class EquippableItemPrefarbAssetData
{
public string name;
public string prefarbAssetName;
public float[] position;
EquippableItemData equippableItemData;
public EquippableItemPrefarbAssetData(EquippableItemPrefarbAsset equippableItemPrefarbAsset)
{
name = equippableItemPrefarbAsset.name;
prefarbAssetName = equippableItemPrefarbAsset.prefarbAssetName;
position = new float[3];
position[0] = equippableItemPrefarbAsset.position.x;
position[1] = equippableItemPrefarbAsset.position.y;
position[2] = equippableItemPrefarbAsset.position.z;
equippableItemData = this.MapEquippableItemToData(equippableItemPrefarbAsset.equippableItem);
}
public EquippableItemData MapEquippableItemToData(EquippableItem equippableItem)
{
return new EquippableItemData(equippableItem);
}
public EquippableItemPrefarbAsset MapDataToEquippableItemPrefarbAsset()
{
EquippableItemPrefarbAsset equippableItemPrefarbAsset = new EquippableItemPrefarbAsset();
equippableItemPrefarbAsset.name = this.name;
equippableItemPrefarbAsset.prefarbAssetName = this.prefarbAssetName;
equippableItemPrefarbAsset.position = new Vector3(this.position[0], this.position[1], this.position[2]);
equippableItemPrefarbAsset.equippableItem = this.equippableItemData.MapDataToEquippableItem(equippableItemPrefarbAsset.prefarbAssetName);
return equippableItemPrefarbAsset;
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 835b159a6f9f2b64883442142387b34c
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: f8f73a42f83f7964fa1578e1dd5b4d61
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,57 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
[System.Serializable]
public class ItemData
{
public int id;
public string name;
public string description;
public int level;
public string imageName;
// to handle object created on scene for example after removing from inventory
public string itemModelName;
private const string SPRITE_LOCALIZATION = "Sprites/Object Sprites/";
private const string ITEM_LOCALIZATION = "Assets/Items/";
public ItemData(Item item)
{
id = item.id;
name = item.name;
description = item.description;
level = item.level;
imageName = item.image.name;
itemModelName = item.itemModel.name;
}
public Item MapDataToItem(string prefarbAssetName)
{
// Find prefarb in Assets/
Item item = (Item)AssetDatabase.LoadAssetAtPath(ITEM_LOCALIZATION + prefarbAssetName + ".asset", typeof(Item));
///
// DONT OVERWRITE PROPERTIES BECOUSE ITS EDIT MAIN OBJECT IN ASSET/
///
// item.Id = this.id;
// item.Name = this.name;
// item.Description = this.description;
// item.Level = this.level;
// Debug.Log(ITEM_LOCALIZATION + this.imageName);
// item.Image = (Sprite)AssetDatabase.LoadAssetAtPath(ITEM_LOCALIZATION + this.imageName, typeof(Sprite));
// Debug.Log(item.Image);
// item.ItemModel = (GameObject)AssetDatabase.LoadAssetAtPath(ITEM_LOCALIZATION + "Gold Ore" + ".prefab", typeof(GameObject));
return item;
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 01f6c1524dc8c994ab2711e2db01939e
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,104 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System.IO;
using System.Runtime.Serialization.Formatters.Binary;
public static class SaveEquippableItemSystem
{
private static string map;
public static void SaveEquitableItem(EquippableItemPrefarbAsset equitabbleItem, string ElementFolderName)
{
BinaryFormatter formatter = new BinaryFormatter();
// todo: add in scene name folder
string path = SaveSystem.GetSavePath(ElementFolderName);
Debug.Log(path);
if (!Directory.Exists(path))
Directory.CreateDirectory(path);
path += "/" + equitabbleItem.name + ".fun";
FileStream stream = new FileStream(path, FileMode.Create);
EquippableItemPrefarbAssetData data = new EquippableItemPrefarbAssetData(equitabbleItem);
formatter.Serialize(stream, data);
stream.Close();
}
public static void SaveEquitableItemList(List<EquippableItemPrefarbAsset> equitabbleItemList, string _path, string ElementName)
{
BinaryFormatter formatter = new BinaryFormatter();
// todo: add in scene name folder
string path = SaveSystem.GetSavePath(_path);
Debug.Log("Saved EquitableItemList at " + path);
if (!Directory.Exists(path))
Directory.CreateDirectory(path);
path += "/" + ElementName + ".fun";
FileStream stream = new FileStream(path, FileMode.Create);
List<EquippableItemPrefarbAssetData> data = new List<EquippableItemPrefarbAssetData>();
foreach(EquippableItemPrefarbAsset equitabbleItem in equitabbleItemList)
{
data.Add(new EquippableItemPrefarbAssetData(equitabbleItem));
}
formatter.Serialize(stream, data);
stream.Close();
}
private static void Save()
{
}
public static EquippableItemPrefarbAssetData LoadEquitableItem(string equitabbleItemName, string ElementFolderName)
{
string path = SaveSystem.GetSavePath(ElementFolderName) + "/" + equitabbleItemName;// + ".fun";
if(File.Exists(path))
{
BinaryFormatter formatter = new BinaryFormatter();
FileStream stream = new FileStream(path, FileMode.Open);
EquippableItemPrefarbAssetData equitabbleItem = formatter.Deserialize(stream) as EquippableItemPrefarbAssetData;
stream.Close();
return equitabbleItem;
} else {
Debug.Log("Save file not found in " + path);
return null;
}
}
public static List<EquippableItemPrefarbAssetData> LoadEquitableItemList(string _path, string ElementName)
{
string path = SaveSystem.GetSavePath(_path) + "/" + ElementName + ".fun";
if(File.Exists(path))
{
BinaryFormatter formatter = new BinaryFormatter();
FileStream stream = new FileStream(path, FileMode.Open);
List<EquippableItemPrefarbAssetData> equitabbleItemList = formatter.Deserialize(stream) as List<EquippableItemPrefarbAssetData>;
stream.Close();
return equitabbleItemList;
} else {
Debug.Log("Save file not found in " + path);
return null;
}
}
private static void Load()
{
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: e310cb217d0da98469b1cadfef21871c
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,347 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
using UnityEngine.SceneManagement;
using System.IO;
using System.Linq;
// only for eqipptable items
public class SceneEquippableItemManager : MonoBehaviour
{
private const string GameObjectLocalization = "Assets/Items/";
private const string AssetLocalization = "Assets/Items/";
private const string DYNAMIC_ELEMENT = "/DynamicElements/";
private const string STATIC_ELEMENT = "/StaticElements/";
// content skrzyni (docelowo skrzynia + jej content)
/// <Summary>
/// Handle manually setuped object properties
/// eg. npc, minions, chest content
/// </Summary>
[SerializeField]
public List<EquippableItemPrefarbAsset> StaticElements;
/// <Summary>
/// Handle dynamic object properties
/// eg. dropped items
/// </Summary>
// PrefarbAsset
[SerializeField]
public List<EquippableItemPrefarbAsset> DynamicElements;
public bool isNewGame = true;
public bool isContinued = false;
public string MapName;
public string ElementFolderName = "EquippableItem";
public string ItemsListName = "EquippableItemList";
public static SceneEquippableItemManager Instance;
public void Awake()
{
if(Instance == null)
{
this.MapName = SceneManager.GetActiveScene().name;
if(isNewGame) // in new game dynamicItemsList is defaulty empty
{
BuildItems(StaticElements);
}else if(isContinued)
{
LoadEquippableItems();
BuildItems(DynamicElements);
}
Instance = this;
}else if (Instance != this)
{
Destroy(gameObject);
}
}
public void Start()
{
// BuildDynamicItems();
//SaveEquippableItems();
LoadEquippableItems();
BuildItems(StaticElements);
BuildItems(DynamicElements);
}
// public void AddDynamicItem(GameObject object) {
// //EquippableItem item = object.GetComponent<PickableController>().Item;
// //EquippableItemPrefarbAsset equippableItemPrefarbAsset = new EquippableItemPrefarbAsset(item.name, object.name, object.transform.position, item);
// //this.dynamicItems.Add(equippableItemPrefarbAsset);
// }
public int AddDynamicItem(GameObject dynamicObject)
{
EquippableItem item = dynamicObject.GetComponent<PickableController>().item;
EquippableItemPrefarbAsset equippableItemPrefarbAsset = new EquippableItemPrefarbAsset(item.name, dynamicObject.name, dynamicObject.transform.position, item);
this.DynamicElements.Add(equippableItemPrefarbAsset);
return this.DynamicElements.Count - 1;
}
public void RemoveDynamicItem(string name)
{
// 1. Fetch all matched items
List<EquippableItemPrefarbAsset> equippableItemPrefarbAssetList = this.DynamicElements.Where(eqItemAss => eqItemAss.name == name).ToList();
// 2. Remove them
this.DynamicElements.RemoveAll(eqItemAss => eqItemAss.name == name);
}
public void RemoveDynamicEquippableItem(EquippableItemPrefarbAsset equippableItemPrefarbAsset)
{
}
public void BuildItems(List<EquippableItemPrefarbAsset> equippableItemPrefarbAssetList)
{
foreach(EquippableItemPrefarbAsset equippableItemPrefarbAsset in equippableItemPrefarbAssetList)
{
GameObject newEquippableItemObject = (GameObject)AssetDatabase.LoadAssetAtPath(GameObjectLocalization + equippableItemPrefarbAsset.prefarbAssetName + ".prefab", typeof(GameObject));
if(!newEquippableItemObject)
{
Debug.Log("Can't find prefarb by name " + equippableItemPrefarbAsset.prefarbAssetName);
break;
}
GameObject globalGUI = GameObject.FindGameObjectsWithTag("GUI")[0];
if(globalGUI)
{
// 1. Create gameObject by handled prefarb
// 2. SetUp
// 2.1 Set position
GameObject equippableItem = Instantiate(newEquippableItemObject, equippableItemPrefarbAsset.position, Quaternion.identity, globalGUI.transform);
// 2.2 Set name
equippableItem.name = equippableItemPrefarbAsset.name;
equippableItem.transform.SetParent(globalGUI.transform);
// 2.3 Set pransform
//equippableItem.transform.localScale = new Vector3(0.4f, 0.4f, 1);
// Debug.Log(equippableItemPrefarbAsset.position);
//equippableItem.transform.localPosition = equippableItemPrefarbAsset.position;
// 3. SetUp object properties
// 3.1 find object
string[] assetNames = AssetDatabase.FindAssets("t:EquippableItem", new[] { AssetLocalization });
foreach (string SOName in assetNames)
{
var SOpath = AssetDatabase.GUIDToAssetPath(SOName);
if(SOpath.Contains(equippableItemPrefarbAsset.prefarbAssetName + ".asset"))
{
// 3.2 set EquippableItem object
equippableItem.GetComponent<PickableController>().item = AssetDatabase.LoadAssetAtPath<EquippableItem>(SOpath);
break;
}
}
} else {
Debug.Log("Can't find global GUI object!!!");
break;
}
}
}
/// Save both list of EquippableItems
public void SaveEquippableItems()
{
// 1. staticElements
this.SaveStaticEquippableItemsList();
// 2. dynamicItems
this.SaveDynamicEquippableItemsList();
/// Load One element example
// foreach(EquippableItemPrefarbAsset equippableItemPrefarbAsset in equippableItemPrefarbAssetList)
// {
// SaveEquippableItemSystem.SaveEquitableItem(equippableItemPrefarbAsset, this.MapName + "/" + this.ElementFolderName); // change to SaveEquippableItemSystem for EquippableItemPrefarbAsset
// }
}
#region Static list of EquippableItem Save
private void SaveStaticEquippableItemsList()
{
// Case I - if we remember all list
// 1) if after removed item form DynamicList is empty - remove all file
// 2) if after removed item form DynamciList there are another one - save updated list again
if(this.StaticElements.Count > 0) {
SaveEquippableItemSystem.SaveEquitableItemList(this.StaticElements, this.MapName + STATIC_ELEMENT, this.ItemsListName); // change to SaveEquippableItemSystem for EquippableItemPrefarbAsset
} else {
string _path = SaveSystem.GetSavePath(this.MapName + STATIC_ELEMENT) + "/" + this.ItemsListName + ".fun";
try
{
Debug.Log("File to remove: " + _path);
if(File.Exists(_path))
{
File.Delete(_path);
}
}
catch (IOException ioExp)
{
Debug.LogError(ioExp.Message);
}
}
// Case II - if we rememenber object per file
// 1) remove specyfic file
//
// Unfortunatelly we don't use this way of saving items yet :D
}
#endregion
#region Dynamic list of EquippableItem Save
private void SaveDynamicEquippableItemsList()
{
// Case I - if we remember all list
// 1) if after removed item form DynamicList is empty - remove all file
// 2) if after removed item form DynamciList there are another one - save updated list again
if(this.DynamicElements.Count > 0) {
SaveEquippableItemSystem.SaveEquitableItemList(this.DynamicElements, this.MapName + DYNAMIC_ELEMENT, this.ItemsListName); // change to SaveEquippableItemSystem for EquippableItemPrefarbAsset
} else {
string _path = SaveSystem.GetSavePath(this.MapName + DYNAMIC_ELEMENT) + "/" + this.ItemsListName + ".fun";
try
{
Debug.Log("File to remove: " + _path);
if(File.Exists(_path))
{
File.Delete(_path);
}
}
catch (IOException ioExp)
{
Debug.LogError(ioExp.Message);
}
}
// Case II - if we rememenber object per file
// 1) remove specyfic file
//
// Unfortunatelly we don't use this way of saving items yet :D
}
#endregion
public void LoadEquippableItems()
{
// if continue -> search files with content in save path
// if new game -> build objects from default configuration
this.LoadDynamicEquippableItemsList();
/// <summary>
/// DID WE REALLY NEED TO LOAD (or even remembered) THIS LIST????
/// </summary>
//this.LoadStaticEquippableItemsList();
}
#region Dynamic list of EquippableItem Loader
public void LoadDynamicEquippableItem()
{
string path = SaveSystem.GetSavePath(this.MapName + DYNAMIC_ELEMENT + this.ElementFolderName);
if (!Directory.Exists(path)) // if not exists thats mean there was nothing saved yet - nothing to load
return;
FileInfo[] fileInfo = new DirectoryInfo(path).GetFiles();
foreach(FileInfo file in fileInfo)
{
Debug.Log(file.FullName);
EquippableItemPrefarbAssetData equippableItemPrefarbAssetData = SaveEquippableItemSystem.LoadEquitableItem(file.Name, this.MapName + DYNAMIC_ELEMENT + this.ElementFolderName);
DynamicElements.Add(equippableItemPrefarbAssetData.MapDataToEquippableItemPrefarbAsset());
}
}
public void LoadDynamicEquippableItemsList()
{
string path = SaveSystem.GetSavePath(this.MapName + DYNAMIC_ELEMENT);
if (!Directory.Exists(path)) // if not exists thats mean there was nothing saved yet - nothing to load
return;
FileInfo[] fileInfo = new DirectoryInfo(path).GetFiles();
foreach(FileInfo file in fileInfo)
{
if(file.Name != this.ItemsListName + ".fun")
continue;
List<EquippableItemPrefarbAssetData> equippableItemPrefarbAssetDataList = SaveEquippableItemSystem.LoadEquitableItemList(this.MapName + DYNAMIC_ELEMENT, this.ItemsListName);
foreach(EquippableItemPrefarbAssetData equippableItemPrefarbAssetData in equippableItemPrefarbAssetDataList)
DynamicElements.Add(equippableItemPrefarbAssetData.MapDataToEquippableItemPrefarbAsset());
}
}
#endregion
#region Static list of EquippableItem Loader
public void LoadStaticEquippableItem()
{
string path = SaveSystem.GetSavePath(this.MapName + STATIC_ELEMENT + this.ElementFolderName);
if (!Directory.Exists(path)) // if not exists thats mean there was nothing saved yet - nothing to load
return;
FileInfo[] fileInfo = new DirectoryInfo(path).GetFiles();
foreach(FileInfo file in fileInfo)
{
Debug.Log(file.FullName);
EquippableItemPrefarbAssetData equippableItemPrefarbAssetData = SaveEquippableItemSystem.LoadEquitableItem(file.Name, this.MapName + STATIC_ELEMENT + this.ElementFolderName);
StaticElements.Add(equippableItemPrefarbAssetData.MapDataToEquippableItemPrefarbAsset());
}
}
public void LoadStaticEquippableItemsList()
{
string path = SaveSystem.GetSavePath(this.MapName + STATIC_ELEMENT);
if (!Directory.Exists(path)) // if not exists thats mean there was nothing saved yet - nothing to load
return;
FileInfo[] fileInfo = new DirectoryInfo(path).GetFiles();
foreach(FileInfo file in fileInfo)
{
Debug.Log(file.FullName);
List<EquippableItemPrefarbAssetData> equippableItemPrefarbAssetDataList = SaveEquippableItemSystem.LoadEquitableItemList(this.MapName + STATIC_ELEMENT, this.ItemsListName);
foreach(EquippableItemPrefarbAssetData equippableItemPrefarbAssetData in equippableItemPrefarbAssetDataList)
StaticElements.Add(equippableItemPrefarbAssetData.MapDataToEquippableItemPrefarbAsset());
}
}
#endregion
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 3414ebe7b0de81b47a6726905f4c1322
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,23 +1,57 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System.Linq;
public class closePossibleButtonInfo : MonoBehaviour
{
public GameObject Panel;
public GameObject EPanel;
public GameObject SpacePanel;
public GameObject EPanel1;
public GameObject SpacePanel1;
[SerializeField]
public List<GameObject> Panels; // for Quest panel && Dialogue Panel and in future for all others which could require to close info-panels
public List<string> actionPanels = new List<string>{"E-InteractivePanel", "E-InteractivePanelAbove", "Spacebar-InteractivePanel", "Spacebar-InteractivePanelAbove"};
void Update()
{
if(Panel.active == true)
int index = Panels.FindIndex(panel => panel.active == true);
if (index >= 0)
{
EPanel.SetActive(false);
EPanel1.SetActive(false);
SpacePanel.SetActive(false);
SpacePanel1.SetActive(false);
// BRUTAL AND NAIVE SOLUTION
// TODO rewrite during refactoring dialogue panels module !!! - 18.06.2022
// EPanel.SetActive(false);
// EPanel1.SetActive(false);
// SpacePanel.SetActive(false);
// SpacePanel1.SetActive(false);
// the same solution prescribed for the needs of dynamic toolpits - also rewrite later -
// TODO - cahne whole logic
// 1. Fetch "space hit" and all other panels and destroy them if exists as GUI object children
// Because its in "Update" object are destroyed all time - again and again and again - when cndition is met
// TODO
// add action which will block open action-into-panels again if one of "Panels" is currently opened and allow this after close
// add condition for each object whisch have "OpenPanelOnCollision" script
// GetComponent<OpenPanelOnCollision>().isAllowedToShowPanels = false;
GameObject globalGUI = GameObject.FindGameObjectsWithTag("GUI")[0];
foreach (Transform eachChild in globalGUI.transform) {
int match = actionPanels.FindIndex(actionPanelName => (actionPanelName == eachChild.name || actionPanelName + "(Clone)" == eachChild.name));
if(match >= 0)
{
//Debug.Log("Destroy " + eachChild.name);
Destroy(eachChild.gameObject);
}
}
}
}
}

View File

@ -30,10 +30,10 @@ EditorUserSettings:
value: 22424703114646680e0b0227036c72111f1958072926337e38271427fb
flags: 0
RecentlyUsedScenePath-8:
value: 22424703114646680e0b0227036c7c1100123d24383a273e2e2c5326ece92021
value: 22424703114646680e0b0227036c6c111b07142f1f2b233e2867083debf42d
flags: 0
RecentlyUsedScenePath-9:
value: 22424703114646680e0b0227036c6c111b07142f1f2b233e2867083debf42d
value: 22424703114646680e0b0227036c7c1100123d24383a273e2e2c5326ece92021
flags: 0
vcSharedLogLevel:
value: 0d5e400f0650