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
d66ad83a
Commit
d66ad83a
authored
Feb 27, 2019
by
18류지석
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
droppedlifestoneframe 제작. 감전봉 사용시 평타에 기절 붙는 문제 수정
parent
81b8b1e7
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
51 additions
and
17 deletions
+51
-17
LifeStoneManager.prefab
Assets/Prefabs/LifeStoneManager.prefab
+3
-1
LifeStoneUI.prefab
Assets/Prefabs/UI/In-Game UI/LifeStoneUI.prefab
+1
-1
DroppedLifeStoneFrame.prefab
...bs/UI/In-Game UI/LifeStoneUI/DroppedLifeStoneFrame.prefab
+5
-3
FrameUnitBody.prefab
...ts/Prefabs/UI/In-Game UI/LifeStoneUI/FrameUnitBody.prefab
+2
-2
FrameUnitBottom.prefab
.../Prefabs/UI/In-Game UI/LifeStoneUI/FrameUnitBottom.prefab
+2
-2
FrameUnitTop.prefab
Assets/Prefabs/UI/In-Game UI/LifeStoneUI/FrameUnitTop.prefab
+2
-2
AttackProperty.cs
Assets/Scripts/Characters/AttackProperty.cs
+8
-0
InventoryManager.cs
Assets/Scripts/Item/InventoryManager.cs
+4
-4
DroppedLifeStoneFrame.cs
...ts/UI/In-game UI/LifeStoneScript/DroppedLifeStoneFrame.cs
+14
-0
LifeStoneManager.cs
...Scripts/UI/In-game UI/LifeStoneScript/LifeStoneManager.cs
+10
-2
No files found.
Assets/Prefabs/LifeStoneManager.prefab
View file @
d66ad83a
...
...
@@ -34,7 +34,7 @@ Transform:
m_PrefabInternal
:
{
fileID
:
100100000
}
m_GameObject
:
{
fileID
:
1420923890547556
}
m_LocalRotation
:
{
x
:
0
,
y
:
0
,
z
:
0
,
w
:
1
}
m_LocalPosition
:
{
x
:
0
,
y
:
0
,
z
:
0
}
m_LocalPosition
:
{
x
:
-6.9766555
,
y
:
2.569394
,
z
:
0.0049343775
}
m_LocalScale
:
{
x
:
1
,
y
:
1
,
z
:
1
}
m_Children
:
[]
m_Father
:
{
fileID
:
0
}
...
...
@@ -66,6 +66,8 @@ MonoBehaviour:
type
:
2
}
goldPotionPrefab
:
{
fileID
:
1778675533210814
,
guid
:
57c0f65ad47e39943a69b5b0a6fa0e47
,
type
:
2
}
droppedFramePrefab
:
{
fileID
:
1356237453793910
,
guid
:
a142a989cdc2e0c4ba0aabbcde26010e
,
type
:
2
}
vibrationVariable
:
0.1
droppedLifeStonePrefab
:
{
fileID
:
1149595688849768
,
guid
:
8255a117a93935941b32b4aed9b299a0
,
type
:
2
}
...
...
Assets/Prefabs/UI/In-Game UI/LifeStoneUI.prefab
View file @
d66ad83a
...
...
@@ -132,7 +132,7 @@ CanvasGroup:
m_PrefabInternal
:
{
fileID
:
100100000
}
m_GameObject
:
{
fileID
:
1939101680453256
}
m_Enabled
:
1
m_Alpha
:
0.8
m_Alpha
:
1
m_Interactable
:
1
m_BlocksRaycasts
:
1
m_IgnoreParentGroups
:
0
Assets/Prefabs/UI/In-Game UI/LifeStoneUI/DroppedLifeStoneFrame.prefab
View file @
d66ad83a
...
...
@@ -56,7 +56,7 @@ Rigidbody2D:
m_Mass
:
1
m_LinearDrag
:
0
m_AngularDrag
:
0.05
m_GravityScale
:
1
m_GravityScale
:
3
m_Material
:
{
fileID
:
0
}
m_Interpolate
:
0
m_SleepingMode
:
1
...
...
@@ -101,5 +101,7 @@ MonoBehaviour:
price
:
0
priceTag
:
{
fileID
:
0
}
priceSign
:
{
fileID
:
0
}
frames
:
[]
borderSize
:
0
frames
:
-
{
fileID
:
1366103144126518
,
guid
:
830ffee34763ed741ab4a375a0dbac22
,
type
:
2
}
-
{
fileID
:
1690566668189580
,
guid
:
deaaed06a4e2692439983f8416ddd232
,
type
:
2
}
-
{
fileID
:
1976803328805560
,
guid
:
a7f047a9f533d4c448d09f13f288eb2f
,
type
:
2
}
Assets/Prefabs/UI/In-Game UI/LifeStoneUI/FrameUnitBody.prefab
View file @
d66ad83a
...
...
@@ -72,8 +72,8 @@ SpriteRenderer:
m_AutoUVMaxDistance
:
0.5
m_AutoUVMaxAngle
:
89
m_LightmapParameters
:
{
fileID
:
0
}
m_SortingLayerID
:
0
m_SortingLayer
:
0
m_SortingLayerID
:
2145601713
m_SortingLayer
:
11
m_SortingOrder
:
0
m_Sprite
:
{
fileID
:
21300002
,
guid
:
eff441d843b9c664e97a81fcb39d8410
,
type
:
3
}
m_Color
:
{
r
:
1
,
g
:
1
,
b
:
1
,
a
:
1
}
...
...
Assets/Prefabs/UI/In-Game UI/LifeStoneUI/FrameUnitBottom.prefab
View file @
d66ad83a
...
...
@@ -72,8 +72,8 @@ SpriteRenderer:
m_AutoUVMaxDistance
:
0.5
m_AutoUVMaxAngle
:
89
m_LightmapParameters
:
{
fileID
:
0
}
m_SortingLayerID
:
0
m_SortingLayer
:
0
m_SortingLayerID
:
2145601713
m_SortingLayer
:
11
m_SortingOrder
:
0
m_Sprite
:
{
fileID
:
21300004
,
guid
:
eff441d843b9c664e97a81fcb39d8410
,
type
:
3
}
m_Color
:
{
r
:
1
,
g
:
1
,
b
:
1
,
a
:
1
}
...
...
Assets/Prefabs/UI/In-Game UI/LifeStoneUI/FrameUnitTop.prefab
View file @
d66ad83a
...
...
@@ -72,8 +72,8 @@ SpriteRenderer:
m_AutoUVMaxDistance
:
0.5
m_AutoUVMaxAngle
:
89
m_LightmapParameters
:
{
fileID
:
0
}
m_SortingLayerID
:
0
m_SortingLayer
:
0
m_SortingLayerID
:
2145601713
m_SortingLayer
:
11
m_SortingOrder
:
0
m_Sprite
:
{
fileID
:
21300000
,
guid
:
eff441d843b9c664e97a81fcb39d8410
,
type
:
3
}
m_Color
:
{
r
:
1
,
g
:
1
,
b
:
1
,
a
:
1
}
...
...
Assets/Scripts/Characters/AttackProperty.cs
View file @
d66ad83a
...
...
@@ -31,6 +31,14 @@ public class AttackProperty : MonoBehaviour {
debuffTime
[
3
]
=
debuffTime3
;
debuffTime
[
4
]
=
debuffTime4
;
}
else
{
for
(
int
i
=
0
;
i
<
(
int
)
EnemyDebuffCase
.
END_POINTER
;
i
++)
{
debuffTime
[
i
]
=
0
;
}
}
}
private
void
Awake
()
...
...
Assets/Scripts/Item/InventoryManager.cs
View file @
d66ad83a
...
...
@@ -144,9 +144,9 @@ public class InventoryManager : Singleton<InventoryManager> {
{
return
AddonInstantiate
(
quality
,
pos
,
popoutStrength
);
}
else
if
(
quality
!=
ItemQuality
.
Study
)
else
if
(
quality
!=
ItemQuality
.
Masterpiece
)
{
return
ItemInstantiate
(
quality
-
1
,
pos
,
popoutStrength
);
return
ItemInstantiate
(
quality
+
1
,
pos
,
popoutStrength
);
}
return
null
;
}
...
...
@@ -215,9 +215,9 @@ public class InventoryManager : Singleton<InventoryManager> {
{
return
ItemInstantiate
(
quality
,
pos
,
popoutStrength
);
}
else
if
(
quality
!=
ItemQuality
.
Study
)
else
if
(
quality
!=
ItemQuality
.
Masterpiece
)
{
return
AddonInstantiate
(
quality
-
1
,
pos
,
popoutStrength
);
return
AddonInstantiate
(
quality
+
1
,
pos
,
popoutStrength
);
}
return
null
;
}
...
...
Assets/Scripts/UI/In-game UI/LifeStoneScript/DroppedLifeStoneFrame.cs
View file @
d66ad83a
...
...
@@ -9,17 +9,31 @@ public class DroppedLifeStoneFrame : DroppedObject, IPlayerInteraction
public
GameObject
[]
frames
;
Rigidbody2D
rb2D
;
BoxCollider2D
bc2D
;
GameObject
[]
obj
;
public
void
Init
(
int
rowNum
,
Vector3
pos
)
{
transform
.
position
=
pos
;
this
.
rowNum
=
rowNum
;
rb2D
=
GetComponent
<
Rigidbody2D
>();
bc2D
=
GetComponent
<
BoxCollider2D
>();
obj
=
new
GameObject
[
rowNum
+
2
];
obj
[
0
]
=
Instantiate
(
frames
[
0
],
transform
.
position
+
new
Vector3
(
0
,
frames
[
0
].
GetComponent
<
SpriteRenderer
>().
bounds
.
extents
.
y
,
0
)
,
Quaternion
.
identity
,
transform
);
for
(
int
i
=
0
;
i
<
rowNum
;
i
++)
{
obj
[
i
+
1
]
=
Instantiate
(
frames
[
1
],
transform
.
position
+
new
Vector3
(
0
,
frames
[
0
].
GetComponent
<
SpriteRenderer
>().
bounds
.
extents
.
y
*
2
+
frames
[
1
].
GetComponent
<
SpriteRenderer
>().
bounds
.
extents
.
y
*
(
i
*
2
+
1
),
0
),
Quaternion
.
identity
,
transform
);
}
obj
[
rowNum
+
1
]
=
Instantiate
(
frames
[
2
],
transform
.
position
+
new
Vector3
(
0
,
frames
[
0
].
GetComponent
<
SpriteRenderer
>().
bounds
.
extents
.
y
*
2
+
frames
[
1
].
GetComponent
<
SpriteRenderer
>().
bounds
.
extents
.
y
*
rowNum
*
2
+
frames
[
2
].
GetComponent
<
SpriteRenderer
>().
bounds
.
extents
.
y
,
0
),
Quaternion
.
identity
,
transform
);
bc2D
.
size
=
new
Vector2
(
frames
[
0
].
GetComponent
<
SpriteRenderer
>().
bounds
.
extents
.
y
*
2
,
obj
[
rowNum
+
1
].
transform
.
position
.
y
-
obj
[
0
].
transform
.
position
.
y
+
frames
[
0
].
GetComponent
<
SpriteRenderer
>().
bounds
.
extents
.
y
+
frames
[
2
].
GetComponent
<
SpriteRenderer
>().
bounds
.
extents
.
y
);
bc2D
.
offset
=
new
Vector2
(
0
,
bc2D
.
size
.
y
/
2f
);
}
public
void
Apply
()
{
LifeStoneManager
.
Instance
.
ExpandRow
(
rowNum
);
Destroy
(
gameObject
);
}
public
void
HighlightSwitch
(
bool
enabled
)
{
...
...
Assets/Scripts/UI/In-game UI/LifeStoneScript/LifeStoneManager.cs
View file @
d66ad83a
...
...
@@ -35,6 +35,7 @@ public class LifeStoneManager : Singleton<LifeStoneManager> {
/// </summary>
public
GameObject
lifeUnitPrefab
;
public
GameObject
goldPotionPrefab
;
public
GameObject
droppedFramePrefab
;
/// <summary>
/// strength of vibration when Lifestone falls
/// </summary>
...
...
@@ -70,13 +71,13 @@ public class LifeStoneManager : Singleton<LifeStoneManager> {
lifeStoneArray
=
new
int
[
50
,
3
];
lifeStoneUnit
=
new
GameObject
[
50
,
3
];
for
(
int
i
=
0
;
i
<
50
;
i
++)
for
(
int
j
=
0
;
j
<
3
;
j
++)
lifeStoneArray
[
i
,
j
]
=
0
;
PushLifeStone
(
CreateLifeStoneInfo
(
new
Vector2Int
(
3
,
6
),
0
,
0
));
PushLifeStone
(
new
LifeStoneInfo
(
new
Vector2Int
(
3
,
6
),
"AAAAAAAAAAAAAA A "
));
StartCoroutine
(
"TestEnumerator"
);
}
IEnumerator
TestEnumerator
()
{
yield
return
null
;
InstantiateFrame
(
GameManager
.
Instance
.
player
.
transform
.
position
,
3
,
1f
);
}
/// <summary>
...
...
@@ -88,6 +89,13 @@ public class LifeStoneManager : Singleton<LifeStoneManager> {
lifeStoneRowNum
+=
rowNum
;
frameSuper
.
GetComponent
<
LifeStoneFrame
>().
AddRow
(
lifeStoneRowNum
);
}
public
GameObject
InstantiateFrame
(
Vector3
pos
,
int
rowNum
,
float
popoutStrength
)
{
GameObject
tmpFrame
=
Instantiate
(
droppedFramePrefab
);
tmpFrame
.
GetComponent
<
DroppedLifeStoneFrame
>().
Init
(
rowNum
,
pos
);
PopoutGenerator
(
tmpFrame
,
popoutStrength
);
return
tmpFrame
;
}
public
GameObject
InstantiatePotion
(
Vector3
pos
,
float
popoutStrength
)
{
...
...
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