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
30342a2a
Commit
30342a2a
authored
May 12, 2021
by
wanqing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改流体旋转
parent
dd83a013
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
140450 additions
and
185952 deletions
+140450
-185952
DemoScenes.unity
3D Fruit/Assets/#A1_Scenes/DemoScenes.unity
+140404
-185944
BattleUI.cs
3D Fruit/Assets/#A2_Scripts/Battle/UI/BattleUI.cs
+24
-0
FruitView.cs
3D Fruit/Assets/#A2_Scripts/Battle/View/FruitView.cs
+18
-4
Level0.prefab
3D Fruit/Assets/Res/Levels/Level0.prefab
+4
-4
No files found.
3D Fruit/Assets/#A1_Scenes/DemoScenes.unity
View file @
30342a2a
This diff is collapsed.
Click to expand it.
3D Fruit/Assets/#A2_Scripts/Battle/UI/BattleUI.cs
View file @
30342a2a
...
...
@@ -698,6 +698,14 @@ public class BattleUI : MonoBehaviour
if
(
num
==
1
)
{
m_combo1EffectObj
=
PoolManager
.
Instance
.
GetObjectFromPool
(
CacheManager
.
Instance
.
cmobo1EffectObj
);
if
(
BattleCtrl
.
instance
.
levelManager
.
CurLevelIndex
==
LevelEnum
.
levelOneIndex
)
{
m_combo1EffectObj
.
transform
.
localScale
=
Vector3
.
one
*
1.5f
;
}
else
{
m_combo1EffectObj
.
transform
.
localScale
=
Vector3
.
one
;
}
GameServices
.
timerServices
.
Push
(
this
,
1.0f
,
delegate
{
PoolManager
.
Instance
.
ReturnObjectToPool
(
m_combo1EffectObj
);
...
...
@@ -706,6 +714,14 @@ public class BattleUI : MonoBehaviour
else
if
(
num
==
2
)
{
m_combo2EffectObj
=
PoolManager
.
Instance
.
GetObjectFromPool
(
CacheManager
.
Instance
.
cmobo2EffectObj
);
if
(
BattleCtrl
.
instance
.
levelManager
.
CurLevelIndex
==
LevelEnum
.
levelOneIndex
)
{
m_combo2EffectObj
.
transform
.
localScale
=
Vector3
.
one
*
1.5f
;
}
else
{
m_combo2EffectObj
.
transform
.
localScale
=
Vector3
.
one
;
}
GameServices
.
timerServices
.
Push
(
this
,
1.0f
,
delegate
{
PoolManager
.
Instance
.
ReturnObjectToPool
(
m_combo2EffectObj
);
...
...
@@ -714,6 +730,14 @@ public class BattleUI : MonoBehaviour
else
{
m_combo3EffectObj
=
PoolManager
.
Instance
.
GetObjectFromPool
(
CacheManager
.
Instance
.
cmobo3EffectObj
);
if
(
BattleCtrl
.
instance
.
levelManager
.
CurLevelIndex
==
LevelEnum
.
levelOneIndex
)
{
m_combo3EffectObj
.
transform
.
localScale
=
Vector3
.
one
*
1.5f
;
}
else
{
m_combo3EffectObj
.
transform
.
localScale
=
Vector3
.
one
;
}
GameServices
.
timerServices
.
Push
(
this
,
1.0f
,
delegate
{
PoolManager
.
Instance
.
ReturnObjectToPool
(
m_combo3EffectObj
);
...
...
3D Fruit/Assets/#A2_Scripts/Battle/View/FruitView.cs
View file @
30342a2a
...
...
@@ -3,6 +3,7 @@ using System.Collections.Generic;
using
UnityEngine
;
using
UnitySimpleLiquid
;
using
Water2D
;
using
DG.Tweening
;
public
class
FruitView
:
MonoBehaviour
{
...
...
@@ -51,6 +52,7 @@ public class FruitView : MonoBehaviour
//小球处理
private
List
<
GameObject
>
m_smallBallLst
=
new
List
<
GameObject
>();
private
List
<
Vector3
>
m_smallBallPosLst
=
new
List
<
Vector3
>();
private
float
m_fruitSpeed
=
0.0f
;
private
void
Awake
()
{
//if (m_animator)
...
...
@@ -303,6 +305,9 @@ public class FruitView : MonoBehaviour
if
(
varWater
)
{
varWater
.
Spawn
();
//varWater.transform.DORotateQuaternion(Quaternion.Euler(0, 0, 180), 0.1f).onComplete = delegate () {
// varWater.transform.DORotateQuaternion(Quaternion.Euler(0, 0, 0), 0.1f);
//};
}
m_waterEffect
.
Add
(
varWaterEffect
);
}
...
...
@@ -315,13 +320,15 @@ public class FruitView : MonoBehaviour
varVec
.
x
+=
m_waterLemonLst
[
i
].
position
.
x
;
varVec
.
y
+=
m_waterLemonLst
[
i
].
position
.
y
;
}
varVec
.
x
/=
2
;
varVec
.
y
/=
2
;
if
(
varVec
.
x
<
0
)
{
varVec
.
x
-=
1.0
f
;
varVec
.
x
-=
0.5
f
;
}
else
{
varVec
.
x
+=
1.0
f
;
varVec
.
x
+=
0.5
f
;
}
varVec
.
y
+=
1.0f
;
GameObject
varWaterEffect
=
null
;
...
...
@@ -354,13 +361,15 @@ public class FruitView : MonoBehaviour
varVec
.
x
+=
m_waterOrangeLst
[
i
].
position
.
x
;
varVec
.
y
+=
m_waterOrangeLst
[
i
].
position
.
y
;
}
varVec
.
x
/=
2
;
varVec
.
y
/=
2
;
if
(
varVec
.
x
<
0
)
{
varVec
.
x
-=
1.0
f
;
varVec
.
x
-=
0.5
f
;
}
else
{
varVec
.
x
+=
1.0
f
;
varVec
.
x
+=
0.5
f
;
}
varVec
.
y
+=
1.0f
;
GameObject
varWaterEffect
=
null
;
...
...
@@ -381,6 +390,7 @@ public class FruitView : MonoBehaviour
if
(
varWater
)
{
varWater
.
Spawn
();
varWater
.
transform
.
DORotateQuaternion
(
Quaternion
.
Euler
(
0
,
0
,
varWater
.
transform
.
localEulerAngles
.
z
-
1
),
0.2f
);
}
m_waterEffect
.
Add
(
varWaterEffect
);
}
...
...
@@ -1141,6 +1151,10 @@ public class FruitView : MonoBehaviour
Clicked
();
}
UpdateSelectSize
();
for
(
int
i
=
0
;
i
<
m_waterEffect
.
Count
;
i
++)
{
m_waterEffect
[
i
].
transform
.
Rotate
(
Vector3
.
forward
*
20.0f
,
Space
.
World
);
}
}
//旋转叶片
void
UpdateCutRotate
()
...
...
3D Fruit/Assets/Res/Levels/Level0.prefab
View file @
30342a2a
...
...
@@ -676,7 +676,7 @@ Transform:
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
2063074336016264972
}
m_LocalRotation
:
{
x
:
-0
,
y
:
-0
,
z
:
-0
,
w
:
1
}
m_LocalPosition
:
{
x
:
0
,
y
:
-0.0
7
6
,
z
:
0.2
}
m_LocalPosition
:
{
x
:
0
,
y
:
-0.06
,
z
:
0.2
}
m_LocalScale
:
{
x
:
0.3
,
y
:
0.3
,
z
:
0.3
}
m_Children
:
-
{
fileID
:
2185915468272480620
}
...
...
@@ -2974,7 +2974,7 @@ Transform:
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
2419814894246947240
}
m_LocalRotation
:
{
x
:
-0
,
y
:
-0
,
z
:
-0
,
w
:
1
}
m_LocalPosition
:
{
x
:
0
,
y
:
-2.2
703242
,
z
:
0.602708
}
m_LocalPosition
:
{
x
:
0
,
y
:
-2.2
4
,
z
:
-0.29
}
m_LocalScale
:
{
x
:
3.2337003
,
y
:
1.1207
,
z
:
2.592764
}
m_Children
:
[]
m_Father
:
{
fileID
:
2419814894139061657
}
...
...
@@ -10683,7 +10683,7 @@ GameObject:
m_Icon
:
{
fileID
:
0
}
m_NavMeshLayer
:
0
m_StaticEditorFlags
:
0
m_IsActive
:
1
m_IsActive
:
0
---
!u!4
&3630512415720678602
Transform
:
m_ObjectHideFlags
:
0
...
...
@@ -11330,7 +11330,7 @@ Transform:
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
6079020160306596385
}
m_LocalRotation
:
{
x
:
0
,
y
:
-0
,
z
:
-0
,
w
:
1
}
m_LocalPosition
:
{
x
:
0
,
y
:
0.28
,
z
:
0
}
m_LocalPosition
:
{
x
:
0
,
y
:
0.28
,
z
:
-5
}
m_LocalScale
:
{
x
:
1
,
y
:
0
,
z
:
1
}
m_Children
:
[]
m_Father
:
{
fileID
:
3097028441198796063
}
...
...
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