Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
tetra-tower
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Oenos
tetra-tower
Commits
f015c152
Commit
f015c152
authored
Feb 06, 2019
by
18류지석
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
골드 3 올려주는 골드포션 만듦. 상호작용 방식을 갈아엎음. IPlayerInteraction 인터페이스를 통해 상호작용 가능한 오브젝트를 만들 수 있음.
parent
836db3d1
Changes
18
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
712 additions
and
92 deletions
+712
-92
LifeStoneUI.prefab
Assets/Prefabs/UI/In-Game UI/LifeStoneUI.prefab
+2
-0
goldPotion.prefab
Assets/Prefabs/UI/In-Game UI/LifeStoneUI/goldPotion.prefab
+224
-0
goldPotion.prefab.meta
.../Prefabs/UI/In-Game UI/LifeStoneUI/goldPotion.prefab.meta
+8
-0
LifeStoneTestUI.prefab
Assets/Prefabs/UI/LifeStoneTestUI.prefab
+204
-5
PlayerController.cs
Assets/Scripts/Characters/PlayerController.cs
+13
-79
DroppedItem.cs
Assets/Scripts/Item/DroppedItem.cs
+2
-5
IPlayerInteraction.cs
Assets/Scripts/Item/IPlayerInteraction.cs
+9
-0
IPlayerInteraction.cs.meta
Assets/Scripts/Item/IPlayerInteraction.cs.meta
+11
-0
InventoryManager.cs
Assets/Scripts/Item/InventoryManager.cs
+1
-1
DroppedLifeStone.cs
...Scripts/UI/In-game UI/LifeStoneScript/DroppedLifeStone.cs
+2
-2
DroppedPotion.cs
...ts/Scripts/UI/In-game UI/LifeStoneScript/DroppedPotion.cs
+21
-0
DroppedPotion.cs.meta
...ripts/UI/In-game UI/LifeStoneScript/DroppedPotion.cs.meta
+11
-0
LifeStoneManager.cs
...Scripts/UI/In-game UI/LifeStoneScript/LifeStoneManager.cs
+6
-0
LifeStoneTest.cs
...ts/Scripts/UI/In-game UI/LifeStoneScript/LifeStoneTest.cs
+4
-0
goldPotion.png
Assets/Sprites/LifeStone/goldPotion.png
+0
-0
goldPotion.png.meta
Assets/Sprites/LifeStone/goldPotion.png.meta
+97
-0
goldPotion_border.png
Assets/Sprites/LifeStone/goldPotion_border.png
+0
-0
goldPotion_border.png.meta
Assets/Sprites/LifeStone/goldPotion_border.png.meta
+97
-0
No files found.
Assets/Prefabs/UI/In-Game UI/LifeStoneUI.prefab
View file @
f015c152
...
...
@@ -93,6 +93,8 @@ MonoBehaviour:
stoneSuper
:
{
fileID
:
1874721051176178
}
lifeUnitPrefab
:
{
fileID
:
1274079429510600
,
guid
:
c1fa87a24452e5745859b739e4a5254b
,
type
:
2
}
goldPotionPrefab
:
{
fileID
:
1778675533210814
,
guid
:
57c0f65ad47e39943a69b5b0a6fa0e47
,
type
:
2
}
vibrationVariable
:
0.1
droppedLifeStonePrefab
:
{
fileID
:
1149595688849768
,
guid
:
8255a117a93935941b32b4aed9b299a0
,
type
:
2
}
...
...
Assets/Prefabs/UI/In-Game UI/LifeStoneUI/goldPotion.prefab
0 → 100644
View file @
f015c152
%YAML
1.1
%TAG
!u!
tag:unity3d.com,2011:
---
!u!1001
&100100000
Prefab
:
m_ObjectHideFlags
:
1
serializedVersion
:
2
m_Modification
:
m_TransformParent
:
{
fileID
:
0
}
m_Modifications
:
[]
m_RemovedComponents
:
[]
m_SourcePrefab
:
{
fileID
:
0
}
m_RootGameObject
:
{
fileID
:
1778675533210814
}
m_IsPrefabAsset
:
1
---
!u!1
&1379687187881618
GameObject
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
100100000
}
serializedVersion
:
6
m_Component
:
-
component
:
{
fileID
:
4030763289410656
}
-
component
:
{
fileID
:
212633996592932028
}
m_Layer
:
0
m_Name
:
goldPotion_border
m_TagString
:
Untagged
m_Icon
:
{
fileID
:
0
}
m_NavMeshLayer
:
0
m_StaticEditorFlags
:
0
m_IsActive
:
1
---
!u!1
&1778675533210814
GameObject
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
100100000
}
serializedVersion
:
6
m_Component
:
-
component
:
{
fileID
:
4540688189116890
}
-
component
:
{
fileID
:
212889816421210324
}
-
component
:
{
fileID
:
114215107451734404
}
-
component
:
{
fileID
:
61337180976087290
}
-
component
:
{
fileID
:
50941525670565170
}
m_Layer
:
13
m_Name
:
goldPotion
m_TagString
:
DroppedPotion
m_Icon
:
{
fileID
:
0
}
m_NavMeshLayer
:
0
m_StaticEditorFlags
:
0
m_IsActive
:
1
---
!u!4
&4030763289410656
Transform
:
m_ObjectHideFlags
:
1
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
100100000
}
m_GameObject
:
{
fileID
:
1379687187881618
}
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
:
4540688189116890
}
m_RootOrder
:
0
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
---
!u!4
&4540688189116890
Transform
:
m_ObjectHideFlags
:
1
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
100100000
}
m_GameObject
:
{
fileID
:
1778675533210814
}
m_LocalRotation
:
{
x
:
0
,
y
:
0
,
z
:
0
,
w
:
1
}
m_LocalPosition
:
{
x
:
0
,
y
:
0
,
z
:
0
}
m_LocalScale
:
{
x
:
1
,
y
:
1
,
z
:
1
}
m_Children
:
-
{
fileID
:
4030763289410656
}
m_Father
:
{
fileID
:
0
}
m_RootOrder
:
0
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
---
!u!50
&50941525670565170
Rigidbody2D
:
serializedVersion
:
4
m_ObjectHideFlags
:
1
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
100100000
}
m_GameObject
:
{
fileID
:
1778675533210814
}
m_BodyType
:
0
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
:
4
---
!u!61
&61337180976087290
BoxCollider2D
:
m_ObjectHideFlags
:
1
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
100100000
}
m_GameObject
:
{
fileID
:
1778675533210814
}
m_Enabled
:
1
m_Density
:
1
m_Material
:
{
fileID
:
0
}
m_IsTrigger
:
0
m_UsedByEffector
:
0
m_UsedByComposite
:
0
m_Offset
:
{
x
:
0
,
y
:
0
}
m_SpriteTilingProperty
:
border
:
{
x
:
0
,
y
:
0
,
z
:
0
,
w
:
0
}
pivot
:
{
x
:
0.5
,
y
:
0.5
}
oldSize
:
{
x
:
0.46875
,
y
:
0.53125
}
newSize
:
{
x
:
0.46875
,
y
:
0.53125
}
adaptiveTilingThreshold
:
0.5
drawMode
:
0
adaptiveTiling
:
0
m_AutoTiling
:
0
serializedVersion
:
2
m_Size
:
{
x
:
0.375
,
y
:
0.438
}
m_EdgeRadius
:
0
---
!u!114
&114215107451734404
MonoBehaviour
:
m_ObjectHideFlags
:
1
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
100100000
}
m_GameObject
:
{
fileID
:
1778675533210814
}
m_Enabled
:
1
m_EditorHideFlags
:
0
m_Script
:
{
fileID
:
11500000
,
guid
:
36609b223803b6043b6f1b673d0c8665
,
type
:
3
}
m_Name
:
m_EditorClassIdentifier
:
highlight
:
{
fileID
:
1379687187881618
}
---
!u!212
&212633996592932028
SpriteRenderer
:
m_ObjectHideFlags
:
1
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
100100000
}
m_GameObject
:
{
fileID
:
1379687187881618
}
m_Enabled
:
1
m_CastShadows
:
0
m_ReceiveShadows
:
0
m_DynamicOccludee
:
1
m_MotionVectors
:
1
m_LightProbeUsage
:
1
m_ReflectionProbeUsage
:
1
m_RenderingLayerMask
:
4294967295
m_Materials
:
-
{
fileID
:
10754
,
guid
:
0000000000000000f000000000000000
,
type
:
0
}
m_StaticBatchInfo
:
firstSubMesh
:
0
subMeshCount
:
0
m_StaticBatchRoot
:
{
fileID
:
0
}
m_ProbeAnchor
:
{
fileID
:
0
}
m_LightProbeVolumeOverride
:
{
fileID
:
0
}
m_ScaleInLightmap
:
1
m_PreserveUVs
:
0
m_IgnoreNormalsForChartDetection
:
0
m_ImportantGI
:
0
m_StitchLightmapSeams
:
0
m_SelectedEditorRenderState
:
0
m_MinimumChartSize
:
4
m_AutoUVMaxDistance
:
0.5
m_AutoUVMaxAngle
:
89
m_LightmapParameters
:
{
fileID
:
0
}
m_SortingLayerID
:
2145601713
m_SortingLayer
:
9
m_SortingOrder
:
-1
m_Sprite
:
{
fileID
:
21300000
,
guid
:
4ed132a41da0c71499cd98e8ca7ea94b
,
type
:
3
}
m_Color
:
{
r
:
1
,
g
:
1
,
b
:
1
,
a
:
1
}
m_FlipX
:
0
m_FlipY
:
0
m_DrawMode
:
0
m_Size
:
{
x
:
0.46875
,
y
:
0.53125
}
m_AdaptiveModeThreshold
:
0.5
m_SpriteTileMode
:
0
m_WasSpriteAssigned
:
1
m_MaskInteraction
:
0
m_SpriteSortPoint
:
0
---
!u!212
&212889816421210324
SpriteRenderer
:
m_ObjectHideFlags
:
1
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
100100000
}
m_GameObject
:
{
fileID
:
1778675533210814
}
m_Enabled
:
1
m_CastShadows
:
0
m_ReceiveShadows
:
0
m_DynamicOccludee
:
1
m_MotionVectors
:
1
m_LightProbeUsage
:
1
m_ReflectionProbeUsage
:
1
m_RenderingLayerMask
:
4294967295
m_Materials
:
-
{
fileID
:
10754
,
guid
:
0000000000000000f000000000000000
,
type
:
0
}
m_StaticBatchInfo
:
firstSubMesh
:
0
subMeshCount
:
0
m_StaticBatchRoot
:
{
fileID
:
0
}
m_ProbeAnchor
:
{
fileID
:
0
}
m_LightProbeVolumeOverride
:
{
fileID
:
0
}
m_ScaleInLightmap
:
1
m_PreserveUVs
:
0
m_IgnoreNormalsForChartDetection
:
0
m_ImportantGI
:
0
m_StitchLightmapSeams
:
0
m_SelectedEditorRenderState
:
0
m_MinimumChartSize
:
4
m_AutoUVMaxDistance
:
0.5
m_AutoUVMaxAngle
:
89
m_LightmapParameters
:
{
fileID
:
0
}
m_SortingLayerID
:
2145601713
m_SortingLayer
:
9
m_SortingOrder
:
0
m_Sprite
:
{
fileID
:
21300000
,
guid
:
634b66525497d9f4f987f4868a7107a0
,
type
:
3
}
m_Color
:
{
r
:
1
,
g
:
1
,
b
:
1
,
a
:
1
}
m_FlipX
:
0
m_FlipY
:
0
m_DrawMode
:
0
m_Size
:
{
x
:
0.46875
,
y
:
0.53125
}
m_AdaptiveModeThreshold
:
0.5
m_SpriteTileMode
:
0
m_WasSpriteAssigned
:
1
m_MaskInteraction
:
0
m_SpriteSortPoint
:
0
Assets/Prefabs/UI/In-Game UI/LifeStoneUI/goldPotion.prefab.meta
0 → 100644
View file @
f015c152
fileFormatVersion: 2
guid: 57c0f65ad47e39943a69b5b0a6fa0e47
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 100100000
userData:
assetBundleName:
assetBundleVariant:
Assets/Prefabs/UI/LifeStoneTestUI.prefab
View file @
f015c152
...
...
@@ -215,7 +215,7 @@ GameObject:
-
component
:
{
fileID
:
114740118105404076
}
-
component
:
{
fileID
:
114622696832517678
}
m_Layer
:
5
m_Name
:
Row
Button
m_Name
:
GoldPotion
Button
m_TagString
:
Untagged
m_Icon
:
{
fileID
:
0
}
m_NavMeshLayer
:
0
...
...
@@ -361,6 +361,24 @@ GameObject:
m_NavMeshLayer
:
0
m_StaticEditorFlags
:
0
m_IsActive
:
1
---
!u!1
&1560361365331608
GameObject
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
100100000
}
serializedVersion
:
6
m_Component
:
-
component
:
{
fileID
:
224503018427341466
}
-
component
:
{
fileID
:
222638418909960560
}
-
component
:
{
fileID
:
114116047148540108
}
-
component
:
{
fileID
:
114699276401691626
}
m_Layer
:
5
m_Name
:
RowButton
m_TagString
:
Untagged
m_Icon
:
{
fileID
:
0
}
m_NavMeshLayer
:
0
m_StaticEditorFlags
:
0
m_IsActive
:
1
---
!u!1
&1580341585858098
GameObject
:
m_ObjectHideFlags
:
1
...
...
@@ -395,6 +413,23 @@ GameObject:
m_NavMeshLayer
:
0
m_StaticEditorFlags
:
0
m_IsActive
:
1
---
!u!1
&1626449587958878
GameObject
:
m_ObjectHideFlags
:
1
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
100100000
}
serializedVersion
:
6
m_Component
:
-
component
:
{
fileID
:
224737386407554440
}
-
component
:
{
fileID
:
222462093927222890
}
-
component
:
{
fileID
:
114473746526159238
}
m_Layer
:
5
m_Name
:
Text
m_TagString
:
Untagged
m_Icon
:
{
fileID
:
0
}
m_NavMeshLayer
:
0
m_StaticEditorFlags
:
0
m_IsActive
:
1
---
!u!1
&1635164560723902
GameObject
:
m_ObjectHideFlags
:
0
...
...
@@ -889,6 +924,33 @@ MonoBehaviour:
m_VerticalOverflow
:
0
m_LineSpacing
:
1
m_Text
:
Gold Probability
---
!u!114
&114116047148540108
MonoBehaviour
:
m_ObjectHideFlags
:
1
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
100100000
}
m_GameObject
:
{
fileID
:
1560361365331608
}
m_Enabled
:
1
m_EditorHideFlags
:
0
m_Script
:
{
fileID
:
-765806418
,
guid
:
f70555f144d8491a825f0804e09c671c
,
type
:
3
}
m_Name
:
m_EditorClassIdentifier
:
m_Material
:
{
fileID
:
0
}
m_Color
:
{
r
:
1
,
g
:
1
,
b
:
1
,
a
:
1
}
m_RaycastTarget
:
1
m_OnCullStateChanged
:
m_PersistentCalls
:
m_Calls
:
[]
m_TypeName
:
UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_Sprite
:
{
fileID
:
10905
,
guid
:
0000000000000000f000000000000000
,
type
:
0
}
m_Type
:
1
m_PreserveAspect
:
0
m_FillCenter
:
1
m_FillMethod
:
4
m_FillAmount
:
1
m_FillClockwise
:
1
m_FillOrigin
:
0
---
!u!114
&114128779111373096
MonoBehaviour
:
m_ObjectHideFlags
:
1
...
...
@@ -1220,6 +1282,39 @@ MonoBehaviour:
m_CaretBlinkRate
:
0.85
m_CaretWidth
:
1
m_ReadOnly
:
0
---
!u!114
&114473746526159238
MonoBehaviour
:
m_ObjectHideFlags
:
1
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
100100000
}
m_GameObject
:
{
fileID
:
1626449587958878
}
m_Enabled
:
1
m_EditorHideFlags
:
0
m_Script
:
{
fileID
:
708705254
,
guid
:
f70555f144d8491a825f0804e09c671c
,
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_OnCullStateChanged
:
m_PersistentCalls
:
m_Calls
:
[]
m_TypeName
:
UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
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
:
4
m_AlignByGeometry
:
0
m_RichText
:
1
m_HorizontalOverflow
:
0
m_VerticalOverflow
:
0
m_LineSpacing
:
1
m_Text
:
AddRow
---
!u!114
&114485836925563640
MonoBehaviour
:
m_ObjectHideFlags
:
1
...
...
@@ -1492,7 +1587,7 @@ MonoBehaviour:
m_PersistentCalls
:
m_Calls
:
-
m_Target
:
{
fileID
:
114627791461826676
}
m_MethodName
:
row
m_MethodName
:
goldPotion
m_Mode
:
1
m_Arguments
:
m_ObjectArgument
:
{
fileID
:
0
}
...
...
@@ -1556,6 +1651,58 @@ MonoBehaviour:
m_VerticalOverflow
:
0
m_LineSpacing
:
1
m_Text
:
Destroy Number
---
!u!114
&114699276401691626
MonoBehaviour
:
m_ObjectHideFlags
:
1
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
100100000
}
m_GameObject
:
{
fileID
:
1560361365331608
}
m_Enabled
:
1
m_EditorHideFlags
:
0
m_Script
:
{
fileID
:
1392445389
,
guid
:
f70555f144d8491a825f0804e09c671c
,
type
:
3
}
m_Name
:
m_EditorClassIdentifier
:
m_Navigation
:
m_Mode
:
3
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_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_DisabledSprite
:
{
fileID
:
0
}
m_AnimationTriggers
:
m_NormalTrigger
:
Normal
m_HighlightedTrigger
:
Highlighted
m_PressedTrigger
:
Pressed
m_DisabledTrigger
:
Disabled
m_Interactable
:
1
m_TargetGraphic
:
{
fileID
:
114116047148540108
}
m_OnClick
:
m_PersistentCalls
:
m_Calls
:
-
m_Target
:
{
fileID
:
114627791461826676
}
m_MethodName
:
row
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
m_TypeName
:
UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null
---
!u!114
&114701905890202140
MonoBehaviour
:
m_ObjectHideFlags
:
1
...
...
@@ -1642,7 +1789,7 @@ MonoBehaviour:
m_HorizontalOverflow
:
0
m_VerticalOverflow
:
0
m_LineSpacing
:
1
m_Text
:
AddRow
m_Text
:
GoldPotion
---
!u!114
&114738448003947704
MonoBehaviour
:
m_ObjectHideFlags
:
1
...
...
@@ -2410,6 +2557,13 @@ CanvasRenderer:
m_PrefabInternal
:
{
fileID
:
100100000
}
m_GameObject
:
{
fileID
:
1827015396991022
}
m_CullTransparentMesh
:
0
---
!u!222
&222462093927222890
CanvasRenderer
:
m_ObjectHideFlags
:
1
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
100100000
}
m_GameObject
:
{
fileID
:
1626449587958878
}
m_CullTransparentMesh
:
0
---
!u!222
&222486671322788934
CanvasRenderer
:
m_ObjectHideFlags
:
1
...
...
@@ -2431,6 +2585,13 @@ CanvasRenderer:
m_PrefabInternal
:
{
fileID
:
100100000
}
m_GameObject
:
{
fileID
:
1733832986403222
}
m_CullTransparentMesh
:
0
---
!u!222
&222638418909960560
CanvasRenderer
:
m_ObjectHideFlags
:
1
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
100100000
}
m_GameObject
:
{
fileID
:
1560361365331608
}
m_CullTransparentMesh
:
0
---
!u!222
&222640117483477652
CanvasRenderer
:
m_ObjectHideFlags
:
1
...
...
@@ -2583,11 +2744,11 @@ RectTransform:
m_Children
:
-
{
fileID
:
224811431485064036
}
m_Father
:
{
fileID
:
224627740379736590
}
m_RootOrder
:
1
1
m_RootOrder
:
1
2
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
m_AnchorMin
:
{
x
:
1
,
y
:
1
}
m_AnchorMax
:
{
x
:
1
,
y
:
1
}
m_AnchoredPosition
:
{
x
:
-256
,
y
:
-
6
5
}
m_AnchoredPosition
:
{
x
:
-256
,
y
:
-
121.8
5
}
m_SizeDelta
:
{
x
:
154.8
,
y
:
30
}
m_Pivot
:
{
x
:
0.5
,
y
:
0.5
}
---
!u!224
&224243061702484194
...
...
@@ -2741,6 +2902,25 @@ RectTransform:
m_AnchoredPosition
:
{
x
:
0
,
y
:
0
}
m_SizeDelta
:
{
x
:
0
,
y
:
0
}
m_Pivot
:
{
x
:
0.5
,
y
:
0.5
}
---
!u!224
&224503018427341466
RectTransform
:
m_ObjectHideFlags
:
1
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
100100000
}
m_GameObject
:
{
fileID
:
1560361365331608
}
m_LocalRotation
:
{
x
:
-0
,
y
:
-0
,
z
:
-0
,
w
:
1
}
m_LocalPosition
:
{
x
:
0
,
y
:
0
,
z
:
0
}
m_LocalScale
:
{
x
:
1
,
y
:
1
,
z
:
1
}
m_Children
:
-
{
fileID
:
224737386407554440
}
m_Father
:
{
fileID
:
224627740379736590
}
m_RootOrder
:
11
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
m_AnchorMin
:
{
x
:
1
,
y
:
1
}
m_AnchorMax
:
{
x
:
1
,
y
:
1
}
m_AnchoredPosition
:
{
x
:
-256
,
y
:
-65
}
m_SizeDelta
:
{
x
:
154.8
,
y
:
30
}
m_Pivot
:
{
x
:
0.5
,
y
:
0.5
}
---
!u!224
&224543572149917094
RectTransform
:
m_ObjectHideFlags
:
1
...
...
@@ -2834,6 +3014,7 @@ RectTransform:
-
{
fileID
:
224655068157742206
}
-
{
fileID
:
224035536980525080
}
-
{
fileID
:
224248067529471380
}
-
{
fileID
:
224503018427341466
}
-
{
fileID
:
224200262694101686
}
m_Father
:
{
fileID
:
0
}
m_RootOrder
:
0
...
...
@@ -2937,6 +3118,24 @@ RectTransform:
m_AnchoredPosition
:
{
x
:
0
,
y
:
-0.5
}
m_SizeDelta
:
{
x
:
-20
,
y
:
-13
}
m_Pivot
:
{
x
:
0.5
,
y
:
0.5
}
---
!u!224
&224737386407554440
RectTransform
:
m_ObjectHideFlags
:
1
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
100100000
}
m_GameObject
:
{
fileID
:
1626449587958878
}
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
:
224503018427341466
}
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!224
&224739375847309528
RectTransform
:
m_ObjectHideFlags
:
1
...
...
Assets/Scripts/Characters/PlayerController.cs
View file @
f015c152
...
...
@@ -58,8 +58,7 @@ public class PlayerController : MonoBehaviour
[
SerializeField
]
private
float
rayDistance
;
[
SerializeField
]
private
DroppedItem
lastDropItem
;
private
DroppedLifeStone
lastLifeStone
;
private
IPlayerInteraction
lastDropItem
;
private
bool
interaction
;
public
PlayerState
playerState
,
previousState
;
...
...
@@ -86,27 +85,16 @@ public class PlayerController : MonoBehaviour
jump
=
true
;
}
if
(
GetItemRay
()
==
false
)
if
(
!
GetItemRay
()
&&
lastDropItem
!=
null
)
{
if
(
lastDropItem
!=
null
)
{
lastDropItem
.
HighlightSwitch
(
false
);
lastDropItem
=
null
;
}
if
(
lastLifeStone
!=
null
)
{
lastLifeStone
.
HighlightSwitch
(
false
);
lastLifeStone
=
null
;
}
lastDropItem
.
HighlightSwitch
(
false
);
lastDropItem
=
null
;
}
if
(
lastDropItem
!=
null
&&
interaction
)
if
(
lastDropItem
!=
null
&&
interaction
)
{
lastDropItem
.
PushItem
();
}
if
(
lastLifeStone
!=
null
&&
interaction
)
{
lastLifeStone
.
ApplyLifeStone
();
lastDropItem
.
Apply
();
lastDropItem
=
null
;
}
}
...
...
@@ -249,69 +237,15 @@ public class PlayerController : MonoBehaviour
bool
GetItemRay
()
{
RaycastHit2D
hit1
=
Physics2D
.
Raycast
(
transform
.
position
+
new
Vector3
(
Player
.
X
/
2f
*
0f
,
0
,
0
),
Vector2
.
down
,
rayDistance
,
itemLayer
);
// RaycastHit2D hit2 = Physics2D.Raycast(transform.position - new Vector3(Player.X / 2f, 0, 0), Vector2.down, rayDistance, itemLayer);
Debug
.
DrawRay
(
transform
.
position
+
new
Vector3
(
Player
.
X
/
2f
*
0f
,
0
,
0
),
rayDistance
*
Vector2
.
down
,
Color
.
white
);
RaycastHit2D
hit1
=
Physics2D
.
Raycast
(
transform
.
position
,
Vector2
.
down
,
rayDistance
,
itemLayer
);
Debug
.
DrawRay
(
transform
.
position
,
rayDistance
*
Vector2
.
down
,
Color
.
white
);
if
(
hit1
.
collider
!=
null
)
{
DroppedItem
temp
=
hit1
.
collider
.
GetComponent
<
DroppedItem
>();
DroppedLifeStone
stoneTemp
;
if
(
temp
==
null
)
{
stoneTemp
=
hit1
.
collider
.
GetComponent
<
DroppedLifeStone
>();
if
(
lastLifeStone
!=
stoneTemp
)
{
if
(
lastLifeStone
!=
null
)
{
lastLifeStone
.
HighlightSwitch
(
false
);
}
lastLifeStone
=
stoneTemp
;
stoneTemp
.
HighlightSwitch
(
true
);
}
}
else
if
(
lastDropItem
!=
temp
)
{
if
(
lastDropItem
!=
null
)
{
lastDropItem
.
HighlightSwitch
(
false
);
}
lastDropItem
=
temp
;
temp
.
HighlightSwitch
(
true
);
}
IPlayerInteraction
temp
=
hit1
.
collider
.
GetComponent
<
IPlayerInteraction
>();
if
(
lastDropItem
!=
null
)
lastDropItem
.
HighlightSwitch
(
false
);
if
(
temp
!=
null
)
temp
.
HighlightSwitch
(
true
);
lastDropItem
=
temp
;
}
/*else if(hit2.collider != null)
{
DroppedItem temp = hit2.collider.GetComponent<DroppedItem>();
DroppedLifeStone stoneTemp;
if (temp == null)
{
stoneTemp = hit2.collider.GetComponent<DroppedLifeStone>();
if (lastLifeStone != stoneTemp)
{
if (lastLifeStone != null)
{
lastLifeStone.HighlightSwitch(false);
}
lastLifeStone = stoneTemp;
stoneTemp.HighlightSwitch(true);
}
}
else if (lastDropItem != temp)
{
if (lastDropItem != null)
{
lastDropItem.HighlightSwitch(false);
}
lastDropItem = temp;
temp.HighlightSwitch(true);
}
}*/
return
hit1
.
collider
!=
null
;
}
bool
IsInRope
()
// Is player in rope?
...
...
Assets/Scripts/Item/DroppedItem.cs
View file @
f015c152
...
...
@@ -2,7 +2,7 @@
using
System.Collections.Generic
;
using
UnityEngine
;
public
class
DroppedItem
:
MonoBehaviour
public
class
DroppedItem
:
MonoBehaviour
,
IPlayerInteraction
{
InventoryManager
inventoryManager
;
public
bool
itemAddon
;
//false: item true: addon
...
...
@@ -48,19 +48,16 @@ public class DroppedItem : MonoBehaviour
bc2D
.
size
=
sprt
.
size
;
transform
.
localScale
=
new
Vector3
((
addon
.
sizeInventory
.
x
*
itemSizeMultiplier
)
/
sprt
.
size
.
x
,
(
addon
.
sizeInventory
.
y
*
itemSizeMultiplier
)
/
sprt
.
size
.
y
,
1
);
}
public
bool
PushItem
()
public
void
Apply
()
{
if
(!
itemAddon
&&
inventoryManager
.
PushItem
(
item
))
{
Destroy
(
gameObject
);
return
true
;
}
else
if
(
itemAddon
&&
inventoryManager
.
PushAddon
(
addon
))
{
Destroy
(
gameObject
);
return
true
;
}
return
false
;
}
public
void
HighlightSwitch
(
bool
enabled
)
{
...
...
Assets/Scripts/Item/IPlayerInteraction.cs
0 → 100644
View file @
f015c152
using
System.Collections
;
using
System.Collections.Generic
;
using
UnityEngine
;
public
interface
IPlayerInteraction
{
void
HighlightSwitch
(
bool
enabled
);
void
Apply
();
}
Assets/Scripts/Item/IPlayerInteraction.cs.meta
0 → 100644
View file @
f015c152
fileFormatVersion: 2
guid: 090b1d5ff7c08e54dbc0c7b16af29576
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
Assets/Scripts/Item/InventoryManager.cs
View file @
f015c152
...
...
@@ -34,7 +34,7 @@ public class InventoryManager : MonoBehaviour {
addonPool
[
i
]
=
new
List
<
string
>();
}
itemPool
[
0
].
Add
(
"Bow"
);
//
itemPool[0].Add("Bow");
itemPool
[
0
].
Add
(
"Dagger"
);
itemPool
[
1
].
Add
(
"Baculus"
);
...
...
Assets/Scripts/UI/In-game UI/LifeStoneScript/DroppedLifeStone.cs
View file @
f015c152
...
...
@@ -2,7 +2,7 @@
using
System.Collections.Generic
;
using
UnityEngine
;
public
class
DroppedLifeStone
:
MonoBehaviour
public
class
DroppedLifeStone
:
MonoBehaviour
,
IPlayerInteraction
{
LifeStoneInfo
info
;
public
Sprite
[]
sprites
;
...
...
@@ -50,7 +50,7 @@ public class DroppedLifeStone : MonoBehaviour
bc2D
.
offset
=
new
Vector2
(
unitSize
*
inSize
.
x
/
2f
,
unitSize
*
inSize
.
y
/
2f
);
bc2D
.
size
=
new
Vector2
(
unitSize
*
inSize
.
x
,
unitSize
*
inSize
.
y
);
}
public
void
Apply
LifeStone
()
public
void
Apply
()
{
if
(
GameObject
.
Find
(
"LifeStoneUI"
).
GetComponent
<
LifeStoneManager
>().
PushLifeStone
(
info
))
Destroy
(
gameObject
);
...
...
Assets/Scripts/UI/In-game UI/LifeStoneScript/DroppedPotion.cs
0 → 100644
View file @
f015c152
using
System.Collections
;
using
System.Collections.Generic
;
using
UnityEngine
;
public
class
DroppedPotion
:
MonoBehaviour
,
IPlayerInteraction
{
public
GameObject
highlight
;
public
void
Apply
()
{
GameObject
.
Find
(
"LifeStoneUI"
).
GetComponent
<
LifeStoneManager
>().
ChangeFromNormal
(
LifeStoneType
.
Gold
,
3
);
Destroy
(
gameObject
);
}
public
void
HighlightSwitch
(
bool
enabled
)
{
highlight
.
SetActive
(
enabled
);
highlight
.
GetComponent
<
SpriteRenderer
>().
sortingOrder
=
-
1
+
(
enabled
?
2
:
0
);
GetComponent
<
SpriteRenderer
>().
sortingOrder
=
(
enabled
?
2
:
0
);
}
}
Assets/Scripts/UI/In-game UI/LifeStoneScript/DroppedPotion.cs.meta
0 → 100644
View file @
f015c152
fileFormatVersion: 2
guid: 36609b223803b6043b6f1b673d0c8665
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
Assets/Scripts/UI/In-game UI/LifeStoneScript/LifeStoneManager.cs
View file @
f015c152
...
...
@@ -35,6 +35,7 @@ public class LifeStoneManager : MonoBehaviour {
/// lifeStoneUnit Prefab
/// </summary>
public
GameObject
lifeUnitPrefab
;
public
GameObject
goldPotionPrefab
;
/// <summary>
/// strength of vibration when Lifestone falls
/// </summary>
...
...
@@ -83,6 +84,11 @@ public class LifeStoneManager : MonoBehaviour {
frameSuper
.
GetComponent
<
LifeStoneFrame
>().
AddRow
(
lifeStoneRowNum
);
}
public
void
InstantiatePotion
(
Vector3
pos
)
{
Instantiate
(
goldPotionPrefab
,
pos
,
Quaternion
.
identity
);
}
/// <summary>
/// Instantiate Dropped LifeStone
/// </summary>
...
...
Assets/Scripts/UI/In-game UI/LifeStoneScript/LifeStoneTest.cs
View file @
f015c152
...
...
@@ -40,4 +40,8 @@ public class LifeStoneTest : MonoBehaviour {
{
uii
.
ExpandRow
(
Convert
.
ToInt32
(
rowText
.
GetComponent
<
InputField
>().
text
));
}
public
void
goldPotion
()
{
uii
.
InstantiatePotion
(
GameObject
.
Find
(
"Player"
).
transform
.
position
);
}
}
Assets/Sprites/LifeStone/goldPotion.png
0 → 100644
View file @
f015c152
319 Bytes
Assets/Sprites/LifeStone/goldPotion.png.meta
0 → 100644
View file @
f015c152
fileFormatVersion: 2
guid: 634b66525497d9f4f987f4868a7107a0
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 6
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 0
aniso: -1
mipBias: -100
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 64
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 2
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- serializedVersion: 2
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: cd16122fb2377fd46a2681b0301a472b
vertices: []
indices:
edges: []
weights: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:
Assets/Sprites/LifeStone/goldPotion_border.png
0 → 100644
View file @
f015c152
249 Bytes
Assets/Sprites/LifeStone/goldPotion_border.png.meta
0 → 100644
View file @
f015c152
fileFormatVersion: 2
guid: 4ed132a41da0c71499cd98e8ca7ea94b
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 6
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 0
aniso: -1
mipBias: -100
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 64
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 2
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- serializedVersion: 2
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 2ca87748a1ea57a488c64838003eef30
vertices: []
indices:
edges: []
weights: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment