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
438734f7
Commit
438734f7
authored
Feb 23, 2019
by
18류지석
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
이제 피해 입힐 때 숫자 뜸. 여전히 있었던 인벤토리 버그 수정
parent
aa6e6da0
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
404 additions
and
11 deletions
+404
-11
EffectManager.prefab
Assets/Prefabs/EffectManager.prefab
+4
-0
NumberPrefab.prefab
Assets/Prefabs/UI/In-Game UI/NumberPrefab.prefab
+108
-0
NumberPrefab.prefab.meta
Assets/Prefabs/UI/In-Game UI/NumberPrefab.prefab.meta
+8
-0
NumberEffectCanvas.prefab
Assets/Prefabs/UI/NumberEffectCanvas.prefab
+106
-0
NumberEffectCanvas.prefab.meta
Assets/Prefabs/UI/NumberEffectCanvas.prefab.meta
+8
-0
AttackProperty.cs
Assets/Scripts/Characters/AttackProperty.cs
+3
-0
EffectManager.cs
Assets/Scripts/EffectManager.cs
+64
-8
GameManager.cs
Assets/Scripts/GameManager.cs
+1
-1
InventoryManager.cs
Assets/Scripts/Item/InventoryManager.cs
+0
-2
CustomOutline.cs
Assets/Scripts/UI/CustomOutline.cs
+91
-0
CustomOutline.cs.meta
Assets/Scripts/UI/CustomOutline.cs.meta
+11
-0
No files found.
Assets/Prefabs/EffectManager.prefab
View file @
438734f7
...
@@ -53,3 +53,7 @@ MonoBehaviour:
...
@@ -53,3 +53,7 @@ MonoBehaviour:
m_EditorClassIdentifier
:
m_EditorClassIdentifier
:
effectPrefab
:
{
fileID
:
1383143382242174
,
guid
:
157414a270281184c8a674facfeadfdc
,
effectPrefab
:
{
fileID
:
1383143382242174
,
guid
:
157414a270281184c8a674facfeadfdc
,
type
:
2
}
type
:
2
}
numberPrefab
:
{
fileID
:
1166884881890714
,
guid
:
b6f24b3e481cfd84bae3488e627b28be
,
type
:
2
}
numberCanvasPrefab
:
{
fileID
:
1312675998778534
,
guid
:
8729c9b5e4968d747a9e080c137fe850
,
type
:
2
}
Assets/Prefabs/UI/In-Game UI/NumberPrefab.prefab
0 → 100644
View file @
438734f7
%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
:
1166884881890714
}
m_IsPrefabAsset
:
1
---
!u!1
&1166884881890714
GameObject
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
100100000
}
serializedVersion
:
6
m_Component
:
-
component
:
{
fileID
:
224352627384017250
}
-
component
:
{
fileID
:
222056489737687522
}
-
component
:
{
fileID
:
114854991625735854
}
-
component
:
{
fileID
:
114762514912189812
}
m_Layer
:
5
m_Name
:
NumberPrefab
m_TagString
:
Untagged
m_Icon
:
{
fileID
:
0
}
m_NavMeshLayer
:
0
m_StaticEditorFlags
:
0
m_IsActive
:
1
---
!u!114
&114762514912189812
MonoBehaviour
:
m_ObjectHideFlags
:
1
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
100100000
}
m_GameObject
:
{
fileID
:
1166884881890714
}
m_Enabled
:
1
m_EditorHideFlags
:
0
m_Script
:
{
fileID
:
11500000
,
guid
:
5751eb454a8c4cf40b6dae2b7f6dbbfc
,
type
:
3
}
m_Name
:
m_EditorClassIdentifier
:
m_EffectColor
:
{
r
:
0
,
g
:
0
,
b
:
0
,
a
:
1
}
m_EffectDistance
:
{
x
:
1
,
y
:
-1
}
m_UseGraphicAlpha
:
1
m_size
:
1.05
glintEffect
:
0
glintVertex
:
0
glintWidth
:
1
glintColor
:
{
r
:
0
,
g
:
0
,
b
:
0
,
a
:
0
}
---
!u!114
&114854991625735854
MonoBehaviour
:
m_ObjectHideFlags
:
1
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
100100000
}
m_GameObject
:
{
fileID
:
1166884881890714
}
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
:
1
,
g
:
0
,
b
:
0
,
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
:
0
m_FontStyle
:
0
m_BestFit
:
1
m_MinSize
:
0
m_MaxSize
:
50
m_Alignment
:
4
m_AlignByGeometry
:
0
m_RichText
:
1
m_HorizontalOverflow
:
0
m_VerticalOverflow
:
0
m_LineSpacing
:
1
m_Text
:
1
---
!u!222
&222056489737687522
CanvasRenderer
:
m_ObjectHideFlags
:
1
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
100100000
}
m_GameObject
:
{
fileID
:
1166884881890714
}
m_CullTransparentMesh
:
0
---
!u!224
&224352627384017250
RectTransform
:
m_ObjectHideFlags
:
1
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
100100000
}
m_GameObject
:
{
fileID
:
1166884881890714
}
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
:
0
}
m_RootOrder
:
0
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
m_AnchorMin
:
{
x
:
0.5
,
y
:
0.5
}
m_AnchorMax
:
{
x
:
0.5
,
y
:
0.5
}
m_AnchoredPosition
:
{
x
:
-634.6
,
y
:
224.1
}
m_SizeDelta
:
{
x
:
106.8
,
y
:
53.29
}
m_Pivot
:
{
x
:
0.5
,
y
:
0.5
}
Assets/Prefabs/UI/In-Game UI/NumberPrefab.prefab.meta
0 → 100644
View file @
438734f7
fileFormatVersion: 2
guid: b6f24b3e481cfd84bae3488e627b28be
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 100100000
userData:
assetBundleName:
assetBundleVariant:
Assets/Prefabs/UI/NumberEffectCanvas.prefab
0 → 100644
View file @
438734f7
%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
:
1312675998778534
}
m_IsPrefabAsset
:
1
---
!u!1
&1312675998778534
GameObject
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
100100000
}
serializedVersion
:
6
m_Component
:
-
component
:
{
fileID
:
224271020964315388
}
-
component
:
{
fileID
:
223440579452505642
}
-
component
:
{
fileID
:
114203486297407260
}
-
component
:
{
fileID
:
114907569894364190
}
m_Layer
:
5
m_Name
:
NumberEffectCanvas
m_TagString
:
Untagged
m_Icon
:
{
fileID
:
0
}
m_NavMeshLayer
:
0
m_StaticEditorFlags
:
0
m_IsActive
:
1
---
!u!114
&114203486297407260
MonoBehaviour
:
m_ObjectHideFlags
:
1
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
100100000
}
m_GameObject
:
{
fileID
:
1312675998778534
}
m_Enabled
:
1
m_EditorHideFlags
:
0
m_Script
:
{
fileID
:
1980459831
,
guid
:
f70555f144d8491a825f0804e09c671c
,
type
:
3
}
m_Name
:
m_EditorClassIdentifier
:
m_UiScaleMode
:
0
m_ReferencePixelsPerUnit
:
100
m_ScaleFactor
:
1
m_ReferenceResolution
:
{
x
:
800
,
y
:
600
}
m_ScreenMatchMode
:
0
m_MatchWidthOrHeight
:
0
m_PhysicalUnit
:
3
m_FallbackScreenDPI
:
96
m_DefaultSpriteDPI
:
96
m_DynamicPixelsPerUnit
:
25
---
!u!114
&114907569894364190
MonoBehaviour
:
m_ObjectHideFlags
:
1
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
100100000
}
m_GameObject
:
{
fileID
:
1312675998778534
}
m_Enabled
:
1
m_EditorHideFlags
:
0
m_Script
:
{
fileID
:
1301386320
,
guid
:
f70555f144d8491a825f0804e09c671c
,
type
:
3
}
m_Name
:
m_EditorClassIdentifier
:
m_IgnoreReversedGraphics
:
1
m_BlockingObjects
:
0
m_BlockingMask
:
serializedVersion
:
2
m_Bits
:
4294967295
---
!u!223
&223440579452505642
Canvas
:
m_ObjectHideFlags
:
1
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
100100000
}
m_GameObject
:
{
fileID
:
1312675998778534
}
m_Enabled
:
1
serializedVersion
:
3
m_RenderMode
:
2
m_Camera
:
{
fileID
:
0
}
m_PlaneDistance
:
100
m_PixelPerfect
:
0
m_ReceivesEvents
:
1
m_OverrideSorting
:
0
m_OverridePixelPerfect
:
0
m_SortingBucketNormalizedSize
:
0
m_AdditionalShaderChannelsFlag
:
0
m_SortingLayerID
:
0
m_SortingOrder
:
0
m_TargetDisplay
:
0
---
!u!224
&224271020964315388
RectTransform
:
m_ObjectHideFlags
:
1
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
100100000
}
m_GameObject
:
{
fileID
:
1312675998778534
}
m_LocalRotation
:
{
x
:
0
,
y
:
0
,
z
:
0
,
w
:
1
}
m_LocalPosition
:
{
x
:
0
,
y
:
0
,
z
:
0
}
m_LocalScale
:
{
x
:
0.01
,
y
:
0.01
,
z
:
0.01
}
m_Children
:
[]
m_Father
:
{
fileID
:
0
}
m_RootOrder
:
0
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
m_AnchorMin
:
{
x
:
0
,
y
:
0
}
m_AnchorMax
:
{
x
:
0
,
y
:
0
}
m_AnchoredPosition
:
{
x
:
0
,
y
:
0
}
m_SizeDelta
:
{
x
:
0
,
y
:
0
}
m_Pivot
:
{
x
:
0.5
,
y
:
0.5
}
Assets/Prefabs/UI/NumberEffectCanvas.prefab.meta
0 → 100644
View file @
438734f7
fileFormatVersion: 2
guid: 8729c9b5e4968d747a9e080c137fe850
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 100100000
userData:
assetBundleName:
assetBundleVariant:
Assets/Scripts/Characters/AttackProperty.cs
View file @
438734f7
...
@@ -52,7 +52,10 @@ public class AttackProperty : MonoBehaviour {
...
@@ -52,7 +52,10 @@ public class AttackProperty : MonoBehaviour {
tmpBounds
=
col
.
bounds
;
tmpBounds
=
col
.
bounds
;
if
(!
tmpBounds
.
Equals
(
new
Bounds
()))
if
(!
tmpBounds
.
Equals
(
new
Bounds
()))
{
effectManager
.
StartEffect
(
0
,
tmpBounds
,
collision
.
bounds
);
effectManager
.
StartEffect
(
0
,
tmpBounds
,
collision
.
bounds
);
effectManager
.
StartNumber
(
attackCombo
[
attackCombo
.
Length
-
1
]
-
'A'
,
tmpBounds
,
collision
.
bounds
,
curAttack
.
damage
);
}
}
}
if
(
projectileType
==
1
&&
(
vanishLayer
==
(
vanishLayer
|
1
<<
collision
.
gameObject
.
layer
)))
if
(
projectileType
==
1
&&
(
vanishLayer
==
(
vanishLayer
|
1
<<
collision
.
gameObject
.
layer
)))
...
...
Assets/Scripts/EffectManager.cs
View file @
438734f7
using
System.Collections
;
using
System.Collections
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
UnityEngine
;
using
UnityEngine
;
using
UnityEngine.UI
;
public
class
EffectManager
:
Singleton
<
EffectManager
>
{
public
class
EffectManager
:
Singleton
<
EffectManager
>
{
public
GameObject
effectPrefab
;
public
GameObject
effectPrefab
;
public
GameObject
numberPrefab
;
public
GameObject
numberCanvasPrefab
;
GameObject
[]
effectArray
;
GameObject
[]
effectArray
;
GameObject
[]
numberArray
;
GameObject
numberCanvas
;
protected
EffectManager
()
{
}
protected
EffectManager
()
{
}
private
void
Awake
()
private
void
Awake
()
{
{
numberCanvas
=
Instantiate
(
numberCanvasPrefab
);
effectArray
=
new
GameObject
[
20
];
effectArray
=
new
GameObject
[
20
];
for
(
int
i
=
0
;
i
<
effectArray
.
Length
;
i
++)
for
(
int
i
=
0
;
i
<
effectArray
.
Length
;
i
++)
{
{
effectArray
[
i
]
=
Instantiate
(
effectPrefab
,
transform
);
effectArray
[
i
]
=
Instantiate
(
effectPrefab
,
transform
);
effectArray
[
i
].
SetActive
(
false
);
effectArray
[
i
].
SetActive
(
false
);
}
}
numberArray
=
new
GameObject
[
30
];
for
(
int
i
=
0
;
i
<
numberArray
.
Length
;
i
++)
{
numberArray
[
i
]
=
Instantiate
(
numberPrefab
,
numberCanvas
.
transform
);
numberArray
[
i
].
SetActive
(
false
);
}
}
}
public
bool
StartEffect
(
int
type
,
Bounds
bound1
,
Bounds
bound2
)
public
bool
StartEffect
(
int
type
,
Bounds
bound1
,
Bounds
bound2
)
{
{
for
(
int
i
=
0
;
i
<
effectArray
.
Length
;
i
++
)
for
each
(
GameObject
obj
in
effectArray
)
{
{
if
(!
effectArray
[
i
]
.
activeSelf
)
if
(!
obj
.
activeSelf
)
{
{
effectArray
[
i
]
.
transform
.
position
=
GenerateRandomPosition
(
bound1
,
bound2
);
obj
.
transform
.
position
=
GenerateRandomPosition
(
bound1
,
bound2
);
effectArray
[
i
]
.
SetActive
(
true
);
obj
.
SetActive
(
true
);
effectArray
[
i
]
.
GetComponent
<
Animator
>().
SetTrigger
(
"start"
);
obj
.
GetComponent
<
Animator
>().
SetTrigger
(
"start"
);
return
true
;
return
true
;
}
}
}
}
return
false
;
return
false
;
}
}
/// <summary>
/// generate number effect
/// </summary>
/// <param name="type">0: A, 1: B, 2: C, 3: PlayerHit</param>
/// <param name="bound1"></param>
/// <param name="bound2"></param>
/// <returns></returns>
public
bool
StartNumber
(
int
type
,
Bounds
bound1
,
Bounds
bound2
,
float
damage
)
{
Color
[]
typeColor
=
new
Color
[
4
]
{
new
Color
(
1
,
0
,
0
),
new
Color
(
0
,
0
,
1
),
new
Color
(
0
,
1
,
0
),
new
Color
(
1
,
0
,
1
)};
foreach
(
GameObject
obj
in
numberArray
)
{
if
(!
obj
.
activeSelf
)
{
obj
.
GetComponent
<
Text
>().
text
=
((
int
)
Mathf
.
Round
(
damage
)).
ToString
();
obj
.
GetComponent
<
Text
>().
color
=
typeColor
[
type
];
obj
.
transform
.
position
=
GenerateRandomPosition
(
bound1
,
bound2
);
obj
.
SetActive
(
true
);
StartCoroutine
(
NumberFadeOut
(
obj
));
return
true
;
}
}
return
false
;
}
IEnumerator
NumberFadeOut
(
GameObject
obj
)
{
float
popAngle
=
Random
.
Range
(
45f
,
135f
)
*
Mathf
.
Deg2Rad
;
float
velocity
=
0.8f
;
float
accel
=
-
0.4f
;
Vector3
direction
=
new
Vector3
(
Mathf
.
Cos
(
popAngle
),
Mathf
.
Sin
(
popAngle
),
0
);
for
(
float
timer
=
0f
;
timer
<
0.5f
;
timer
+=
Time
.
deltaTime
)
{
obj
.
transform
.
Translate
(
direction
*
velocity
*
Time
.
deltaTime
);
velocity
+=
accel
*
Time
.
deltaTime
;
obj
.
GetComponent
<
Text
>().
color
-=
new
Color
(
0
,
0
,
0
,
2f
*
Time
.
deltaTime
);
yield
return
null
;
}
obj
.
SetActive
(
false
);
}
Vector3
GenerateRandomPosition
(
Bounds
bound1
,
Bounds
bound2
)
Vector3
GenerateRandomPosition
(
Bounds
bound1
,
Bounds
bound2
)
{
{
float
[]
x
=
new
float
[
4
]
{
bound1
.
center
.
x
-
bound1
.
extents
.
x
,
bound1
.
center
.
x
+
bound1
.
extents
.
x
,
bound2
.
center
.
x
-
bound2
.
extents
.
x
,
bound2
.
center
.
x
+
bound2
.
extents
.
x
};
float
[]
x
=
new
float
[
4
]
{
bound1
.
center
.
x
-
bound1
.
extents
.
x
,
bound1
.
center
.
x
+
bound1
.
extents
.
x
,
bound2
.
center
.
x
-
bound2
.
extents
.
x
,
bound2
.
center
.
x
+
bound2
.
extents
.
x
};
...
...
Assets/Scripts/GameManager.cs
View file @
438734f7
...
@@ -85,12 +85,12 @@ public class GameManager : Singleton<GameManager> {
...
@@ -85,12 +85,12 @@ public class GameManager : Singleton<GameManager> {
if
(
gameState
==
GameState
.
Ingame
)
if
(
gameState
==
GameState
.
Ingame
)
{
{
inventoryCanvas
.
gameObject
.
SetActive
(
true
);
inventoryCanvas
.
gameObject
.
SetActive
(
true
);
InventoryManager
.
Instance
.
SetOnPosition
();
gameState
=
GameState
.
Inventory
;
gameState
=
GameState
.
Inventory
;
}
}
else
if
(
gameState
==
GameState
.
Inventory
)
else
if
(
gameState
==
GameState
.
Inventory
)
{
{
inventoryCanvas
.
gameObject
.
SetActive
(
false
);
inventoryCanvas
.
gameObject
.
SetActive
(
false
);
InventoryManager
.
Instance
.
SetOnPosition
();
gameState
=
GameState
.
Ingame
;
gameState
=
GameState
.
Ingame
;
}
}
}
}
...
...
Assets/Scripts/Item/InventoryManager.cs
View file @
438734f7
...
@@ -133,7 +133,6 @@ public class InventoryManager : Singleton<InventoryManager> {
...
@@ -133,7 +133,6 @@ public class InventoryManager : Singleton<InventoryManager> {
if
(
itemPool
[(
int
)
quality
].
Count
>
0
)
if
(
itemPool
[(
int
)
quality
].
Count
>
0
)
{
{
ItemInstantiate
(
itemPool
[(
int
)
quality
][
0
],
pos
,
popoutStrength
);
ItemInstantiate
(
itemPool
[(
int
)
quality
][
0
],
pos
,
popoutStrength
);
itemPool
[(
int
)
quality
].
RemoveAt
(
0
);
}
}
}
}
/// <summary>
/// <summary>
...
@@ -176,7 +175,6 @@ public class InventoryManager : Singleton<InventoryManager> {
...
@@ -176,7 +175,6 @@ public class InventoryManager : Singleton<InventoryManager> {
if
(
addonPool
[(
int
)
quality
].
Count
>
0
)
if
(
addonPool
[(
int
)
quality
].
Count
>
0
)
{
{
AddonInstantiate
(
addonPool
[(
int
)
quality
][
0
],
pos
,
popoutStrength
);
AddonInstantiate
(
addonPool
[(
int
)
quality
][
0
],
pos
,
popoutStrength
);
addonPool
[(
int
)
quality
].
RemoveAt
(
0
);
}
}
}
}
/// <summary>
/// <summary>
...
...
Assets/Scripts/UI/CustomOutline.cs
0 → 100644
View file @
438734f7
using
System.Collections.Generic
;
using
UnityEngine
;
namespace
UnityEngine.UI
{
public
class
CustomOutline
:
Shadow
{
[
Range
(
0
,
15
)]
public
float
m_size
=
3.0f
;
public
bool
glintEffect
;
[
RangeAttribute
(
0
,
5
)]
public
int
glintVertex
=
0
;
[
RangeAttribute
(
0
,
3
)]
public
int
glintWidth
=
0
;
public
Color
glintColor
;
public
override
void
ModifyMesh
(
VertexHelper
vh
)
{
if
(!
IsActive
())
return
;
var
verts
=
new
List
<
UIVertex
>();
vh
.
GetUIVertexStream
(
verts
);
var
neededCpacity
=
verts
.
Count
*
5
;
if
(
verts
.
Capacity
<
neededCpacity
)
verts
.
Capacity
=
neededCpacity
;
if
(
glintEffect
)
{
for
(
int
i
=
0
;
i
<
verts
.
Count
;
i
++)
{
UIVertex
item
=
verts
[
i
];
for
(
int
j
=
-
glintWidth
;
j
<=
glintWidth
;
j
++)
{
if
(
i
%
6
==
Mathf
.
Repeat
(
glintVertex
+
j
,
6
))
item
.
color
=
glintColor
;
}
verts
[
i
]
=
item
;
}
}
Vector2
m_effectDistance
=
new
Vector2
(
m_size
,
m_size
);
var
start
=
0
;
var
end
=
verts
.
Count
;
ApplyShadowZeroAlloc
(
verts
,
effectColor
,
start
,
verts
.
Count
,
m_effectDistance
.
x
,
m_effectDistance
.
y
);
start
=
end
;
end
=
verts
.
Count
;
ApplyShadowZeroAlloc
(
verts
,
effectColor
,
start
,
verts
.
Count
,
m_effectDistance
.
x
,
-
m_effectDistance
.
y
);
start
=
end
;
end
=
verts
.
Count
;
ApplyShadowZeroAlloc
(
verts
,
effectColor
,
start
,
verts
.
Count
,
-
m_effectDistance
.
x
,
m_effectDistance
.
y
);
start
=
end
;
end
=
verts
.
Count
;
ApplyShadowZeroAlloc
(
verts
,
effectColor
,
start
,
verts
.
Count
,
-
m_effectDistance
.
x
,
-
m_effectDistance
.
y
);
//////////////////////////////
start
=
end
;
end
=
verts
.
Count
;
ApplyShadowZeroAlloc
(
verts
,
effectColor
,
start
,
verts
.
Count
,
0
,
m_effectDistance
.
y
*
1.5f
);
start
=
end
;
end
=
verts
.
Count
;
ApplyShadowZeroAlloc
(
verts
,
effectColor
,
start
,
verts
.
Count
,
m_effectDistance
.
x
*
1.5f
,
0
);
start
=
end
;
end
=
verts
.
Count
;
ApplyShadowZeroAlloc
(
verts
,
effectColor
,
start
,
verts
.
Count
,
-
m_effectDistance
.
x
*
1.5f
,
0
);
start
=
end
;
end
=
verts
.
Count
;
ApplyShadowZeroAlloc
(
verts
,
effectColor
,
start
,
verts
.
Count
,
0
,
-
m_effectDistance
.
y
*
1.5f
);
vh
.
Clear
();
vh
.
AddUIVertexTriangleStream
(
verts
);
}
}
}
\ No newline at end of file
Assets/Scripts/UI/CustomOutline.cs.meta
0 → 100644
View file @
438734f7
fileFormatVersion: 2
guid: 5751eb454a8c4cf40b6dae2b7f6dbbfc
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
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