Main Plot - wizard scrool
This commit is contained in:
parent
4d3c3051df
commit
4d0c68cc53
@ -12,10 +12,10 @@ MonoBehaviour:
|
|||||||
m_Script: {fileID: 11500000, guid: 06201cadd951bcc4db5fccaa01783060, type: 3}
|
m_Script: {fileID: 11500000, guid: 06201cadd951bcc4db5fccaa01783060, type: 3}
|
||||||
m_Name: WizardCaveDial
|
m_Name: WizardCaveDial
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
SpeakerName: Kabix015
|
SpeakerName: kabix09
|
||||||
CurrentStep: 0
|
CurrentStep: 0
|
||||||
DialogueSteps:
|
DialogueSteps:
|
||||||
- Header: Kabix015
|
- Header: kabix09
|
||||||
WasDisplayed: 0
|
WasDisplayed: 0
|
||||||
ListOfSentences:
|
ListOfSentences:
|
||||||
- Sentence: Mercenary! You've found me! Do you have the scroll?
|
- Sentence: Mercenary! You've found me! Do you have the scroll?
|
||||||
@ -42,9 +42,9 @@ MonoBehaviour:
|
|||||||
ButtonActions:
|
ButtonActions:
|
||||||
m_PersistentCalls:
|
m_PersistentCalls:
|
||||||
m_Calls:
|
m_Calls:
|
||||||
- m_Target: {fileID: 11400000}
|
- m_Target: {fileID: 4314423216663515159, guid: d17e5507719af6d41a75c8fe7ae731bf, type: 3}
|
||||||
m_TargetAssemblyTypeName: Dialogue, Assembly-CSharp
|
m_TargetAssemblyTypeName: GetScroolWizard, Assembly-CSharp
|
||||||
m_MethodName: GoToNextSentence
|
m_MethodName: CheckCondition
|
||||||
m_Mode: 1
|
m_Mode: 1
|
||||||
m_Arguments:
|
m_Arguments:
|
||||||
m_ObjectArgument: {fileID: 0}
|
m_ObjectArgument: {fileID: 0}
|
||||||
@ -61,9 +61,9 @@ MonoBehaviour:
|
|||||||
ButtonActions:
|
ButtonActions:
|
||||||
m_PersistentCalls:
|
m_PersistentCalls:
|
||||||
m_Calls:
|
m_Calls:
|
||||||
- m_Target: {fileID: 11400000}
|
- m_Target: {fileID: 4314423216663515159, guid: d17e5507719af6d41a75c8fe7ae731bf, type: 3}
|
||||||
m_TargetAssemblyTypeName: Dialogue, Assembly-CSharp
|
m_TargetAssemblyTypeName: GetScroolWizard, Assembly-CSharp
|
||||||
m_MethodName: GoToNextSentence
|
m_MethodName: TakeItem
|
||||||
m_Mode: 1
|
m_Mode: 1
|
||||||
m_Arguments:
|
m_Arguments:
|
||||||
m_ObjectArgument: {fileID: 0}
|
m_ObjectArgument: {fileID: 0}
|
||||||
@ -75,43 +75,14 @@ MonoBehaviour:
|
|||||||
m_CallState: 2
|
m_CallState: 2
|
||||||
EndOfDialogueStepAction:
|
EndOfDialogueStepAction:
|
||||||
m_PersistentCalls:
|
m_PersistentCalls:
|
||||||
m_Calls:
|
m_Calls: []
|
||||||
- m_Target: {fileID: 0}
|
- Header: kabix09
|
||||||
m_TargetAssemblyTypeName:
|
|
||||||
m_MethodName:
|
|
||||||
m_Mode: 1
|
|
||||||
m_Arguments:
|
|
||||||
m_ObjectArgument: {fileID: 0}
|
|
||||||
m_ObjectArgumentAssemblyTypeName:
|
|
||||||
m_IntArgument: 0
|
|
||||||
m_FloatArgument: 0
|
|
||||||
m_StringArgument:
|
|
||||||
m_BoolArgument: 0
|
|
||||||
m_CallState: 2
|
|
||||||
- Header: Kabix015
|
|
||||||
WasDisplayed: 0
|
WasDisplayed: 0
|
||||||
ListOfSentences:
|
ListOfSentences:
|
||||||
- Sentence: Now I posses the unlimited power of the Darkness! The world will
|
- Sentence: Now I posses the unlimited power of the Darkness! The world will
|
||||||
be mine! And as your reward, you can choose to join me and help me conquer
|
be mine! And as your reward, you can choose to join me and help me conquer
|
||||||
the world!
|
the world!
|
||||||
Buttons:
|
Buttons:
|
||||||
- ButtonName: I'd be glad to join you.
|
|
||||||
Type: 1
|
|
||||||
ButtonActions:
|
|
||||||
m_PersistentCalls:
|
|
||||||
m_Calls:
|
|
||||||
- m_Target: {fileID: 11400000, guid: 18c346a423dc37b4cbd99cb02648802c, type: 2}
|
|
||||||
m_TargetAssemblyTypeName: MultiDialogue, Assembly-CSharp
|
|
||||||
m_MethodName: GoToNextDialogue
|
|
||||||
m_Mode: 3
|
|
||||||
m_Arguments:
|
|
||||||
m_ObjectArgument: {fileID: 0}
|
|
||||||
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
|
||||||
m_IntArgument: 1
|
|
||||||
m_FloatArgument: 0
|
|
||||||
m_StringArgument:
|
|
||||||
m_BoolArgument: 0
|
|
||||||
m_CallState: 2
|
|
||||||
- ButtonName: What? Over my dead body!
|
- ButtonName: What? Over my dead body!
|
||||||
Type: 1
|
Type: 1
|
||||||
ButtonActions:
|
ButtonActions:
|
||||||
@ -129,6 +100,23 @@ MonoBehaviour:
|
|||||||
m_StringArgument:
|
m_StringArgument:
|
||||||
m_BoolArgument: 0
|
m_BoolArgument: 0
|
||||||
m_CallState: 2
|
m_CallState: 2
|
||||||
|
- ButtonName: I'd be glad to join you.
|
||||||
|
Type: 1
|
||||||
|
ButtonActions:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls:
|
||||||
|
- m_Target: {fileID: 11400000, guid: 18c346a423dc37b4cbd99cb02648802c, type: 2}
|
||||||
|
m_TargetAssemblyTypeName: MultiDialogue, Assembly-CSharp
|
||||||
|
m_MethodName: GoToNextDialogue
|
||||||
|
m_Mode: 3
|
||||||
|
m_Arguments:
|
||||||
|
m_ObjectArgument: {fileID: 0}
|
||||||
|
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||||
|
m_IntArgument: 1
|
||||||
|
m_FloatArgument: 0
|
||||||
|
m_StringArgument:
|
||||||
|
m_BoolArgument: 0
|
||||||
|
m_CallState: 2
|
||||||
EndOfDialogueStepAction:
|
EndOfDialogueStepAction:
|
||||||
m_PersistentCalls:
|
m_PersistentCalls:
|
||||||
m_Calls: []
|
m_Calls: []
|
||||||
|
@ -12,14 +12,26 @@ MonoBehaviour:
|
|||||||
m_Script: {fileID: 11500000, guid: 06201cadd951bcc4db5fccaa01783060, type: 3}
|
m_Script: {fileID: 11500000, guid: 06201cadd951bcc4db5fccaa01783060, type: 3}
|
||||||
m_Name: WizardNoDial
|
m_Name: WizardNoDial
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
SpeakerName: Kabix015
|
SpeakerName: kabix09
|
||||||
CurrentStep: 0
|
CurrentStep: 0
|
||||||
DialogueSteps:
|
DialogueSteps:
|
||||||
- Header: Kabix015
|
- Header: kabix09
|
||||||
WasDisplayed: 0
|
WasDisplayed: 0
|
||||||
ListOfSentences:
|
ListOfSentences:
|
||||||
- Sentence: You will never find me! Muahahahahahaha!
|
- Sentence: You will never find me! Muahahahahahaha!
|
||||||
Buttons: []
|
Buttons: []
|
||||||
EndOfDialogueStepAction:
|
EndOfDialogueStepAction:
|
||||||
m_PersistentCalls:
|
m_PersistentCalls:
|
||||||
m_Calls: []
|
m_Calls:
|
||||||
|
- m_Target: {fileID: 4314423216663515159, guid: d17e5507719af6d41a75c8fe7ae731bf, type: 3}
|
||||||
|
m_TargetAssemblyTypeName: GetScroolWizard, Assembly-CSharp
|
||||||
|
m_MethodName: EscapeToDungeon
|
||||||
|
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
|
||||||
|
@ -12,14 +12,26 @@ MonoBehaviour:
|
|||||||
m_Script: {fileID: 11500000, guid: 06201cadd951bcc4db5fccaa01783060, type: 3}
|
m_Script: {fileID: 11500000, guid: 06201cadd951bcc4db5fccaa01783060, type: 3}
|
||||||
m_Name: WizardYesDial
|
m_Name: WizardYesDial
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
SpeakerName: Kabix015
|
SpeakerName: kabix09
|
||||||
CurrentStep: 0
|
CurrentStep: 0
|
||||||
DialogueSteps:
|
DialogueSteps:
|
||||||
- Header: Kabix015
|
- Header: kabix09
|
||||||
WasDisplayed: 0
|
WasDisplayed: 0
|
||||||
ListOfSentences:
|
ListOfSentences:
|
||||||
- Sentence: Wise of you. Take this sword as a sign of our alliance!
|
- Sentence: Wise of you. Take this sword as a sign of our alliance!
|
||||||
Buttons: []
|
Buttons: []
|
||||||
EndOfDialogueStepAction:
|
EndOfDialogueStepAction:
|
||||||
m_PersistentCalls:
|
m_PersistentCalls:
|
||||||
m_Calls: []
|
m_Calls:
|
||||||
|
- m_Target: {fileID: 4314423216663515159, guid: d17e5507719af6d41a75c8fe7ae731bf, type: 3}
|
||||||
|
m_TargetAssemblyTypeName: GetScroolWizard, Assembly-CSharp
|
||||||
|
m_MethodName: GetReward
|
||||||
|
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
|
||||||
|
@ -76,13 +76,13 @@ MonoBehaviour:
|
|||||||
EndOfDialogueStepAction:
|
EndOfDialogueStepAction:
|
||||||
m_PersistentCalls:
|
m_PersistentCalls:
|
||||||
m_Calls:
|
m_Calls:
|
||||||
- m_Target: {fileID: 0}
|
- m_Target: {fileID: 4314423216663515159, guid: d17e5507719af6d41a75c8fe7ae731bf, type: 3}
|
||||||
m_TargetAssemblyTypeName:
|
m_TargetAssemblyTypeName: GetScroolWizard, Assembly-CSharp
|
||||||
m_MethodName:
|
m_MethodName: TakeItem
|
||||||
m_Mode: 1
|
m_Mode: 1
|
||||||
m_Arguments:
|
m_Arguments:
|
||||||
m_ObjectArgument: {fileID: 0}
|
m_ObjectArgument: {fileID: 0}
|
||||||
m_ObjectArgumentAssemblyTypeName:
|
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||||
m_IntArgument: 0
|
m_IntArgument: 0
|
||||||
m_FloatArgument: 0
|
m_FloatArgument: 0
|
||||||
m_StringArgument:
|
m_StringArgument:
|
||||||
|
@ -22,4 +22,16 @@ MonoBehaviour:
|
|||||||
Buttons: []
|
Buttons: []
|
||||||
EndOfDialogueStepAction:
|
EndOfDialogueStepAction:
|
||||||
m_PersistentCalls:
|
m_PersistentCalls:
|
||||||
m_Calls: []
|
m_Calls:
|
||||||
|
- m_Target: {fileID: 4314423216663515159, guid: d17e5507719af6d41a75c8fe7ae731bf, type: 3}
|
||||||
|
m_TargetAssemblyTypeName: GetScroolWizard, Assembly-CSharp
|
||||||
|
m_MethodName: EscapeToDungeon
|
||||||
|
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
|
||||||
|
@ -22,4 +22,16 @@ MonoBehaviour:
|
|||||||
Buttons: []
|
Buttons: []
|
||||||
EndOfDialogueStepAction:
|
EndOfDialogueStepAction:
|
||||||
m_PersistentCalls:
|
m_PersistentCalls:
|
||||||
m_Calls: []
|
m_Calls:
|
||||||
|
- m_Target: {fileID: 4314423216663515159, guid: d17e5507719af6d41a75c8fe7ae731bf, type: 3}
|
||||||
|
m_TargetAssemblyTypeName: GetScroolWizard, Assembly-CSharp
|
||||||
|
m_MethodName: GetReward
|
||||||
|
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
|
||||||
|
@ -19,7 +19,7 @@ MonoBehaviour:
|
|||||||
value: 0
|
value: 0
|
||||||
image: {fileID: -1042470306147753749, guid: 866adc2eb813e72438343756fc3b4e01, type: 3}
|
image: {fileID: -1042470306147753749, guid: 866adc2eb813e72438343756fc3b4e01, type: 3}
|
||||||
itemModel: {fileID: 4524781388140831047, guid: c08f3c1754b787b4baa4fbe549e1f3f1, type: 3}
|
itemModel: {fileID: 4524781388140831047, guid: c08f3c1754b787b4baa4fbe549e1f3f1, type: 3}
|
||||||
price: 170
|
price: 370
|
||||||
useEffect:
|
useEffect:
|
||||||
m_PersistentCalls:
|
m_PersistentCalls:
|
||||||
m_Calls: []
|
m_Calls: []
|
||||||
|
@ -16,6 +16,7 @@ GameObject:
|
|||||||
- component: {fileID: 574776200439751497}
|
- component: {fileID: 574776200439751497}
|
||||||
- component: {fileID: 2255085012972026895}
|
- component: {fileID: 2255085012972026895}
|
||||||
- component: {fileID: 7400036343426951234}
|
- component: {fileID: 7400036343426951234}
|
||||||
|
- component: {fileID: 4314423216663515159}
|
||||||
m_Layer: 0
|
m_Layer: 0
|
||||||
m_Name: TalkingWizard
|
m_Name: TalkingWizard
|
||||||
m_TagString: NPC
|
m_TagString: NPC
|
||||||
@ -33,6 +34,7 @@ Transform:
|
|||||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||||
m_LocalPosition: {x: -20.848145, y: 18.195751, z: 133.20683}
|
m_LocalPosition: {x: -20.848145, y: 18.195751, z: 133.20683}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children:
|
m_Children:
|
||||||
- {fileID: 6451347682704892650}
|
- {fileID: 6451347682704892650}
|
||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
@ -49,6 +51,7 @@ SpriteRenderer:
|
|||||||
m_CastShadows: 0
|
m_CastShadows: 0
|
||||||
m_ReceiveShadows: 0
|
m_ReceiveShadows: 0
|
||||||
m_DynamicOccludee: 1
|
m_DynamicOccludee: 1
|
||||||
|
m_StaticShadowCaster: 0
|
||||||
m_MotionVectors: 1
|
m_MotionVectors: 1
|
||||||
m_LightProbeUsage: 1
|
m_LightProbeUsage: 1
|
||||||
m_ReflectionProbeUsage: 1
|
m_ReflectionProbeUsage: 1
|
||||||
@ -128,7 +131,7 @@ CircleCollider2D:
|
|||||||
m_Radius: 1.5
|
m_Radius: 1.5
|
||||||
--- !u!95 &6815460739701989453
|
--- !u!95 &6815460739701989453
|
||||||
Animator:
|
Animator:
|
||||||
serializedVersion: 3
|
serializedVersion: 4
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
m_PrefabInstance: {fileID: 0}
|
m_PrefabInstance: {fileID: 0}
|
||||||
@ -141,6 +144,7 @@ Animator:
|
|||||||
m_UpdateMode: 0
|
m_UpdateMode: 0
|
||||||
m_ApplyRootMotion: 0
|
m_ApplyRootMotion: 0
|
||||||
m_LinearVelocityBlending: 0
|
m_LinearVelocityBlending: 0
|
||||||
|
m_StabilizeFeet: 0
|
||||||
m_WarningMessage:
|
m_WarningMessage:
|
||||||
m_HasTransformHierarchy: 1
|
m_HasTransformHierarchy: 1
|
||||||
m_AllowConstantClipSamplingOptimization: 1
|
m_AllowConstantClipSamplingOptimization: 1
|
||||||
@ -157,7 +161,7 @@ MonoBehaviour:
|
|||||||
m_Script: {fileID: 11500000, guid: d622984048644f87804ad1a3f20aa23a, type: 3}
|
m_Script: {fileID: 11500000, guid: d622984048644f87804ad1a3f20aa23a, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
speed: 0.5
|
speed: 5
|
||||||
currentPosition:
|
currentPosition:
|
||||||
GCost: 0
|
GCost: 0
|
||||||
hCost: 0
|
hCost: 0
|
||||||
@ -205,6 +209,27 @@ MonoBehaviour:
|
|||||||
keyToOpen: 101
|
keyToOpen: 101
|
||||||
CanBeOpened: 1
|
CanBeOpened: 1
|
||||||
OpenInDefaultWay: 1
|
OpenInDefaultWay: 1
|
||||||
|
--- !u!114 &4314423216663515159
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 872844846741150860}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 961214ee9197dae4096dc53f82a5169c, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
RequiredItem: {fileID: 11400000, guid: e2b2ed01bfff8e0468e4ef5207b50a60, type: 2}
|
||||||
|
Reward:
|
||||||
|
Items:
|
||||||
|
- {fileID: 11400000, guid: 2f8335046aa0e9e4f860fb08bad905f7, type: 2}
|
||||||
|
- {fileID: 11400000, guid: 8843c76bd7a4cce4190d020494a5bbc9, type: 2}
|
||||||
|
Cash: 1500
|
||||||
|
Experience: 60
|
||||||
|
teleportPosition: {fileID: 0}
|
||||||
|
canEscape: 0
|
||||||
--- !u!1 &3370531153457017342
|
--- !u!1 &3370531153457017342
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -232,6 +257,7 @@ Transform:
|
|||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 872844846741150863}
|
m_Father: {fileID: 872844846741150863}
|
||||||
m_RootOrder: 0
|
m_RootOrder: 0
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -43,7 +43,6 @@ public class AStarPathfindingAgent : MonoBehaviour
|
|||||||
public void FindPath()
|
public void FindPath()
|
||||||
{
|
{
|
||||||
var player = FindObjectOfType<Player>().gameObject;
|
var player = FindObjectOfType<Player>().gameObject;
|
||||||
Debug.Log("Findign Path");
|
|
||||||
point = player.transform.position;
|
point = player.transform.position;
|
||||||
|
|
||||||
FindPoint();
|
FindPoint();
|
||||||
|
@ -28,6 +28,7 @@ public class DungeonManager : MonoBehaviour
|
|||||||
|
|
||||||
public static bool hasTeleported;
|
public static bool hasTeleported;
|
||||||
|
|
||||||
|
// well finally useless
|
||||||
public static void SetTeleported()
|
public static void SetTeleported()
|
||||||
{
|
{
|
||||||
hasTeleported = true;
|
hasTeleported = true;
|
||||||
|
8
Assets/Scripts/REFACTORING/Story/TheCave.meta
Normal file
8
Assets/Scripts/REFACTORING/Story/TheCave.meta
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 9c9c1c2c37bfb884f98c268f9bebab2a
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
106
Assets/Scripts/REFACTORING/Story/TheCave/GetScroolWizard.cs
Normal file
106
Assets/Scripts/REFACTORING/Story/TheCave/GetScroolWizard.cs
Normal file
@ -0,0 +1,106 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
[RequireComponent(typeof(AStarPathfindingAgent))]
|
||||||
|
class GetScroolWizard : MonoBehaviour
|
||||||
|
{
|
||||||
|
public Item RequiredItem;
|
||||||
|
|
||||||
|
public MissionReward Reward;
|
||||||
|
public Transform teleportPosition;
|
||||||
|
|
||||||
|
public bool canEscape = false;
|
||||||
|
|
||||||
|
private void Start()
|
||||||
|
{
|
||||||
|
teleportPosition = GameObject.Find("DoorToHell").transform;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void EscapeToDungeon()
|
||||||
|
{
|
||||||
|
var wizardOnScene = GameObject.FindGameObjectsWithTag("NPC").ToList().Where(el => el.name == gameObject.name).First();
|
||||||
|
|
||||||
|
wizardOnScene.GetComponent<AStarPathfindingAgent>().point = wizardOnScene.GetComponent<GetScroolWizard>().teleportPosition.position;
|
||||||
|
Debug.Log(wizardOnScene.GetComponent<AStarPathfindingAgent>().point);
|
||||||
|
Debug.Log(Vector2.Distance(wizardOnScene.GetComponent<AStarPathfindingAgent>().point, wizardOnScene.transform.position));
|
||||||
|
|
||||||
|
wizardOnScene.GetComponent<AStarPathfindingAgent>().FindPoint();
|
||||||
|
|
||||||
|
wizardOnScene.GetComponent<GetScroolWizard>().Escape();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Escape()
|
||||||
|
{
|
||||||
|
Debug.Log("Start courtine");
|
||||||
|
StartCoroutine(gameObject.GetComponent<AStarPathfindingAgent>().FollowPath());
|
||||||
|
}
|
||||||
|
|
||||||
|
// CHANGE THIS - we dupplicated herelogic from mission!!!
|
||||||
|
|
||||||
|
public void CheckCondition()
|
||||||
|
{
|
||||||
|
// CHECK CONDITION JEST WYWOŁYWANE W SUROWYM OBIEKCIE scriptable boject
|
||||||
|
// TO SIE DOWOŁUJE DO prefaba wizarda wiec musimy sila szuakc obietow na scenie heh
|
||||||
|
if(InventoryUIManager.Instance.FindItemInWarehouseByName(RequiredItem.name).Any())
|
||||||
|
{
|
||||||
|
var wizardOnScene = GameObject.FindGameObjectsWithTag("NPC").ToList().Where(el => el.name == gameObject.name).First();
|
||||||
|
|
||||||
|
wizardOnScene.GetComponent<DialogueManager>().Dialogue.GoToNextSentence();
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
var wizardOnScene = GameObject.FindGameObjectsWithTag("NPC").ToList().Where(el => el.name == gameObject.name).First();
|
||||||
|
|
||||||
|
wizardOnScene.GetComponent<DialogueManager>().Dialogue.BreakDialogueStep();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Move to npc action bucket (Action script)
|
||||||
|
public void TakeItem()
|
||||||
|
{
|
||||||
|
if(-1 != InventoryUIManager.Instance.RemoveOneByItemName(RequiredItem.name))
|
||||||
|
{
|
||||||
|
TaskUIManager.Instance.RemoveByName("Wizard Quest");
|
||||||
|
|
||||||
|
// go to next sentence
|
||||||
|
var wizardOnScene = GameObject.FindGameObjectsWithTag("NPC").ToList().Where(el => el.name == gameObject.name).First();
|
||||||
|
|
||||||
|
wizardOnScene.GetComponent<DialogueManager>().Dialogue.GoToNextSentence();
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
var wizardOnScene = GameObject.FindGameObjectsWithTag("NPC").ToList().Where(el => el.name == gameObject.name).First();
|
||||||
|
|
||||||
|
// Beacuse we have CheckCondition this should be uselles
|
||||||
|
if (wizardOnScene.GetComponent<DialogueManager>().Dialogue)
|
||||||
|
wizardOnScene.gameObject.GetComponent<DialogueManager>().Dialogue.BreakDialogueStep();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// copied from mission
|
||||||
|
public void GetReward()
|
||||||
|
{
|
||||||
|
var Player = GameObject.FindGameObjectWithTag("Player");
|
||||||
|
|
||||||
|
if (!Player)
|
||||||
|
Debug.LogError("GetScroolWizard::GetReward - There is no player on scene!!!");
|
||||||
|
|
||||||
|
Player.GetComponent<PlayerActions>().GetReward(Reward);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OnCollisionEnter2D(Collision2D collision)
|
||||||
|
{
|
||||||
|
if (collision.collider.tag == "SceneTransition")
|
||||||
|
{
|
||||||
|
// basically useless xd
|
||||||
|
DungeonManager.SetTeleported();
|
||||||
|
|
||||||
|
collision.gameObject.GetComponent<DoorBehaviour>().isEnabled = true;
|
||||||
|
|
||||||
|
Destroy(gameObject);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 961214ee9197dae4096dc53f82a5169c
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
Loading…
Reference in New Issue
Block a user