Skip to content

Commit

Permalink
Merge pull request #126 from pknu-wap/feature/munbin/#125
Browse files Browse the repository at this point in the history
보스 처치시 복귀 포탈 생성 구현 feature/munbin/#125
  • Loading branch information
MunbinLee authored Dec 1, 2023
2 parents 6ccd959 + 3f9bc12 commit ccddb64
Show file tree
Hide file tree
Showing 10 changed files with 347 additions and 714 deletions.
2 changes: 1 addition & 1 deletion Unity/Assets/MapGenerator/Resources/RetPortal.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ GameObject:
- component: {fileID: -4963905584451247549}
m_Layer: 0
m_Name: RetPortal
m_TagString: Untagged
m_TagString: RetPortal
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
Expand Down
31 changes: 30 additions & 1 deletion Unity/Assets/Monster/Giant/Giant.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -1656,7 +1656,7 @@ PrefabInstance:
- target: {fileID: 442247492029501132, guid: 1ad092788dd8a8c46906b9c2ff809f90, type: 3}
propertyPath: selectedEditorNode
value:
objectReference: {fileID: 0}
objectReference: {fileID: 969495621991419598}
- target: {fileID: 1098669232314767702, guid: 1ad092788dd8a8c46906b9c2ff809f90, type: 3}
propertyPath: m_AnchorMax.x
value: 0
Expand Down Expand Up @@ -1893,6 +1893,9 @@ PrefabInstance:
- targetCorrespondingSourceObject: {fileID: 160128256648817209, guid: 1ad092788dd8a8c46906b9c2ff809f90, type: 3}
insertIndex: -1
addedObject: {fileID: 2036674394921321500}
- targetCorrespondingSourceObject: {fileID: 160128256648817209, guid: 1ad092788dd8a8c46906b9c2ff809f90, type: 3}
insertIndex: -1
addedObject: {fileID: 969495621991419598}
m_SourcePrefab: {fileID: 100100000, guid: 1ad092788dd8a8c46906b9c2ff809f90, type: 3}
--- !u!114 &2274291000685839222 stripped
MonoBehaviour:
Expand Down Expand Up @@ -2054,6 +2057,7 @@ MonoBehaviour:
children:
- {fileID: 2036674394921321500}
- {fileID: 7973041714465759256}
- {fileID: 969495621991419598}
behaviourTree: {fileID: 0}
runtimePriority: 0
breakpoint: 0
Expand Down Expand Up @@ -2107,3 +2111,28 @@ MonoBehaviour:
behaviourTree: {fileID: 0}
runtimePriority: 0
breakpoint: 0
--- !u!114 &969495621991419598
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6902224715957730115}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 2d4309172d3bef7489e2a77834271789, type: 3}
m_Name:
m_EditorClassIdentifier:
title: ReturnMap
rect:
serializedVersion: 2
x: 260
y: 360
width: 160
height: 44
parent: {fileID: 5789106774320476550}
children: []
behaviourTree: {fileID: 0}
runtimePriority: 0
breakpoint: 0
newGameObject: {fileID: 2175497092943187397, guid: be223d04f29489f468f041beafd55b91, type: 3}
69 changes: 65 additions & 4 deletions Unity/Assets/Monster/Knight/Knight.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -1671,7 +1671,7 @@ PrefabInstance:
- target: {fileID: 442247492029501132, guid: 1ad092788dd8a8c46906b9c2ff809f90, type: 3}
propertyPath: selectedEditorNode
value:
objectReference: {fileID: 0}
objectReference: {fileID: 2906729193268439286}
- target: {fileID: 1710393109640347201, guid: 1ad092788dd8a8c46906b9c2ff809f90, type: 3}
propertyPath: m_LocalPosition.x
value: 47.63
Expand Down Expand Up @@ -1716,6 +1716,10 @@ PrefabInstance:
propertyPath: m_PresetInfoIsWorld
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4018982553719588997, guid: 1ad092788dd8a8c46906b9c2ff809f90, type: 3}
propertyPath: maxHealth
value: 1000
objectReference: {fileID: 0}
- target: {fileID: 4791448060018659852, guid: 1ad092788dd8a8c46906b9c2ff809f90, type: 3}
propertyPath: rect.x
value: 320
Expand Down Expand Up @@ -1864,6 +1868,12 @@ PrefabInstance:
- targetCorrespondingSourceObject: {fileID: 160128256648817209, guid: 1ad092788dd8a8c46906b9c2ff809f90, type: 3}
insertIndex: -1
addedObject: {fileID: 407996449360938722}
- targetCorrespondingSourceObject: {fileID: 160128256648817209, guid: 1ad092788dd8a8c46906b9c2ff809f90, type: 3}
insertIndex: -1
addedObject: {fileID: 9106088311278495016}
- targetCorrespondingSourceObject: {fileID: 160128256648817209, guid: 1ad092788dd8a8c46906b9c2ff809f90, type: 3}
insertIndex: -1
addedObject: {fileID: 2906729193268439286}
m_SourcePrefab: {fileID: 100100000, guid: 1ad092788dd8a8c46906b9c2ff809f90, type: 3}
--- !u!114 &3534114275532776079 stripped
MonoBehaviour:
Expand Down Expand Up @@ -2012,7 +2022,7 @@ MonoBehaviour:
height: 44
parent: {fileID: 5985374351147142762}
children:
- {fileID: 407996449360938722}
- {fileID: 9106088311278495016}
- {fileID: 4646152942762072922}
- {fileID: 1783112433615486597}
- {fileID: 4028682523045633669}
Expand Down Expand Up @@ -2137,11 +2147,62 @@ MonoBehaviour:
title: CheckMonsterDead
rect:
serializedVersion: 2
x: -0
y: 240
x: -160
y: 280
width: 160
height: 44
parent: {fileID: 9106088311278495016}
children: []
behaviourTree: {fileID: 0}
runtimePriority: 0
breakpoint: 0
--- !u!114 &9106088311278495016
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8164451523530529466}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4c78c7da6b00e1b46bad07949050f82f, type: 3}
m_Name:
m_EditorClassIdentifier:
title: Sequence
rect:
serializedVersion: 2
x: -40
y: 200
width: 160
height: 44
parent: {fileID: 1772531170030906082}
children:
- {fileID: 407996449360938722}
- {fileID: 2906729193268439286}
behaviourTree: {fileID: 0}
runtimePriority: 0
breakpoint: 0
random: 0
--- !u!114 &2906729193268439286
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8164451523530529466}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 2d4309172d3bef7489e2a77834271789, type: 3}
m_Name:
m_EditorClassIdentifier:
title: ReturnMap
rect:
serializedVersion: 2
x: 34
y: 274.8
width: 160
height: 44
parent: {fileID: 9106088311278495016}
children: []
behaviourTree: {fileID: 0}
runtimePriority: 0
Expand Down
32 changes: 32 additions & 0 deletions Unity/Assets/Monster/Nodes/ReturnMap.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
using MBT;
using UnityEngine;

namespace Monster.Nodes
{
[AddComponentMenu("")]
[MBTNode(name = "Monster/ReturnMap")]
public class ReturnMap : Leaf
{
private SpriteRenderer _sprite;
private CapsuleCollider2D _collider;
private bool _created;

private void Start()
{
var gameObj = GameObject.FindGameObjectWithTag("RetPortal");
_sprite = gameObj.GetComponent<SpriteRenderer>();
_collider = gameObj.GetComponent<CapsuleCollider2D>();
}

public override NodeResult Execute()
{
if (_created) return NodeResult.success;

_created = true;
_sprite.enabled = true;
_collider.enabled = true;

return NodeResult.success;
}
}
}
11 changes: 11 additions & 0 deletions Unity/Assets/Monster/Nodes/ReturnMap.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

66 changes: 66 additions & 0 deletions Unity/Assets/Scenes/BossMap/BossMap1.unity
Original file line number Diff line number Diff line change
Expand Up @@ -818,6 +818,71 @@ SpriteRenderer:
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
m_SpriteSortPoint: 0
--- !u!1001 &1171240942
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 151607671467519266, guid: be223d04f29489f468f041beafd55b91, type: 3}
propertyPath: m_Enabled
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2175497092943187397, guid: be223d04f29489f468f041beafd55b91, type: 3}
propertyPath: m_Name
value: RetPortal
objectReference: {fileID: 0}
- target: {fileID: 2253340507670832968, guid: be223d04f29489f468f041beafd55b91, type: 3}
propertyPath: m_Enabled
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2354017587311172297, guid: be223d04f29489f468f041beafd55b91, type: 3}
propertyPath: m_LocalPosition.x
value: 33.10634
objectReference: {fileID: 0}
- target: {fileID: 2354017587311172297, guid: be223d04f29489f468f041beafd55b91, type: 3}
propertyPath: m_LocalPosition.y
value: -1.9341903
objectReference: {fileID: 0}
- target: {fileID: 2354017587311172297, guid: be223d04f29489f468f041beafd55b91, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2354017587311172297, guid: be223d04f29489f468f041beafd55b91, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2354017587311172297, guid: be223d04f29489f468f041beafd55b91, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2354017587311172297, guid: be223d04f29489f468f041beafd55b91, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2354017587311172297, guid: be223d04f29489f468f041beafd55b91, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2354017587311172297, guid: be223d04f29489f468f041beafd55b91, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2354017587311172297, guid: be223d04f29489f468f041beafd55b91, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2354017587311172297, guid: be223d04f29489f468f041beafd55b91, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: be223d04f29489f468f041beafd55b91, type: 3}
--- !u!1 &1668772986
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -10661,3 +10726,4 @@ SceneRoots:
- {fileID: 450909735380989077}
- {fileID: 1722061543}
- {fileID: 788605532}
- {fileID: 1171240942}
66 changes: 66 additions & 0 deletions Unity/Assets/Scenes/BossMap/BossMap2.unity
Original file line number Diff line number Diff line change
Expand Up @@ -818,6 +818,71 @@ SpriteRenderer:
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
m_SpriteSortPoint: 0
--- !u!1001 &913910928
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 151607671467519266, guid: be223d04f29489f468f041beafd55b91, type: 3}
propertyPath: m_Enabled
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2175497092943187397, guid: be223d04f29489f468f041beafd55b91, type: 3}
propertyPath: m_Name
value: RetPortal
objectReference: {fileID: 0}
- target: {fileID: 2253340507670832968, guid: be223d04f29489f468f041beafd55b91, type: 3}
propertyPath: m_Enabled
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2354017587311172297, guid: be223d04f29489f468f041beafd55b91, type: 3}
propertyPath: m_LocalPosition.x
value: 33.10634
objectReference: {fileID: 0}
- target: {fileID: 2354017587311172297, guid: be223d04f29489f468f041beafd55b91, type: 3}
propertyPath: m_LocalPosition.y
value: -1.9341903
objectReference: {fileID: 0}
- target: {fileID: 2354017587311172297, guid: be223d04f29489f468f041beafd55b91, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2354017587311172297, guid: be223d04f29489f468f041beafd55b91, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2354017587311172297, guid: be223d04f29489f468f041beafd55b91, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2354017587311172297, guid: be223d04f29489f468f041beafd55b91, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2354017587311172297, guid: be223d04f29489f468f041beafd55b91, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2354017587311172297, guid: be223d04f29489f468f041beafd55b91, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2354017587311172297, guid: be223d04f29489f468f041beafd55b91, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2354017587311172297, guid: be223d04f29489f468f041beafd55b91, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: be223d04f29489f468f041beafd55b91, type: 3}
--- !u!1 &1668772986
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -10661,3 +10726,4 @@ SceneRoots:
- {fileID: 450909735380989077}
- {fileID: 1722061543}
- {fileID: 788605532}
- {fileID: 913910928}
Loading

0 comments on commit ccddb64

Please sign in to comment.