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
50c860fd
Commit
50c860fd
authored
Apr 25, 2021
by
wanqing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改代码
parent
ae737c38
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
26 additions
and
26 deletions
+26
-26
DemoScenes.unity
3D Fruit/Assets/#A1_Scenes/DemoScenes.unity
+1
-1
LineUI.cs
3D Fruit/Assets/#A2_Scripts/Battle/UI/LineUI.cs
+1
-1
FruitView.cs
3D Fruit/Assets/#A2_Scripts/Battle/View/FruitView.cs
+1
-1
GlassView.cs
3D Fruit/Assets/#A2_Scripts/Battle/View/GlassView.cs
+11
-11
BattleUI.prefab
3D Fruit/Assets/#A3_Prefabs/BattleUI.prefab
+3
-3
Toon_Lit Glass.mat.meta
3D Fruit/Assets/#C3_Materials/Toon_Lit Glass.mat.meta
+1
-1
Level0.prefab
3D Fruit/Assets/Res/Levels/Level0.prefab
+5
-5
Level1.prefab
3D Fruit/Assets/Res/Levels/Level1.prefab
+3
-3
No files found.
3D Fruit/Assets/#A1_Scenes/DemoScenes.unity
View file @
50c860fd
...
@@ -38,7 +38,7 @@ RenderSettings:
...
@@ -38,7 +38,7 @@ RenderSettings:
m_ReflectionIntensity
:
1
m_ReflectionIntensity
:
1
m_CustomReflection
:
{
fileID
:
0
}
m_CustomReflection
:
{
fileID
:
0
}
m_Sun
:
{
fileID
:
0
}
m_Sun
:
{
fileID
:
0
}
m_IndirectSpecularColor
:
{
r
:
0.451304
55
,
g
:
0.5001912
,
b
:
0.56907165
,
a
:
1
}
m_IndirectSpecularColor
:
{
r
:
0.451304
73
,
g
:
0.5001914
,
b
:
0.5690714
,
a
:
1
}
m_UseRadianceAmbientProbe
:
0
m_UseRadianceAmbientProbe
:
0
---
!u!157
&4
---
!u!157
&4
LightmapSettings
:
LightmapSettings
:
...
...
3D Fruit/Assets/#A2_Scripts/Battle/UI/LineUI.cs
View file @
50c860fd
...
@@ -28,7 +28,7 @@ public class LineUI : MonoBehaviour
...
@@ -28,7 +28,7 @@ public class LineUI : MonoBehaviour
m_imageLine
.
transform
.
localPosition
=
rightPosition
;
m_imageLine
.
transform
.
localPosition
=
rightPosition
;
m_imageLine
.
transform
.
localRotation
=
Quaternion
.
FromToRotation
(
Vector3
.
up
,
rightRotation
);
m_imageLine
.
transform
.
localRotation
=
Quaternion
.
FromToRotation
(
Vector3
.
up
,
rightRotation
);
Vector2
varSize
=
m_imageLine
.
rectTransform
.
sizeDelta
;
Vector2
varSize
=
m_imageLine
.
rectTransform
.
sizeDelta
;
varSize
.
x
=
250.0f
;
varSize
.
x
=
250.0f
;
//HalfLength/m_imageLine.preferredHeight*m_imageLine.preferredWidth;
varSize
.
y
=
HalfLength
;
varSize
.
y
=
HalfLength
;
m_imageLine
.
rectTransform
.
sizeDelta
=
varSize
;
m_imageLine
.
rectTransform
.
sizeDelta
=
varSize
;
m_imageLineStart
.
transform
.
localPosition
=
varStart
;
m_imageLineStart
.
transform
.
localPosition
=
varStart
;
...
...
3D Fruit/Assets/#A2_Scripts/Battle/View/FruitView.cs
View file @
50c860fd
...
@@ -648,7 +648,7 @@ public class FruitView : MonoBehaviour
...
@@ -648,7 +648,7 @@ public class FruitView : MonoBehaviour
{
{
Event
e
=
Event
.
current
;
Event
e
=
Event
.
current
;
if
(
e
!=
null
&&
e
.
type
!=
null
)
if
(
e
!=
null
/* && e.type != null*/
)
{
{
if
(
e
.
type
==
EventType
.
MouseDown
)
if
(
e
.
type
==
EventType
.
MouseDown
)
{
{
...
...
3D Fruit/Assets/#A2_Scripts/Battle/View/GlassView.cs
View file @
50c860fd
...
@@ -71,7 +71,7 @@ public class GlassView : MonoBehaviour
...
@@ -71,7 +71,7 @@ public class GlassView : MonoBehaviour
m_strawberryOffest
+=
Time
.
deltaTime
*
m_speed
;
m_strawberryOffest
+=
Time
.
deltaTime
*
m_speed
;
Vector3
varSize
=
m_strawberry
.
localScale
;
Vector3
varSize
=
m_strawberry
.
localScale
;
varSize
.
y
=
m_strawberryOffest
;
varSize
.
y
=
m_strawberryOffest
/
10.0f
;
m_strawberry
.
localScale
=
varSize
;
m_strawberry
.
localScale
=
varSize
;
//草莓位置
//草莓位置
...
@@ -81,15 +81,15 @@ public class GlassView : MonoBehaviour
...
@@ -81,15 +81,15 @@ public class GlassView : MonoBehaviour
//柠檬位置
//柠檬位置
Vector3
varPos
=
m_lemon
.
localPosition
;
Vector3
varPos
=
m_lemon
.
localPosition
;
varPos
.
y
=
m_startPos
+
m_strawberry
.
localScale
.
y
/
10
.0f
;
varPos
.
y
=
m_startPos
+
m_strawberry
.
localScale
.
y
*
2
.0f
;
m_lemon
.
localPosition
=
varPos
;
m_lemon
.
localPosition
=
varPos
;
//橙子位置
//橙子位置
if
(
m_orange
)
if
(
m_orange
)
{
{
Vector3
varOrangePos
=
m_orange
.
localPosition
;
Vector3
varOrangePos
=
m_orange
.
localPosition
;
varOrangePos
.
y
=
m_startPos
+
m_strawberry
.
localScale
.
y
/
10
.0f
varOrangePos
.
y
=
m_startPos
+
m_strawberry
.
localScale
.
y
*
2
.0f
+
m_lemon
.
localScale
.
y
/
10
.0f
;
+
m_lemon
.
localScale
.
y
*
2
.0f
;
m_orange
.
localPosition
=
varOrangePos
;
m_orange
.
localPosition
=
varOrangePos
;
}
}
}
}
...
@@ -99,18 +99,18 @@ public class GlassView : MonoBehaviour
...
@@ -99,18 +99,18 @@ public class GlassView : MonoBehaviour
m_lemonOffest
+=
Time
.
deltaTime
*
m_speed
;
m_lemonOffest
+=
Time
.
deltaTime
*
m_speed
;
Vector3
varSize
=
m_lemon
.
localScale
;
Vector3
varSize
=
m_lemon
.
localScale
;
varSize
.
y
=
m_lemonOffest
;
varSize
.
y
=
m_lemonOffest
/
10.0f
;
m_lemon
.
localScale
=
varSize
;
m_lemon
.
localScale
=
varSize
;
Vector3
varPos
=
m_lemon
.
localPosition
;
Vector3
varPos
=
m_lemon
.
localPosition
;
varPos
.
y
=
m_startPos
+
m_strawberry
.
localScale
.
y
/
10
.0f
;
varPos
.
y
=
m_startPos
+
m_strawberry
.
localScale
.
y
*
2
.0f
;
m_lemon
.
localPosition
=
varPos
;
m_lemon
.
localPosition
=
varPos
;
if
(
m_orange
)
if
(
m_orange
)
{
{
Vector3
varOrangePos
=
m_orange
.
localPosition
;
Vector3
varOrangePos
=
m_orange
.
localPosition
;
varOrangePos
.
y
=
m_startPos
+
m_strawberry
.
localScale
.
y
/
10
.0f
varOrangePos
.
y
=
m_startPos
+
m_strawberry
.
localScale
.
y
*
2
.0f
+
m_lemon
.
localScale
.
y
/
10
.0f
;
+
m_lemon
.
localScale
.
y
*
2
.0f
;
m_orange
.
localPosition
=
varOrangePos
;
m_orange
.
localPosition
=
varOrangePos
;
}
}
}
}
...
@@ -120,12 +120,12 @@ public class GlassView : MonoBehaviour
...
@@ -120,12 +120,12 @@ public class GlassView : MonoBehaviour
m_orangeOffest
+=
Time
.
deltaTime
*
m_speed
;
m_orangeOffest
+=
Time
.
deltaTime
*
m_speed
;
Vector3
varSize
=
m_orange
.
localScale
;
Vector3
varSize
=
m_orange
.
localScale
;
varSize
.
y
=
m_orangeOffest
;
varSize
.
y
=
m_orangeOffest
/
10.0f
;
m_orange
.
localScale
=
varSize
;
m_orange
.
localScale
=
varSize
;
Vector3
varPos
=
m_orange
.
localPosition
;
Vector3
varPos
=
m_orange
.
localPosition
;
varPos
.
y
=
m_startPos
+
m_strawberry
.
localScale
.
y
/
10
.0f
varPos
.
y
=
m_startPos
+
m_strawberry
.
localScale
.
y
*
2
.0f
+
m_lemon
.
localScale
.
y
/
10
.0f
;
+
m_lemon
.
localScale
.
y
*
2
.0f
;
m_orange
.
localPosition
=
varPos
;
m_orange
.
localPosition
=
varPos
;
}
}
if
(
BattleCtrl
.
instance
.
levelManager
.
CurLevelIndex
==
LevelEnum
.
levelOneIndex
)
if
(
BattleCtrl
.
instance
.
levelManager
.
CurLevelIndex
==
LevelEnum
.
levelOneIndex
)
...
...
3D Fruit/Assets/#A3_Prefabs/BattleUI.prefab
View file @
50c860fd
...
@@ -139,7 +139,7 @@ RectTransform:
...
@@ -139,7 +139,7 @@ RectTransform:
m_GameObject
:
{
fileID
:
247691581
}
m_GameObject
:
{
fileID
:
247691581
}
m_LocalRotation
:
{
x
:
-0
,
y
:
-0
,
z
:
-0
,
w
:
1
}
m_LocalRotation
:
{
x
:
-0
,
y
:
-0
,
z
:
-0
,
w
:
1
}
m_LocalPosition
:
{
x
:
0
,
y
:
0
,
z
:
0
}
m_LocalPosition
:
{
x
:
0
,
y
:
0
,
z
:
0
}
m_LocalScale
:
{
x
:
1
,
y
:
1
,
z
:
1
}
m_LocalScale
:
{
x
:
0.
1
,
y
:
1
,
z
:
1
}
m_Children
:
[]
m_Children
:
[]
m_Father
:
{
fileID
:
222345271
}
m_Father
:
{
fileID
:
222345271
}
m_RootOrder
:
0
m_RootOrder
:
0
...
@@ -842,7 +842,7 @@ GameObject:
...
@@ -842,7 +842,7 @@ GameObject:
m_Icon
:
{
fileID
:
0
}
m_Icon
:
{
fileID
:
0
}
m_NavMeshLayer
:
0
m_NavMeshLayer
:
0
m_StaticEditorFlags
:
0
m_StaticEditorFlags
:
0
m_IsActive
:
1
m_IsActive
:
0
---
!u!224
&1686706038
---
!u!224
&1686706038
RectTransform
:
RectTransform
:
m_ObjectHideFlags
:
0
m_ObjectHideFlags
:
0
...
@@ -916,7 +916,7 @@ GameObject:
...
@@ -916,7 +916,7 @@ GameObject:
m_Icon
:
{
fileID
:
0
}
m_Icon
:
{
fileID
:
0
}
m_NavMeshLayer
:
0
m_NavMeshLayer
:
0
m_StaticEditorFlags
:
0
m_StaticEditorFlags
:
0
m_IsActive
:
1
m_IsActive
:
0
---
!u!224
&1695185053
---
!u!224
&1695185053
RectTransform
:
RectTransform
:
m_ObjectHideFlags
:
0
m_ObjectHideFlags
:
0
...
...
3D Fruit/Assets/#C3_Materials/Toon_Lit Glass.mat.meta
View file @
50c860fd
fileFormatVersion: 2
fileFormatVersion: 2
guid:
15bbbd9c69b478c4b9481aaabe4a313e
guid:
702d2a7770d4e8549bbbe60e15e6f769
NativeFormatImporter:
NativeFormatImporter:
externalObjects: {}
externalObjects: {}
mainObjectFileID: 0
mainObjectFileID: 0
...
...
3D Fruit/Assets/Res/Levels/Level0.prefab
View file @
50c860fd
...
@@ -3635,7 +3635,7 @@ MonoBehaviour:
...
@@ -3635,7 +3635,7 @@ MonoBehaviour:
m_EditorClassIdentifier
:
m_EditorClassIdentifier
:
m_strawberry
:
{
fileID
:
7121524795785158589
}
m_strawberry
:
{
fileID
:
7121524795785158589
}
m_lemon
:
{
fileID
:
3104661520677328248
}
m_lemon
:
{
fileID
:
3104661520677328248
}
m_orange
:
{
fileID
:
605645398554894061
0
}
m_orange
:
{
fileID
:
0
}
m_effectPos
:
{
fileID
:
8086563731940206539
}
m_effectPos
:
{
fileID
:
8086563731940206539
}
---
!u!1
&5537882261351490957
---
!u!1
&5537882261351490957
GameObject
:
GameObject
:
...
@@ -3862,7 +3862,7 @@ Transform:
...
@@ -3862,7 +3862,7 @@ Transform:
m_PrefabAsset
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
6079020160306596385
}
m_GameObject
:
{
fileID
:
6079020160306596385
}
m_LocalRotation
:
{
x
:
0
,
y
:
-0
,
z
:
-0
,
w
:
1
}
m_LocalRotation
:
{
x
:
0
,
y
:
-0
,
z
:
-0
,
w
:
1
}
m_LocalPosition
:
{
x
:
0
,
y
:
0.2
6758605
,
z
:
0
}
m_LocalPosition
:
{
x
:
0
,
y
:
0.2
8
,
z
:
0
}
m_LocalScale
:
{
x
:
1
,
y
:
0
,
z
:
1
}
m_LocalScale
:
{
x
:
1
,
y
:
0
,
z
:
1
}
m_Children
:
[]
m_Children
:
[]
m_Father
:
{
fileID
:
3097028441198796063
}
m_Father
:
{
fileID
:
3097028441198796063
}
...
@@ -4173,7 +4173,7 @@ Transform:
...
@@ -4173,7 +4173,7 @@ Transform:
m_PrefabAsset
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
6841784765868801710
}
m_GameObject
:
{
fileID
:
6841784765868801710
}
m_LocalRotation
:
{
x
:
0
,
y
:
-0
,
z
:
-0
,
w
:
1
}
m_LocalRotation
:
{
x
:
0
,
y
:
-0
,
z
:
-0
,
w
:
1
}
m_LocalPosition
:
{
x
:
0
,
y
:
0.2
6758605
,
z
:
0
}
m_LocalPosition
:
{
x
:
0
,
y
:
0.2
8
,
z
:
0
}
m_LocalScale
:
{
x
:
1
,
y
:
0
,
z
:
1
}
m_LocalScale
:
{
x
:
1
,
y
:
0
,
z
:
1
}
m_Children
:
[]
m_Children
:
[]
m_Father
:
{
fileID
:
3097028441198796063
}
m_Father
:
{
fileID
:
3097028441198796063
}
...
@@ -4470,8 +4470,8 @@ Transform:
...
@@ -4470,8 +4470,8 @@ Transform:
m_PrefabAsset
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
7655032033422026000
}
m_GameObject
:
{
fileID
:
7655032033422026000
}
m_LocalRotation
:
{
x
:
0
,
y
:
-0
,
z
:
-0
,
w
:
1
}
m_LocalRotation
:
{
x
:
0
,
y
:
-0
,
z
:
-0
,
w
:
1
}
m_LocalPosition
:
{
x
:
0
,
y
:
0.26758605
,
z
:
0
}
m_LocalPosition
:
{
x
:
0
,
y
:
1.48
,
z
:
0
}
m_LocalScale
:
{
x
:
1
,
y
:
1
,
z
:
1
}
m_LocalScale
:
{
x
:
1
,
y
:
0.3
,
z
:
1
}
m_Children
:
[]
m_Children
:
[]
m_Father
:
{
fileID
:
3097028441198796063
}
m_Father
:
{
fileID
:
3097028441198796063
}
m_RootOrder
:
3
m_RootOrder
:
3
...
...
3D Fruit/Assets/Res/Levels/Level1.prefab
View file @
50c860fd
...
@@ -212,8 +212,8 @@ Transform:
...
@@ -212,8 +212,8 @@ Transform:
m_PrefabAsset
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
1583171538080882383
}
m_GameObject
:
{
fileID
:
1583171538080882383
}
m_LocalRotation
:
{
x
:
0
,
y
:
-0
,
z
:
-0
,
w
:
1
}
m_LocalRotation
:
{
x
:
0
,
y
:
-0
,
z
:
-0
,
w
:
1
}
m_LocalPosition
:
{
x
:
0
,
y
:
0.2
6758605
,
z
:
0
}
m_LocalPosition
:
{
x
:
0
,
y
:
0.2
8
,
z
:
0
}
m_LocalScale
:
{
x
:
1
,
y
:
1
,
z
:
1
}
m_LocalScale
:
{
x
:
1
,
y
:
0
,
z
:
1
}
m_Children
:
[]
m_Children
:
[]
m_Father
:
{
fileID
:
454709148581285964
}
m_Father
:
{
fileID
:
454709148581285964
}
m_RootOrder
:
3
m_RootOrder
:
3
...
@@ -4412,7 +4412,7 @@ Transform:
...
@@ -4412,7 +4412,7 @@ Transform:
m_PrefabAsset
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
7699678184925857646
}
m_GameObject
:
{
fileID
:
7699678184925857646
}
m_LocalRotation
:
{
x
:
0
,
y
:
-0
,
z
:
-0
,
w
:
1
}
m_LocalRotation
:
{
x
:
0
,
y
:
-0
,
z
:
-0
,
w
:
1
}
m_LocalPosition
:
{
x
:
0
,
y
:
0.2
6758605
,
z
:
0
}
m_LocalPosition
:
{
x
:
0
,
y
:
0.2
8
,
z
:
0
}
m_LocalScale
:
{
x
:
1
,
y
:
0
,
z
:
1
}
m_LocalScale
:
{
x
:
1
,
y
:
0
,
z
:
1
}
m_Children
:
[]
m_Children
:
[]
m_Father
:
{
fileID
:
454709148581285964
}
m_Father
:
{
fileID
:
454709148581285964
}
...
...
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