Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
f5121ad3c7
@ -153,6 +153,7 @@ MonoBehaviour:
|
||||
worldPosition: {x: 0, y: 0, z: 0}
|
||||
gridPosition: {x: 0, y: 0}
|
||||
isChasing: 0
|
||||
point: {x: 0, y: 0, z: 0}
|
||||
path: []
|
||||
--- !u!50 &576360972805091780
|
||||
Rigidbody2D:
|
||||
@ -191,7 +192,9 @@ MonoBehaviour:
|
||||
enemyName: Crab
|
||||
maxHealth: {fileID: 11400000, guid: 1a234827b90bfc24da563fbd5ffb412a, type: 2}
|
||||
health: 4
|
||||
baseAttack: 1
|
||||
baseAttack: 3.5
|
||||
isKilled: 0
|
||||
MinionName:
|
||||
target: {fileID: 0}
|
||||
chaseRadius: 5
|
||||
attackRadius: 0.5
|
||||
@ -210,7 +213,6 @@ MonoBehaviour:
|
||||
player: {fileID: 4869648843286970700, guid: 4cb7163e44af59f4c9350005c199db3c, type: 3}
|
||||
thrust: 5
|
||||
knockTime: 0.2
|
||||
isKilled: 0
|
||||
isKilled2: 0
|
||||
isPanelEnabled: 1
|
||||
expValue: 4
|
||||
|
@ -151,7 +151,7 @@ MonoBehaviour:
|
||||
enemyName: FireSmall
|
||||
maxHealth: {fileID: 11400000, guid: 1a234827b90bfc24da563fbd5ffb412a, type: 2}
|
||||
health: 8
|
||||
baseAttack: 2
|
||||
baseAttack: 5
|
||||
isKilled: 0
|
||||
MinionName:
|
||||
target: {fileID: 0}
|
||||
|
@ -192,7 +192,7 @@ MonoBehaviour:
|
||||
enemyName: Klackon
|
||||
maxHealth: {fileID: 11400000, guid: 1a234827b90bfc24da563fbd5ffb412a, type: 2}
|
||||
health: 10
|
||||
baseAttack: 2
|
||||
baseAttack: 6
|
||||
isKilled: 0
|
||||
MinionName:
|
||||
target: {fileID: 0}
|
||||
|
@ -191,8 +191,8 @@ MonoBehaviour:
|
||||
moveSpeed: 2
|
||||
enemyName: Mask
|
||||
maxHealth: {fileID: 11400000, guid: 1a234827b90bfc24da563fbd5ffb412a, type: 2}
|
||||
health: 6
|
||||
baseAttack: 1.5
|
||||
health: 9
|
||||
baseAttack: 5
|
||||
isKilled: 0
|
||||
MinionName:
|
||||
target: {fileID: 0}
|
||||
|
@ -191,8 +191,8 @@ MonoBehaviour:
|
||||
moveSpeed: 1.7
|
||||
enemyName: Mushroom
|
||||
maxHealth: {fileID: 11400000, guid: 1a234827b90bfc24da563fbd5ffb412a, type: 2}
|
||||
health: 8
|
||||
baseAttack: 2
|
||||
health: 12
|
||||
baseAttack: 5.5
|
||||
isKilled: 0
|
||||
MinionName:
|
||||
path: []
|
||||
|
@ -169,8 +169,8 @@ MonoBehaviour:
|
||||
moveSpeed: 2
|
||||
enemyName: Skull
|
||||
maxHealth: {fileID: 11400000, guid: 1a234827b90bfc24da563fbd5ffb412a, type: 2}
|
||||
health: 12
|
||||
baseAttack: 1
|
||||
health: 18
|
||||
baseAttack: 4
|
||||
isKilled: 0
|
||||
MinionName:
|
||||
target: {fileID: 0}
|
||||
|
@ -191,8 +191,8 @@ MonoBehaviour:
|
||||
moveSpeed: 1.6
|
||||
enemyName: EarthSmall
|
||||
maxHealth: {fileID: 11400000, guid: 1a234827b90bfc24da563fbd5ffb412a, type: 2}
|
||||
health: 6
|
||||
baseAttack: 1.5
|
||||
health: 9
|
||||
baseAttack: 4.5
|
||||
isKilled: 0
|
||||
MinionName:
|
||||
path: []
|
||||
|
@ -12,12 +12,14 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 06201cadd951bcc4db5fccaa01783060, type: 3}
|
||||
m_Name: WaterDialENG
|
||||
m_EditorClassIdentifier:
|
||||
SpeakerName: Proba134
|
||||
SpeakerName: aaaa
|
||||
CurrentStep: 0
|
||||
DialogueSteps:
|
||||
- Header: Proba134
|
||||
- Header: aaaa
|
||||
WasDisplayed: 0
|
||||
ListOfSentences: []
|
||||
ListOfSentences:
|
||||
- Sentence: If only I had a fishing rod...
|
||||
Buttons: []
|
||||
EndOfDialogueStepAction:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
|
32
Assets/Resources/Items/CrabVenom.asset
Normal file
32
Assets/Resources/Items/CrabVenom.asset
Normal file
@ -0,0 +1,32 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: a0c176e87b3c91641897c23dc27e92a0, type: 3}
|
||||
m_Name: CrabVenom
|
||||
m_EditorClassIdentifier:
|
||||
id: 0
|
||||
name: Crab Venom
|
||||
description: Poisonous venom from a crab
|
||||
level: 0
|
||||
value: 0
|
||||
image: {fileID: 7977443681283346765, guid: 866adc2eb813e72438343756fc3b4e01, type: 3}
|
||||
itemModel: {fileID: 8707952282648172651, guid: 7e7c7a913b3a569458a1f9ed3e86314f, type: 3}
|
||||
price: 35
|
||||
useEffect:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
StrengthBonus: 0
|
||||
EnduranceBonus: 0
|
||||
VitalityBonus: 0
|
||||
InteligenceBonus: 0
|
||||
SpeedBonus: 0
|
||||
isStackable: 0
|
||||
EquipmentType: 6
|
8
Assets/Resources/Items/CrabVenom.asset.meta
Normal file
8
Assets/Resources/Items/CrabVenom.asset.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 88fd537e990705243a59d2ec3c12d4df
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
84
Assets/Resources/Items/CrabVenom.prefab
Normal file
84
Assets/Resources/Items/CrabVenom.prefab
Normal file
@ -0,0 +1,84 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &8707952282648172651
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 3680450334359996580}
|
||||
- component: {fileID: 8573611937232687253}
|
||||
m_Layer: 0
|
||||
m_Name: CrabVenom
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &3680450334359996580
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8707952282648172651}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: -2.9559996, y: -22.387981, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!212 &8573611937232687253
|
||||
SpriteRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8707952282648172651}
|
||||
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: 7977443681283346765, guid: 866adc2eb813e72438343756fc3b4e01, 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
|
7
Assets/Resources/Items/CrabVenom.prefab.meta
Normal file
7
Assets/Resources/Items/CrabVenom.prefab.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7e7c7a913b3a569458a1f9ed3e86314f
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -19,6 +19,7 @@ GameObject:
|
||||
- component: {fileID: 4869648843286970676}
|
||||
- component: {fileID: 4869648843286970678}
|
||||
- component: {fileID: 4869648843286970673}
|
||||
- component: {fileID: -4072721723537361924}
|
||||
m_Layer: 0
|
||||
m_Name: ThePlayer
|
||||
m_TagString: Player
|
||||
@ -118,11 +119,18 @@ MonoBehaviour:
|
||||
walkSpeed: 10
|
||||
Panel: {fileID: 0}
|
||||
dmgParticleSystem: {fileID: 4869648843387222763}
|
||||
maxHealth: {fileID: 11400000, guid: 2cac7af95874b184aae736e0ed4994d7, type: 2}
|
||||
currentHealth: 10
|
||||
healthBar: {fileID: 0}
|
||||
lvlUp: 0
|
||||
test: 0
|
||||
healthPoints: 0
|
||||
defensePoints: 0
|
||||
strengthPoints: 0
|
||||
intelligencePoints: 0
|
||||
attackValue: 0
|
||||
defenseValue: 0
|
||||
currentSpeed: 0
|
||||
currentHealth: 10
|
||||
maxHealth: 0
|
||||
exp: 0
|
||||
lvl: 0
|
||||
maxExp: 0
|
||||
@ -270,6 +278,18 @@ MonoBehaviour:
|
||||
- E-InteractivePanelAbove
|
||||
- Spacebar-InteractivePanel
|
||||
- Spacebar-InteractivePanelAbove
|
||||
--- !u!114 &-4072721723537361924
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4869648843286970700}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: b706d33712b371949b5623cdf98fc4a4, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1 &4869648843387222766
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -11339,6 +11339,7 @@ GameObject:
|
||||
- component: {fileID: 407612202}
|
||||
- component: {fileID: 407612204}
|
||||
- component: {fileID: 407612203}
|
||||
- component: {fileID: 407612205}
|
||||
m_Layer: 0
|
||||
m_Name: Walls
|
||||
m_TagString: Untagged
|
||||
@ -14102,6 +14103,22 @@ Tilemap:
|
||||
e31: 0
|
||||
e32: 0
|
||||
e33: 1
|
||||
--- !u!19719996 &407612205
|
||||
TilemapCollider2D:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 407612201}
|
||||
m_Enabled: 1
|
||||
m_Density: 1
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 0
|
||||
m_UsedByEffector: 0
|
||||
m_UsedByComposite: 0
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_MaximumTileChangeCount: 1000
|
||||
m_ExtrusionFactor: 0.00001
|
||||
--- !u!1 &425810218
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -55285,7 +55302,6 @@ MonoBehaviour:
|
||||
- {fileID: 4095674802650808536, guid: d4ed7b1b2a2b74b49966bd3fb39806ff, type: 3}
|
||||
- {fileID: 2071044935318948575, guid: 4424631257fae904ca20d56e45a8fce1, type: 3}
|
||||
- {fileID: 768066516210684488, guid: 37d53369a108ca64b8ec49414fe5b33f, type: 3}
|
||||
- {fileID: 2368039485218444103, guid: ef9907b84e7629a4ea317ffe22da98dd, type: 3}
|
||||
respownPoints:
|
||||
- {fileID: 2083033195}
|
||||
- {fileID: 1004268553}
|
||||
|
@ -56281,6 +56281,10 @@ MonoBehaviour:
|
||||
difficulty: 0
|
||||
axe: {fileID: 1826809974269949497, guid: 83fa1f81238efb541bd77405dcf33dd1, type: 3}
|
||||
isTaskAccepted: 0
|
||||
reward:
|
||||
Items: []
|
||||
Cash: 15
|
||||
Experience: 10
|
||||
--- !u!114 &551619109
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -114517,7 +114521,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: a7c996be5c675ec4eb062e7ae1509118, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
textEnglish: Will you help me
|
||||
textEnglish: Will you help me?
|
||||
textPolish: Pomozesz mi?
|
||||
displayText: {fileID: 883991300}
|
||||
--- !u!1 &899694184
|
||||
|
73551
Assets/Scenes/FirstLabirynthCave.unity
Normal file
73551
Assets/Scenes/FirstLabirynthCave.unity
Normal file
File diff suppressed because it is too large
Load Diff
7
Assets/Scenes/FirstLabirynthCave.unity.meta
Normal file
7
Assets/Scenes/FirstLabirynthCave.unity.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a4346d5149b2f1a4f8c7821efbb5e4a4
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -563458,6 +563458,7 @@ GameObject:
|
||||
- component: {fileID: 1636410215}
|
||||
- component: {fileID: 1636410214}
|
||||
- component: {fileID: 1636410213}
|
||||
- component: {fileID: 1636410216}
|
||||
m_Layer: 0
|
||||
m_Name: Water
|
||||
m_TagString: Untagged
|
||||
@ -563473,7 +563474,7 @@ Transform:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1636410211}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: -20.87, y: -59.81, z: -13.449348}
|
||||
m_LocalPosition: {x: -21.03, y: -59.7, z: -13.449348}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1636280038}
|
||||
@ -563501,7 +563502,7 @@ MonoBehaviour:
|
||||
Dialogue: {fileID: 0}
|
||||
EndactionEventList: []
|
||||
keyToOpen: 101
|
||||
CanBeOpened: 1
|
||||
CanBeOpened: 0
|
||||
OpenInDefaultWay: 1
|
||||
--- !u!114 &1636410214
|
||||
MonoBehaviour:
|
||||
@ -563527,7 +563528,7 @@ BoxCollider2D:
|
||||
m_Enabled: 1
|
||||
m_Density: 1
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 0
|
||||
m_IsTrigger: 1
|
||||
m_UsedByEffector: 0
|
||||
m_UsedByComposite: 0
|
||||
m_Offset: {x: 0, y: 0}
|
||||
@ -563541,8 +563542,29 @@ BoxCollider2D:
|
||||
adaptiveTiling: 0
|
||||
m_AutoTiling: 0
|
||||
serializedVersion: 2
|
||||
m_Size: {x: 1, y: 10}
|
||||
m_EdgeRadius: 0
|
||||
m_Size: {x: 2, y: 12}
|
||||
m_EdgeRadius: 1
|
||||
--- !u!50 &1636410216
|
||||
Rigidbody2D:
|
||||
serializedVersion: 4
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1636410211}
|
||||
m_BodyType: 2
|
||||
m_Simulated: 1
|
||||
m_UseFullKinematicContacts: 0
|
||||
m_UseAutoMass: 0
|
||||
m_Mass: 1
|
||||
m_LinearDrag: 0
|
||||
m_AngularDrag: 0.05
|
||||
m_GravityScale: 1
|
||||
m_Material: {fileID: 0}
|
||||
m_Interpolate: 0
|
||||
m_SleepingMode: 1
|
||||
m_CollisionDetection: 0
|
||||
m_Constraints: 0
|
||||
--- !u!1 &1636563514
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
File diff suppressed because it is too large
Load Diff
58479
Assets/Scenes/SecondLabirynthCave.unity
Normal file
58479
Assets/Scenes/SecondLabirynthCave.unity
Normal file
File diff suppressed because it is too large
Load Diff
7
Assets/Scenes/SecondLabirynthCave.unity.meta
Normal file
7
Assets/Scenes/SecondLabirynthCave.unity.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 69001702ffc3307468ca42491ced18b5
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -5,6 +5,7 @@ using UnityEngine.UI;
|
||||
|
||||
public class KeyBindScript : MonoBehaviour
|
||||
{
|
||||
/*
|
||||
|
||||
/// <summary>
|
||||
/// This is the dictionary, that contains all our keybinds
|
||||
@ -49,7 +50,7 @@ public class KeyBindScript : MonoBehaviour
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
@ -83,7 +84,7 @@ public class KeyBindScript : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
}*/
|
||||
}
|
||||
void OnGUI()
|
||||
{
|
||||
if (currentKey != null) //If we have selected a key, that we want to edit
|
||||
@ -128,5 +129,6 @@ public class KeyBindScript : MonoBehaviour
|
||||
|
||||
PlayerPrefs.Save();
|
||||
|
||||
}
|
||||
}*/
|
||||
|
||||
}
|
||||
|
@ -332,6 +332,9 @@ public class NPCDialogue : MonoBehaviour
|
||||
else
|
||||
TaskUIManager.Instance.RemoveByName(gameObject.GetComponent<NPCQuest>().quest.Title);
|
||||
|
||||
// 4. Get reward
|
||||
GameObject.FindGameObjectWithTag("Player").GetComponent<PlayerActions>().GetReward(gameObject.GetComponent<NPCQuest>().reward);
|
||||
|
||||
// 3. Set as finished
|
||||
isQuest = 3;
|
||||
EndDialogue();
|
||||
|
@ -14,6 +14,8 @@ public class NPCQuest : MonoBehaviour
|
||||
|
||||
[SerializeField] private bool isTaskAccepted = false;
|
||||
|
||||
[SerializeField] public MissionReward reward;
|
||||
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
|
@ -21,11 +21,11 @@ public class ChestController : MonoBehaviour
|
||||
|
||||
private void OnTriggerExit2D(Collider2D collision)
|
||||
{
|
||||
if (collision.tag == "Player")
|
||||
if (collision.tag == "Player" && ChestUIManager.Instance.CurrentChestName != null)
|
||||
{
|
||||
ChestUIManager.Instance.CurrentChestName = null;
|
||||
|
||||
ChestUIManager.Instance.ClosePanel();
|
||||
|
||||
ChestUIManager.Instance.CurrentChestName = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -38,7 +38,7 @@ public class DialogueManager : MonoBehaviour
|
||||
|
||||
public virtual void Start()
|
||||
{
|
||||
if(languageDetector.InstanceTemplates.Count() > 0)
|
||||
if (languageDetector.InstanceTemplates.Count() > 0)
|
||||
{
|
||||
// create and config dailogue
|
||||
CreateInstanceBasedOnLanguage();
|
||||
@ -52,6 +52,14 @@ public class DialogueManager : MonoBehaviour
|
||||
{
|
||||
if (OpenInDefaultWay && Input.GetKeyDown(keyToOpen) && OpenPanelCondition())
|
||||
{
|
||||
if (languageDetector.InstanceTemplates.Count() > 0)
|
||||
{
|
||||
// create and config dailogue
|
||||
CreateInstanceBasedOnLanguage();
|
||||
|
||||
Dialogue.BuildCurrentDialogue();
|
||||
}
|
||||
|
||||
OpenDialoguePanel();
|
||||
}
|
||||
}
|
||||
|
@ -11,6 +11,9 @@ public class MissionReward
|
||||
[SerializeField]
|
||||
public int Cash = 0;
|
||||
|
||||
[SerializeField]
|
||||
public int Experience = 0;
|
||||
|
||||
public MissionReward() { }
|
||||
|
||||
public MissionReward(List<EquippableItem> _items, int _cash)
|
||||
|
@ -30,8 +30,8 @@ public class NpcMissionManager : DialogueManager // ScriptableObject
|
||||
CanBeOpened = false;
|
||||
OpenInDefaultWay = false;
|
||||
|
||||
CreateInstanceBasedOnLanguage();
|
||||
|
||||
CreateInstanceBasedOnLanguage();
|
||||
|
||||
// UPDATE DIALOGUE
|
||||
// search in scene manager list
|
||||
@ -53,7 +53,6 @@ public class NpcMissionManager : DialogueManager // ScriptableObject
|
||||
Mission.BuildMission();
|
||||
|
||||
|
||||
|
||||
if (FreeDialogue != null)
|
||||
FreeDialogue.Build();
|
||||
}
|
||||
@ -70,6 +69,29 @@ public class NpcMissionManager : DialogueManager // ScriptableObject
|
||||
{
|
||||
CanBeOpened = true;
|
||||
|
||||
|
||||
CreateInstanceBasedOnLanguage();
|
||||
|
||||
|
||||
// UPDATE DIALOGUE
|
||||
// search in scene manager list
|
||||
if (Mission != null)
|
||||
{
|
||||
var machedDialogueData = ((MissionDataManager)MissionDataManager.Instance).GetMission(Mission);
|
||||
|
||||
if (machedDialogueData != null)
|
||||
{
|
||||
UpdateMissionState(machedDialogueData);
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("Start - UpdateProggres");
|
||||
UpdateProggres();
|
||||
}
|
||||
}
|
||||
|
||||
Mission.BuildMission();
|
||||
|
||||
Mission.StartDialogue();
|
||||
}
|
||||
}
|
||||
|
@ -15,6 +15,14 @@ public class NpcDialogueManager : DialogueManager
|
||||
CanBeOpened = false;
|
||||
OpenInDefaultWay = false;
|
||||
|
||||
if (languageDetector.InstanceTemplates.Count() > 0)
|
||||
{
|
||||
// create and config dailogue
|
||||
CreateInstanceBasedOnLanguage();
|
||||
|
||||
Dialogue.BuildCurrentDialogue();
|
||||
}
|
||||
|
||||
// UPDATE DIALOGUE
|
||||
// search in scene manager list
|
||||
if (Dialogue != null)
|
||||
@ -36,6 +44,31 @@ public class NpcDialogueManager : DialogueManager
|
||||
{
|
||||
if (Input.GetKeyDown(keyToOpen) && OpenPanelCondition())
|
||||
{
|
||||
// Refrsh dialogue language and proggres after each opening trial
|
||||
if (languageDetector.InstanceTemplates.Count() > 0)
|
||||
{
|
||||
// create and config dailogue
|
||||
CreateInstanceBasedOnLanguage();
|
||||
|
||||
Dialogue.BuildCurrentDialogue();
|
||||
}
|
||||
|
||||
// UPDATE DIALOGUE
|
||||
// search in scene manager list
|
||||
if (Dialogue != null)
|
||||
{
|
||||
var machedDialogueData = ((MultiDialogueDataManager)MultiDialogueDataManager.Instance).GetDialogue(Dialogue);
|
||||
|
||||
if (machedDialogueData != null)
|
||||
{
|
||||
UpdateDialogueState(machedDialogueData);
|
||||
}
|
||||
else
|
||||
{
|
||||
UpdateProggres();
|
||||
}
|
||||
}
|
||||
|
||||
OpenDialoguePanel();
|
||||
}
|
||||
}
|
||||
|
@ -68,6 +68,8 @@ public class NpcShopManager : MonoBehaviour
|
||||
*/
|
||||
if (gameObject.GetComponent<NpcDialogueManager>().CanBeOpened && Input.GetKeyDown(ShopUIManager.Instance.keyToOpen) && !ShopUIManager.Instance.GetPanelStatus())
|
||||
{
|
||||
CreateInstanceBasedOnLanguage();
|
||||
|
||||
// Open dialogue panel (Shop will be opened later)
|
||||
Dialogue.StartDialogue();
|
||||
|
||||
|
@ -28,7 +28,10 @@ public class PlayerActions : MonoBehaviour
|
||||
|
||||
// 2. Add cash
|
||||
AccountBalanceManager.Instance.IncreaseAccountBalanceValue(reward.Cash);
|
||||
Debug.Log($"Give reward - {reward.Cash}");
|
||||
//Debug.Log($"Give reward - {reward.Cash}");
|
||||
|
||||
// 3. Add experience points
|
||||
gameObject.GetComponent<Player>().GetExp(reward.Experience);
|
||||
|
||||
// 3. Save changes
|
||||
// TODO - sync saving process reward / mission proggress
|
||||
@ -36,5 +39,7 @@ public class PlayerActions : MonoBehaviour
|
||||
//GameObject.FindObjectOfType<SaveController>().SavePlayerEquipmentItems();
|
||||
//GameObject.FindObjectOfType<SaveController>().SavePlayerInventory();
|
||||
//GameObject.FindObjectOfType<SaveController>().SaveAccountBalance();
|
||||
|
||||
// save exp
|
||||
}
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ public class LanguageDetector<T>
|
||||
}
|
||||
default:
|
||||
{
|
||||
return InstanceTemplates.Where(template => template.Key == SystemLanguageEnum.Polish).First().Value;
|
||||
return InstanceTemplates.Where(template => template.Key == SystemLanguageEnum.English).First().Value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -34,66 +34,23 @@ public abstract class UIBaseManager<T> : MonoBehaviour, ManagerInterface<T>
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log(gameObject);
|
||||
Debug.Log(Instance);
|
||||
Destroy(gameObject);
|
||||
}
|
||||
}
|
||||
|
||||
//public GameObject Chest1 = GameObject.Find("Gold Chest");
|
||||
|
||||
|
||||
public async void Update()
|
||||
// async
|
||||
public virtual void Update()
|
||||
{
|
||||
if (Input.GetKeyDown(keyToOpen))
|
||||
{
|
||||
if (!DynamicPanel)
|
||||
{
|
||||
//condition to be near to the chest
|
||||
if (ChestUIManager.Instance.CurrentChestName != null && ChestUIManager.Instance.CurrentChestName != "")
|
||||
{
|
||||
//delay using async Yield and triggering chests to start open animation
|
||||
var end = Time.time + 0.3;
|
||||
animateOpening();
|
||||
while (Time.time < end)
|
||||
{
|
||||
await System.Threading.Tasks.Task.Yield();
|
||||
}
|
||||
}
|
||||
this.OpenPanel();
|
||||
}
|
||||
else
|
||||
{
|
||||
this.ClosePanel();
|
||||
var end2 = Time.time + 0.1;
|
||||
while (Time.time < end2)
|
||||
{
|
||||
await System.Threading.Tasks.Task.Yield();
|
||||
}
|
||||
animateClosing();
|
||||
end2 = Time.time + 0.3;
|
||||
while (Time.time < end2)
|
||||
{
|
||||
await System.Threading.Tasks.Task.Yield();
|
||||
}
|
||||
resettriggers();
|
||||
}
|
||||
}
|
||||
|
||||
if (ChestUIManager.Instance.CurrentChestName == null || ChestUIManager.Instance.CurrentChestName == "")
|
||||
{
|
||||
var end2 = Time.time + 0.1;
|
||||
while (Time.time < end2)
|
||||
{
|
||||
await System.Threading.Tasks.Task.Yield();
|
||||
this.OpenPanel();
|
||||
}
|
||||
animateClosing();
|
||||
end2 = Time.time + 0.3;
|
||||
while (Time.time < end2)
|
||||
else
|
||||
{
|
||||
await System.Threading.Tasks.Task.Yield();
|
||||
this.ClosePanel();
|
||||
}
|
||||
resettriggers();
|
||||
}
|
||||
}
|
||||
|
||||
@ -107,39 +64,6 @@ public abstract class UIBaseManager<T> : MonoBehaviour, ManagerInterface<T>
|
||||
//DynamicPanel = dynamicPanelController;
|
||||
}
|
||||
|
||||
private async void animateOpening()
|
||||
{
|
||||
/* GameObject.Find("Gold Chest").GetComponent<Animator>().SetTrigger("OpenIt");
|
||||
GameObject.Find("Prize Chest").GetComponent<Animator>().SetTrigger("OpenIt");
|
||||
GameObject.Find("Wodden Chest").GetComponent<Animator>().SetTrigger("OpenIt");*/
|
||||
}
|
||||
|
||||
private async void animateClosing()
|
||||
{
|
||||
/* GameObject.Find("Gold Chest").GetComponent<Animator>().ResetTrigger("OpenIt");
|
||||
GameObject.Find("Prize Chest").GetComponent<Animator>().ResetTrigger("OpenIt");
|
||||
GameObject.Find("Wodden Chest").GetComponent<Animator>().ResetTrigger("OpenIt");
|
||||
GameObject.Find("Gold Chest").GetComponent<Animator>().SetTrigger("CloseIt");
|
||||
GameObject.Find("Prize Chest").GetComponent<Animator>().SetTrigger("CloseIt");
|
||||
GameObject.Find("Wodden Chest").GetComponent<Animator>().SetTrigger("CloseIt");*/
|
||||
}
|
||||
|
||||
private async void resettriggers()
|
||||
{
|
||||
var end3 = Time.time + 0.0;
|
||||
while (Time.time < end3)
|
||||
{
|
||||
await System.Threading.Tasks.Task.Yield();
|
||||
}
|
||||
|
||||
/* GameObject.Find("Gold Chest").GetComponent<Animator>().ResetTrigger("CloseIt");
|
||||
GameObject.Find("Prize Chest").GetComponent<Animator>().ResetTrigger("CloseIt");
|
||||
GameObject.Find("Wodden Chest").GetComponent<Animator>().ResetTrigger("CloseIt");
|
||||
GameObject.Find("Wodden Chest").GetComponent<Animator>().SetTrigger("reactivate");
|
||||
GameObject.Find("Prize Chest").GetComponent<Animator>().SetTrigger("reactivate");
|
||||
GameObject.Find("Gold Chest").GetComponent<Animator>().SetTrigger("reactivate");*/
|
||||
}
|
||||
|
||||
public virtual bool OpenPanel()
|
||||
{
|
||||
Console.WriteLine("Panel opened");
|
||||
|
@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
@ -14,6 +15,11 @@ public class ChestUIManager : UIBaseManager<Chest>
|
||||
|
||||
public string CurrentChestName = null;
|
||||
|
||||
public bool OpenAfterDelay = false;
|
||||
public bool CloseAfterDelay = false;
|
||||
|
||||
private IEnumerator coroutine;
|
||||
|
||||
public void Awake()
|
||||
{
|
||||
if (Instance == null)
|
||||
@ -26,9 +32,41 @@ public class ChestUIManager : UIBaseManager<Chest>
|
||||
}
|
||||
}
|
||||
|
||||
public void Update()
|
||||
|
||||
public override void Update()
|
||||
{
|
||||
keyToOpen = (KeyCode) System.Enum.Parse(typeof(KeyCode), PlayerPrefs.GetString("Interact"));
|
||||
base.Update();
|
||||
|
||||
/* if (OpenAfterDelay && DynamicPanel == null && CurrentChestName != null && CurrentChestName != "")
|
||||
{
|
||||
Debug.Log("Open in Update");
|
||||
OpenAfterDelay = false;
|
||||
|
||||
|
||||
// Open additiona panels
|
||||
if (!EquipmentUIManager.Instance.GetPanelStatus()) EquipmentUIManager.Instance.OpenPanel();
|
||||
|
||||
if (!InventoryUIManager.Instance.GetPanelStatus()) InventoryUIManager.Instance.OpenPanel();
|
||||
|
||||
base.OpenPanel();
|
||||
}
|
||||
//keyToOpen = (KeyCode) System.Enum.Parse(typeof(KeyCode), PlayerPrefs.GetString("Interact"));
|
||||
|
||||
|
||||
if (CloseAfterDelay && DynamicPanel != null && CurrentChestName != null && CurrentChestName != "")
|
||||
{
|
||||
CloseAfterDelay = false;
|
||||
|
||||
|
||||
base.ClosePanel();
|
||||
|
||||
ChestContentUIManager.Instance.DynamicPanel = null;
|
||||
|
||||
// Close additionals panels
|
||||
if (EquipmentUIManager.Instance.GetPanelStatus()) EquipmentUIManager.Instance.ClosePanel();
|
||||
|
||||
if (InventoryUIManager.Instance.GetPanelStatus()) InventoryUIManager.Instance.ClosePanel();
|
||||
}*/
|
||||
|
||||
}
|
||||
|
||||
@ -41,12 +79,13 @@ public class ChestUIManager : UIBaseManager<Chest>
|
||||
return false;
|
||||
}
|
||||
|
||||
// Open additiona panels
|
||||
if (!EquipmentUIManager.Instance.GetPanelStatus()) EquipmentUIManager.Instance.OpenPanel();
|
||||
|
||||
if (!InventoryUIManager.Instance.GetPanelStatus()) InventoryUIManager.Instance.OpenPanel();
|
||||
// Animacje otwierania
|
||||
OpeningAnimate();
|
||||
|
||||
return base.OpenPanel();
|
||||
StartCoroutine(OpenWithDelay(0.3f));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool ClosePanel()
|
||||
@ -60,6 +99,11 @@ public class ChestUIManager : UIBaseManager<Chest>
|
||||
|
||||
if (InventoryUIManager.Instance.GetPanelStatus()) InventoryUIManager.Instance.ClosePanel();
|
||||
|
||||
// Animacje zmykania
|
||||
ClosingAnimate(CurrentChestName);
|
||||
StartCoroutine(CloseWithDelay(0.3f, CurrentChestName)); // delay to display closing without breaking
|
||||
|
||||
//CloseWithDelay(0.3f);
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -112,4 +156,58 @@ public class ChestUIManager : UIBaseManager<Chest>
|
||||
{
|
||||
return Elements.Find(chest => chest.Name == _chestName);
|
||||
}
|
||||
|
||||
#region Animation API
|
||||
private IEnumerator OpenWithDelay(float waitTime)
|
||||
{
|
||||
yield return new WaitForSeconds(waitTime);
|
||||
|
||||
// Open additiona panels
|
||||
if (!EquipmentUIManager.Instance.GetPanelStatus()) EquipmentUIManager.Instance.OpenPanel();
|
||||
|
||||
if (!InventoryUIManager.Instance.GetPanelStatus()) InventoryUIManager.Instance.OpenPanel();
|
||||
|
||||
base.OpenPanel();
|
||||
}
|
||||
|
||||
private IEnumerator CloseWithDelay(float waitTime, string chestName)
|
||||
{
|
||||
yield return new WaitForSeconds(waitTime);
|
||||
|
||||
ResetingTriggerAnimate(chestName);
|
||||
}
|
||||
|
||||
public void OpeningAnimate()
|
||||
{
|
||||
var currentChest = GameObject.FindGameObjectWithTag("ChestCollection").transform.Find(CurrentChestName);
|
||||
|
||||
if(currentChest != null)
|
||||
{
|
||||
currentChest.GetComponent<Animator>().SetTrigger("OpenIt");
|
||||
}
|
||||
}
|
||||
|
||||
public void ClosingAnimate(string chestName)
|
||||
{
|
||||
var currentChest = GameObject.FindGameObjectWithTag("ChestCollection").transform.Find(chestName);
|
||||
|
||||
if (currentChest != null)
|
||||
{
|
||||
currentChest.GetComponent<Animator>().ResetTrigger("OpenIt");
|
||||
currentChest.GetComponent<Animator>().SetTrigger("CloseIt");
|
||||
}
|
||||
}
|
||||
|
||||
public void ResetingTriggerAnimate(string chestName)
|
||||
{
|
||||
var currentChest = GameObject.FindGameObjectWithTag("ChestCollection").transform.Find(chestName);
|
||||
|
||||
if (currentChest != null)
|
||||
{
|
||||
currentChest.GetComponent<Animator>().ResetTrigger("CloseIt");
|
||||
currentChest.GetComponent<Animator>().SetTrigger("reactivate");
|
||||
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
15
Assets/Scripts/Scriptable Objects/FiveHitEnemy.asset
Normal file
15
Assets/Scripts/Scriptable Objects/FiveHitEnemy.asset
Normal file
@ -0,0 +1,15 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 86e55e24317208c4ca1e30d641bf42f0, type: 3}
|
||||
m_Name: FiveHitEnemy
|
||||
m_EditorClassIdentifier:
|
||||
initialValue: 15
|
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 57098e0ce33c2864291aa12279938b9a
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
15
Assets/Scripts/Scriptable Objects/NineHitEnemy.asset
Normal file
15
Assets/Scripts/Scriptable Objects/NineHitEnemy.asset
Normal file
@ -0,0 +1,15 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 86e55e24317208c4ca1e30d641bf42f0, type: 3}
|
||||
m_Name: NineHitEnemy
|
||||
m_EditorClassIdentifier:
|
||||
initialValue: 27
|
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f57d405a3ac6e744d8c03036cd481f64
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
15
Assets/Scripts/Scriptable Objects/OneHitEnemy.asset
Normal file
15
Assets/Scripts/Scriptable Objects/OneHitEnemy.asset
Normal file
@ -0,0 +1,15 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 86e55e24317208c4ca1e30d641bf42f0, type: 3}
|
||||
m_Name: OneHitEnemy
|
||||
m_EditorClassIdentifier:
|
||||
initialValue: 3
|
8
Assets/Scripts/Scriptable Objects/OneHitEnemy.asset.meta
Normal file
8
Assets/Scripts/Scriptable Objects/OneHitEnemy.asset.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 91834fc89b809df468d4727d2e4ec84b
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
15
Assets/Scripts/Scriptable Objects/SevenHitEnemy.asset
Normal file
15
Assets/Scripts/Scriptable Objects/SevenHitEnemy.asset
Normal file
@ -0,0 +1,15 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 86e55e24317208c4ca1e30d641bf42f0, type: 3}
|
||||
m_Name: SevenHitEnemy
|
||||
m_EditorClassIdentifier:
|
||||
initialValue: 21
|
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0d924c889f92b764e9802521d61f11c7
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -12,4 +12,4 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 86e55e24317208c4ca1e30d641bf42f0, type: 3}
|
||||
m_Name: ThreeHitEnemyHealth
|
||||
m_EditorClassIdentifier:
|
||||
initialValue: 3
|
||||
initialValue: 9
|
||||
|
Loading…
Reference in New Issue
Block a user