Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
3
3D Fruit
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wanqing
3D Fruit
Commits
6d7d15e9
Commit
6d7d15e9
authored
Apr 22, 2021
by
wanqing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
画线实现优化
parent
1db2cb89
Changes
18
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
1172 additions
and
85 deletions
+1172
-85
DemoScenes.unity
3D Fruit/Assets/#A1_Scenes/DemoScenes.unity
+1
-0
FifthLevelTrigger.cs
...it/Assets/#A2_Scripts/Battle/Trigger/FifthLevelTrigger.cs
+206
-43
BattleUI.cs
3D Fruit/Assets/#A2_Scripts/Battle/UI/BattleUI.cs
+60
-1
LineUI.cs
3D Fruit/Assets/#A2_Scripts/Battle/UI/LineUI.cs
+37
-0
LineUI.cs.meta
3D Fruit/Assets/#A2_Scripts/Battle/UI/LineUI.cs.meta
+11
-0
FruitView.cs
3D Fruit/Assets/#A2_Scripts/Battle/View/FruitView.cs
+94
-11
GlassView.cs
3D Fruit/Assets/#A2_Scripts/Battle/View/GlassView.cs
+4
-1
BattleUI.prefab
3D Fruit/Assets/#A3_Prefabs/BattleUI.prefab
+291
-13
ORANGE-YELLOW 7.mat
3D Fruit/Assets/#C3_Materials/ORANGE-YELLOW 7.mat
+1
-1
brush.mat
3D Fruit/Assets/#C3_Materials/brush.mat
+77
-0
brush.mat.meta
3D Fruit/Assets/#C3_Materials/brush.mat.meta
+8
-0
LiquidBottle 2.mat
3D Fruit/Assets/#C3_Materials/game/LiquidBottle 2.mat
+1
-1
LiquidBottle 3.mat
3D Fruit/Assets/#C3_Materials/game/LiquidBottle 3.mat
+1
-1
brush.shader
3D Fruit/Assets/#D2_Shaders/brush.shader
+63
-0
brush.shader.meta
3D Fruit/Assets/#D2_Shaders/brush.shader.meta
+9
-0
Level0.prefab
3D Fruit/Assets/Res/Levels/Level0.prefab
+4
-2
Level1.prefab
3D Fruit/Assets/Res/Levels/Level1.prefab
+4
-2
Level2.prefab
3D Fruit/Assets/Res/Levels/Level2.prefab
+300
-9
No files found.
3D Fruit/Assets/#A1_Scenes/DemoScenes.unity
View file @
6d7d15e9
...
...
@@ -167,6 +167,7 @@ MonoBehaviour:
levelPrefs
:
-
{
fileID
:
8692181047053733938
,
guid
:
90ed022fa9d48a64f910aad15b7faa2d
,
type
:
3
}
-
{
fileID
:
8692181047053733938
,
guid
:
f7454de7619e58043bd3aad03242010a
,
type
:
3
}
-
{
fileID
:
9081069388829900105
,
guid
:
50002a8d201ddd64bb5b240aa652c3fa
,
type
:
3
}
---
!u!1
&543166196
GameObject
:
m_ObjectHideFlags
:
0
...
...
3D Fruit/Assets/#A2_Scripts/Battle/Trigger/FifthLevelTrigger.cs
View file @
6d7d15e9
This diff is collapsed.
Click to expand it.
3D Fruit/Assets/#A2_Scripts/Battle/UI/BattleUI.cs
View file @
6d7d15e9
...
...
@@ -43,6 +43,7 @@ public class BattleUI : MonoBehaviour
public
GameObject
m_symbolObj
;
//十字架图标
public
GameObject
m_takeBtnObj
;
//take按钮
public
Text
m_moveNumText
;
//移动次数
public
LineUI
m_lineUI
;
public
Action
onStartBtn
;
public
Action
onPosUpBtn
;
public
Action
onPosDownBtn
;
...
...
@@ -57,6 +58,10 @@ public class BattleUI : MonoBehaviour
private
int
m_bombIndex
=
0
;
//炸弹计数
private
bool
m_bResult
=
false
;
//结果
private
bool
m_bIsDebug
=
false
;
//是否开启调试模式
//线的处理
private
Stack
<
GameObject
>
m_objStack
=
new
Stack
<
GameObject
>();
private
List
<
GameObject
>
m_objList
=
new
List
<
GameObject
>();
public
bool
isDebug
=>
m_bIsDebug
;
private
Color
m_blueBgColor
=
new
Color
(
135.0f
/
255.0f
,
133.0f
/
255.0f
,
247.0f
/
255.0f
,
1.0f
);
private
Color
m_greenBgColor
=
new
Color
(
133.0f
/
255.0f
,
247.0f
/
255.0f
,
146.0f
/
255.0f
,
1.0f
);
...
...
@@ -293,7 +298,8 @@ public class BattleUI : MonoBehaviour
varPos
.
y
=
-
400.0f
;
m_fruitSecondLineObj
.
SetActive
(
false
);
}
else
if
(
BattleCtrl
.
instance
.
levelManager
.
CurLevelIndex
==
LevelEnum
.
levelTwoIndex
)
else
if
(
BattleCtrl
.
instance
.
levelManager
.
CurLevelIndex
==
LevelEnum
.
levelTwoIndex
||
BattleCtrl
.
instance
.
levelManager
.
CurLevelIndex
==
LevelEnum
.
levelThreeIndex
)
{
varPos
.
y
=
-
286.0f
;
m_fruitSecondLineObj
.
SetActive
(
true
);
...
...
@@ -435,4 +441,57 @@ public class BattleUI : MonoBehaviour
{
m_bResult
=
value
;
}
//------------------------线处理--------------------------------------
GameObject
GetPoolObject
()
{
GameObject
varGo
=
null
;
if
(
m_objStack
.
Count
>
0
)
{
varGo
=
m_objStack
.
Pop
();
}
else
{
varGo
=
GameObject
.
Instantiate
(
m_lineUI
.
gameObject
);
m_objList
.
Add
(
varGo
);
}
varGo
.
SetActive
(
true
);
varGo
.
transform
.
SetParent
(
m_battleObj
.
transform
,
false
);
return
varGo
;
}
void
ReturnObjectToPool
(
GameObject
go
)
{
if
(
go
)
{
m_objStack
.
Push
(
go
);
go
.
SetActive
(
false
);
}
}
//设置线
public
void
DrawLine
(
Vector3
startP
,
Vector3
finalP
)
{
GameObject
varObj
=
GetPoolObject
();
LineUI
varLine
=
varObj
.
GetComponent
<
LineUI
>();
if
(
varLine
)
{
varLine
.
DrawLine
(
startP
,
finalP
);
}
}
//回收
public
void
RecycleLine
()
{
for
(
int
i
=
0
;
i
<
m_objList
.
Count
;
i
++)
{
ReturnObjectToPool
(
m_objList
[
i
]);
}
}
private
void
OnDestroy
()
{
for
(
int
i
=
0
;
i
<
m_objList
.
Count
;
i
++)
{
GameObject
.
Destroy
(
m_objList
[
i
]);
}
m_objList
.
Clear
();
m_objList
=
null
;
m_objStack
=
null
;
}
}
3D Fruit/Assets/#A2_Scripts/Battle/UI/LineUI.cs
0 → 100644
View file @
6d7d15e9
using
System.Collections
;
using
System.Collections.Generic
;
using
UnityEngine
;
using
UnityEngine.UI
;
public
class
LineUI
:
MonoBehaviour
{
public
Image
m_imageLine
;
//线
public
Image
m_imageLineStart
;
public
Image
m_imageLineFinal
;
public
void
DrawLine
(
Vector3
startP
,
Vector3
finalP
)
{
Vector3
varStart
=
startP
;
varStart
.
x
=
(
varStart
.
x
-
Screen
.
width
/
2f
)
/
(
Screen
.
height
/
GlobalConfig
.
NormalHeight
);
varStart
.
y
=
(
varStart
.
y
-
Screen
.
height
/
2f
)
/
(
Screen
.
height
/
GlobalConfig
.
NormalHeight
);
varStart
.
z
=
0
;
Vector3
varFinal
=
finalP
;
varFinal
.
x
=
(
varFinal
.
x
-
Screen
.
width
/
2f
)
/
(
Screen
.
height
/
GlobalConfig
.
NormalHeight
);
varFinal
.
y
=
(
varFinal
.
y
-
Screen
.
height
/
2f
)
/
(
Screen
.
height
/
GlobalConfig
.
NormalHeight
);
varFinal
.
z
=
0
;
Vector3
rightPosition
=
(
varStart
+
varFinal
)
/
2
;
Vector3
rightRotation
=
varFinal
-
varStart
;
float
HalfLength
=
Vector3
.
Distance
(
varStart
,
varFinal
);
//float LThickness = 0.1f;//线的粗细
//创建圆柱体
//GameObject MyLine = PoolManager.Instance.GetObjectFromPool(CacheManager.Instance.lineObj);
m_imageLine
.
transform
.
localPosition
=
rightPosition
;
m_imageLine
.
transform
.
localRotation
=
Quaternion
.
FromToRotation
(
Vector3
.
up
,
rightRotation
);
Vector2
varSize
=
m_imageLine
.
rectTransform
.
sizeDelta
;
varSize
.
x
=
250.0f
;
varSize
.
y
=
HalfLength
;
m_imageLine
.
rectTransform
.
sizeDelta
=
varSize
;
m_imageLineStart
.
transform
.
localPosition
=
varStart
;
m_imageLineFinal
.
transform
.
localPosition
=
varFinal
;
}
}
3D Fruit/Assets/#A2_Scripts/Battle/UI/LineUI.cs.meta
0 → 100644
View file @
6d7d15e9
fileFormatVersion: 2
guid: ceee747a2c9327449991aeb01fa5a363
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
3D Fruit/Assets/#A2_Scripts/Battle/View/FruitView.cs
View file @
6d7d15e9
...
...
@@ -7,6 +7,7 @@ public class FruitView : MonoBehaviour
public
GlassView
m_glassView
;
public
Transform
m_fruitParent
;
public
HighlightingEffect
m_highLightEffect
;
public
Transform
m_cutTrans
;
//旋转叶片
private
List
<
FruitItemView
>
m_selectLst
=
new
List
<
FruitItemView
>();
//选中的水果
private
int
m_lineIndex
=
0
;
//线段计数
private
FruitItemView
m_curSelectItem
;
//当前选中的
...
...
@@ -25,7 +26,8 @@ public class FruitView : MonoBehaviour
{
GlobalConfig
.
LoadFirstLevelDefaultFruit
(
m_fruitParent
);
}
else
if
(
BattleCtrl
.
instance
.
levelManager
.
CurLevelIndex
==
LevelEnum
.
levelTwoIndex
)
else
if
(
BattleCtrl
.
instance
.
levelManager
.
CurLevelIndex
==
LevelEnum
.
levelTwoIndex
||
BattleCtrl
.
instance
.
levelManager
.
CurLevelIndex
==
LevelEnum
.
levelThreeIndex
)
{
GlobalConfig
.
LoadSecondLevelDefaultFruit
(
m_fruitParent
);
}
...
...
@@ -70,11 +72,12 @@ public class FruitView : MonoBehaviour
m_bIsTouchUp
=
true
;
m_lastSelectItem
=
null
;
//线段回收
for
(
int
i
=
0
;
i
<
m_lineLst
.
Count
;
i
++)
{
PoolManager
.
Instance
.
ReturnObjectToPool
(
m_lineLst
[
i
]);
}
m_lineLst
.
Clear
();
//for (int i = 0; i < m_lineLst.Count; i++)
//{
// PoolManager.Instance.ReturnObjectToPool(m_lineLst[i]);
//}
//m_lineLst.Clear();
BattleCtrl
.
instance
.
battleUI
.
RecycleLine
();
//高亮重置
for
(
int
i
=
0
;
i
<
m_selectLst
.
Count
;
i
++)
{
...
...
@@ -231,7 +234,8 @@ public class FruitView : MonoBehaviour
{
GlobalConfig
.
LoadFirstRandomFruit
(
m_SelectNum
,
m_fruitParent
);
}
else
if
(
BattleCtrl
.
instance
.
levelManager
.
CurLevelIndex
==
LevelEnum
.
levelTwoIndex
)
else
if
(
BattleCtrl
.
instance
.
levelManager
.
CurLevelIndex
==
LevelEnum
.
levelTwoIndex
||
BattleCtrl
.
instance
.
levelManager
.
CurLevelIndex
==
LevelEnum
.
levelThreeIndex
)
{
GlobalConfig
.
LoadSecondRandomFruit
(
m_SelectNum
,
m_fruitParent
);
}
...
...
@@ -307,6 +311,7 @@ public class FruitView : MonoBehaviour
// Update is called once per frame
void
Update
()
{
UpdateCutRotate
();
if
(!
BattleCtrl
.
instance
.
isStartBattle
||
BattleCtrl
.
instance
.
isEndBattle
||
m_moveNum
==
0
)
{
return
;
...
...
@@ -317,6 +322,14 @@ public class FruitView : MonoBehaviour
}
UpdateSelectSize
();
}
//旋转叶片
void
UpdateCutRotate
()
{
if
(
m_cutTrans
)
{
m_cutTrans
.
Rotate
(
Vector3
.
up
*
10.0f
,
Space
.
World
);
}
}
void
Clicked
()
{
Ray
ray
=
Camera
.
main
.
ScreenPointToRay
(
Input
.
mousePosition
);
...
...
@@ -346,7 +359,11 @@ public class FruitView : MonoBehaviour
}
if
(
m_lastSelectItem
)
{
DrawLS
(
m_lastSelectItem
.
transform
,
m_curSelectItem
.
transform
);
Vector3
varVec3Last
=
Camera
.
main
.
WorldToScreenPoint
(
m_lastSelectItem
.
transform
.
position
);
Vector3
varVec3Cur
=
Camera
.
main
.
WorldToScreenPoint
(
m_curSelectItem
.
transform
.
position
);
BattleCtrl
.
instance
.
battleUI
.
DrawLine
(
varVec3Last
,
varVec3Cur
);
//DrawLS(m_lastSelectItem.transform, m_curSelectItem.transform);
}
m_selectLst
.
Add
(
varHitTrans
);
}
...
...
@@ -383,9 +400,9 @@ public class FruitView : MonoBehaviour
void
DrawLS
(
Transform
startP
,
Transform
finalP
)
{
Vector3
varStart
=
startP
.
position
;
varStart
.
z
=
0
;
//
varStart.z = 0;
Vector3
varFinal
=
finalP
.
position
;
varFinal
.
z
=
0
;
//
varFinal.z = 0;
Vector3
rightPosition
=
(
varStart
+
varFinal
)
/
2
;
Vector3
rightRotation
=
varFinal
-
varStart
;
float
HalfLength
=
Vector3
.
Distance
(
varStart
,
varFinal
)
/
2
;
...
...
@@ -393,7 +410,7 @@ public class FruitView : MonoBehaviour
//创建圆柱体
GameObject
MyLine
=
PoolManager
.
Instance
.
GetObjectFromPool
(
CacheManager
.
Instance
.
lineObj
);
rightPosition
.
z
=
-
0.5
f
;
rightPosition
.
z
=
-
2.0
f
;
MyLine
.
transform
.
position
=
rightPosition
;
MyLine
.
transform
.
rotation
=
Quaternion
.
FromToRotation
(
Vector3
.
up
,
rightRotation
);
MyLine
.
transform
.
localScale
=
new
Vector3
(
LThickness
,
HalfLength
,
LThickness
);
...
...
@@ -464,6 +481,71 @@ public class FruitView : MonoBehaviour
}
}
}
//-------------------------------------GL画线--------------------------------------
private
bool
beginDraw
=
false
;
private
Vector3
curPos
=
Vector3
.
zero
;
private
float
interval
=
0.1f
;
private
List
<
Vector3
>
posList
=
new
List
<
Vector3
>();
public
Material
lineMaterial
;
void
sOnGUI
()
{
Event
e
=
Event
.
current
;
if
(
e
!=
null
&&
e
.
type
!=
null
)
{
if
(
e
.
type
==
EventType
.
MouseDown
)
{
beginDraw
=
true
;
}
if
(
e
.
type
==
EventType
.
MouseDrag
)
{
if
(
Vector3
.
Distance
(
curPos
,
Input
.
mousePosition
)
>
interval
)
{
curPos
=
Input
.
mousePosition
;
posList
.
Add
(
new
Vector3
(
curPos
.
x
/
Screen
.
width
,
curPos
.
y
/
Screen
.
height
,
0
));
}
}
if
(
e
.
type
==
EventType
.
MouseUp
)
{
beginDraw
=
false
;
ClearLines
();
}
}
DrawLine
();
}
void
ClearLines
()
{
beginDraw
=
false
;
posList
.
Clear
();
curPos
=
Vector3
.
zero
;
GL
.
PushMatrix
();
GL
.
Clear
(
true
,
true
,
Color
.
white
);
GL
.
PopMatrix
();
}
void
DrawLine
()
{
if
(!
beginDraw
)
return
;
GL
.
PushMatrix
();
GL
.
LoadOrtho
();
lineMaterial
.
SetPass
(
0
);
GL
.
Begin
(
GL
.
QUADS
);
for
(
int
i
=
0
;
i
<
posList
.
Count
-
1
;
i
++)
{
Vector3
pos
=
posList
[
i
];
GL
.
Vertex3
(
pos
.
x
,
pos
.
y
,
pos
.
z
);
GL
.
Vertex3
(
posList
[
i
+
1
].
x
,
posList
[
i
+
1
].
y
,
posList
[
i
+
1
].
z
);
}
GL
.
End
();
GL
.
PopMatrix
();
}
//-------------------------------------GL画线--------------------------------------
private
void
OnDestroy
()
{
if
(
GameServices
.
inputService
!=
null
)
...
...
@@ -480,5 +562,6 @@ public class FruitView : MonoBehaviour
m_fruitBombEffect
=
null
;
//m_fruitDropEffect.Clear();
m_fruitDropEffect
=
null
;
SetFruitRigidState
(
false
);
}
}
3D Fruit/Assets/#A2_Scripts/Battle/View/GlassView.cs
View file @
6d7d15e9
...
...
@@ -58,10 +58,12 @@ public class GlassView : MonoBehaviour
varSize
.
y
=
m_strawberryOffest
/
10.0f
;
m_strawberry
.
localScale
=
varSize
;
//柠檬位置
Vector3
varPos
=
m_lemon
.
localPosition
;
varPos
.
y
=
m_strawberry
.
localScale
.
y
/
10.0f
+
m_strawberry
.
localScale
.
y
/
60.0f
;
m_lemon
.
localPosition
=
varPos
;
//橙子位置
if
(
m_orange
)
{
Vector3
varOrangePos
=
m_orange
.
localPosition
;
...
...
@@ -112,7 +114,8 @@ public class GlassView : MonoBehaviour
BattleCtrl
.
instance
.
OnBattleWin
();
}
}
else
if
(
BattleCtrl
.
instance
.
levelManager
.
CurLevelIndex
==
LevelEnum
.
levelTwoIndex
)
else
if
(
BattleCtrl
.
instance
.
levelManager
.
CurLevelIndex
==
LevelEnum
.
levelTwoIndex
||
BattleCtrl
.
instance
.
levelManager
.
CurLevelIndex
==
LevelEnum
.
levelThreeIndex
)
{
if
(
m_strawberryOffest
>=
m_strawberryMaxNum
&&
m_lemonOffest
>=
m_lemonMaxNum
&&
m_orangeOffest
>=
m_orangeMaxNum
&&
m_bControl
)
...
...
3D Fruit/Assets/#A3_Prefabs/BattleUI.prefab
View file @
6d7d15e9
This diff is collapsed.
Click to expand it.
3D Fruit/Assets/#C3_Materials/ORANGE-YELLOW 7.mat
View file @
6d7d15e9
...
...
@@ -7,7 +7,7 @@ Material:
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_Name
:
ORANGE-YELLOW
5
m_Name
:
ORANGE-YELLOW
7
m_Shader
:
{
fileID
:
4800000
,
guid
:
4609c28b77ae6c04689a8ba2b2fccba7
,
type
:
3
}
m_ShaderKeywords
:
_EMISSION
m_LightmapFlags
:
1
...
...
3D Fruit/Assets/#C3_Materials/brush.mat
0 → 100644
View file @
6d7d15e9
%YAML
1.1
%TAG
!u!
tag:unity3d.com,2011:
---
!u!21
&2100000
Material
:
serializedVersion
:
6
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_Name
:
brush
m_Shader
:
{
fileID
:
4800000
,
guid
:
6145fb7ee06e2d941b49733a684e8dfd
,
type
:
3
}
m_ShaderKeywords
:
m_LightmapFlags
:
4
m_EnableInstancingVariants
:
0
m_DoubleSidedGI
:
0
m_CustomRenderQueue
:
-1
stringTagMap
:
{}
disabledShaderPasses
:
[]
m_SavedProperties
:
serializedVersion
:
3
m_TexEnvs
:
-
_BumpMap
:
m_Texture
:
{
fileID
:
0
}
m_Scale
:
{
x
:
1
,
y
:
1
}
m_Offset
:
{
x
:
0
,
y
:
0
}
-
_DetailAlbedoMap
:
m_Texture
:
{
fileID
:
0
}
m_Scale
:
{
x
:
1
,
y
:
1
}
m_Offset
:
{
x
:
0
,
y
:
0
}
-
_DetailMask
:
m_Texture
:
{
fileID
:
0
}
m_Scale
:
{
x
:
1
,
y
:
1
}
m_Offset
:
{
x
:
0
,
y
:
0
}
-
_DetailNormalMap
:
m_Texture
:
{
fileID
:
0
}
m_Scale
:
{
x
:
1
,
y
:
1
}
m_Offset
:
{
x
:
0
,
y
:
0
}
-
_EmissionMap
:
m_Texture
:
{
fileID
:
0
}
m_Scale
:
{
x
:
1
,
y
:
1
}
m_Offset
:
{
x
:
0
,
y
:
0
}
-
_MainTex
:
m_Texture
:
{
fileID
:
2800000
,
guid
:
84c8db9d523db493bbee5d1a4fe58ecb
,
type
:
3
}
m_Scale
:
{
x
:
1
,
y
:
1
}
m_Offset
:
{
x
:
0
,
y
:
0
}
-
_MetallicGlossMap
:
m_Texture
:
{
fileID
:
0
}
m_Scale
:
{
x
:
1
,
y
:
1
}
m_Offset
:
{
x
:
0
,
y
:
0
}
-
_OcclusionMap
:
m_Texture
:
{
fileID
:
0
}
m_Scale
:
{
x
:
1
,
y
:
1
}
m_Offset
:
{
x
:
0
,
y
:
0
}
-
_ParallaxMap
:
m_Texture
:
{
fileID
:
0
}
m_Scale
:
{
x
:
1
,
y
:
1
}
m_Offset
:
{
x
:
0
,
y
:
0
}
m_Floats
:
-
_BumpScale
:
1
-
_Cutoff
:
0.5
-
_DetailNormalMapScale
:
1
-
_DstBlend
:
0
-
_GlossMapScale
:
1
-
_Glossiness
:
0.5
-
_GlossyReflections
:
1
-
_Metallic
:
0
-
_Mode
:
0
-
_OcclusionStrength
:
1
-
_Parallax
:
0.02
-
_SmoothnessTextureChannel
:
0
-
_SpecularHighlights
:
1
-
_SrcBlend
:
1
-
_UVSec
:
0
-
_ZWrite
:
1
m_Colors
:
-
_Color
:
{
r
:
1
,
g
:
0.7185301
,
b
:
0
,
a
:
1
}
-
_EmissionColor
:
{
r
:
0
,
g
:
0
,
b
:
0
,
a
:
1
}
3D Fruit/Assets/#C3_Materials/brush.mat.meta
0 → 100644
View file @
6d7d15e9
fileFormatVersion: 2
guid: cbea56823be0b4e4c85924b6489dfe10
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:
3D Fruit/Assets/#C3_Materials/game/LiquidBottle 2.mat
View file @
6d7d15e9
...
...
@@ -112,7 +112,7 @@ Material:
-
_EnableExternalAlpha
:
0
-
_Exposure
:
1
-
_Extrusion
:
1
-
_FillAmount
:
0.
16
-
_FillAmount
:
0.
734
-
_FlipbookMode
:
0
-
_FoamLineWidth
:
0.0051
-
_FresnelPower
:
10
...
...
3D Fruit/Assets/#C3_Materials/game/LiquidBottle 3.mat
View file @
6d7d15e9
...
...
@@ -62,7 +62,7 @@ Material:
-
_Cutoff
:
0.5
-
_DetailNormalMapScale
:
1
-
_DstBlend
:
0
-
_FillAmount
:
0.
313
-
_FillAmount
:
0.
785
-
_FoamLineWidth
:
0.0051
-
_GlossMapScale
:
1
-
_Glossiness
:
0.5
...
...
3D Fruit/Assets/#D2_Shaders/brush.shader
0 → 100644
View file @
6d7d15e9
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'
Shader
"Custom/Painting"
{
Properties
{
_MainTex
(
"MainTex (RGB) Trans (A)"
,
2
D
)
=
"white"
{}
_Color
(
"Color"
,
Color
)
=
(
1
,
1
,
1
,
1
)
}
SubShader
{
Tags
{
"Queue"
=
"Transparent"
"IgnoreProjector"
=
"True"
"RenderType"
=
"Transparent"
"PreviewType"
=
"Plane"
"CanUseSpriteAtlas"
=
"True"
}
Cull
Off
Lighting
Off
ZWrite
Off
Fog
{
Mode
Off
}
Blend
One
OneMinusSrcAlpha
Pass
{
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "UnityCG.cginc"
struct
v2f
{
float4
vertex
:
SV_POSITION
;
half2
texcoord
:
TEXCOORD0
;
};
fixed4
_Color
;
v2f
vert
(
appdata_base
IN
)
{
v2f
OUT
;
OUT
.
vertex
=
UnityObjectToClipPos
(
IN
.
vertex
);
OUT
.
texcoord
=
IN
.
texcoord
;
return
OUT
;
}
sampler2D
_MainTex
;
fixed4
frag
(
v2f
IN
)
:
SV_Target
{
float4
col
=
_Color
*
tex2D
(
_MainTex
,
IN
.
texcoord
);
col
.
rgb
*=
col
.
a
;
return
col
;
}
ENDCG
}
}
}
\ No newline at end of file
3D Fruit/Assets/#D2_Shaders/brush.shader.meta
0 → 100644
View file @
6d7d15e9
fileFormatVersion: 2
guid: 6145fb7ee06e2d941b49733a684e8dfd
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:
3D Fruit/Assets/Res/Levels/Level0.prefab
View file @
6d7d15e9
...
...
@@ -1468,7 +1468,7 @@ Transform:
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
2419814893742932194
}
m_LocalRotation
:
{
x
:
-0
,
y
:
-0
,
z
:
-0
,
w
:
1
}
m_LocalPosition
:
{
x
:
0
,
y
:
-0.
36
,
z
:
-1.697292
}
m_LocalPosition
:
{
x
:
0
,
y
:
-0.
5
,
z
:
-1.697292
}
m_LocalScale
:
{
x
:
1
,
y
:
1
,
z
:
1
}
m_Children
:
[]
m_Father
:
{
fileID
:
2419814894216345595
}
...
...
@@ -1500,7 +1500,7 @@ Camera:
near clip plane
:
0.3
far clip plane
:
1000
field of view
:
60
orthographic
:
1
orthographic
:
0
orthographic size
:
1.43
m_Depth
:
-1
m_CullingMask
:
...
...
@@ -1872,6 +1872,8 @@ MonoBehaviour:
m_glassView
:
{
fileID
:
4057659938803460645
}
m_fruitParent
:
{
fileID
:
6664447788583718008
}
m_highLightEffect
:
{
fileID
:
2419814893742932198
}
m_cutTrans
:
{
fileID
:
0
}
lineMaterial
:
{
fileID
:
2100000
,
guid
:
cbea56823be0b4e4c85924b6489dfe10
,
type
:
2
}
---
!u!1
&2419814894024991057
GameObject
:
m_ObjectHideFlags
:
0
...
...
3D Fruit/Assets/Res/Levels/Level1.prefab
View file @
6d7d15e9
...
...
@@ -1550,7 +1550,7 @@ Transform:
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
2419814893742932194
}
m_LocalRotation
:
{
x
:
-0
,
y
:
-0
,
z
:
-0
,
w
:
1
}
m_LocalPosition
:
{
x
:
0
,
y
:
-0.
36
,
z
:
-1.697292
}
m_LocalPosition
:
{
x
:
0
,
y
:
-0.
5
,
z
:
-1.697292
}
m_LocalScale
:
{
x
:
1
,
y
:
1
,
z
:
1
}
m_Children
:
[]
m_Father
:
{
fileID
:
2419814894216345595
}
...
...
@@ -1582,7 +1582,7 @@ Camera:
near clip plane
:
0.3
far clip plane
:
1000
field of view
:
60
orthographic
:
1
orthographic
:
0
orthographic size
:
1.43
m_Depth
:
-1
m_CullingMask
:
...
...
@@ -1954,6 +1954,8 @@ MonoBehaviour:
m_glassView
:
{
fileID
:
4057659938803460645
}
m_fruitParent
:
{
fileID
:
6664447788583718008
}
m_highLightEffect
:
{
fileID
:
2419814893742932198
}
m_cutTrans
:
{
fileID
:
0
}
lineMaterial
:
{
fileID
:
0
}
---
!u!1
&2419814894024991057
GameObject
:
m_ObjectHideFlags
:
0
...
...
3D Fruit/Assets/Res/Levels/Level2.prefab
View file @
6d7d15e9
This diff is collapsed.
Click to expand it.
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