Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
TruckJourney
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
TruckJourney
Commits
209eb921
Commit
209eb921
authored
Apr 09, 2021
by
wanqing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改代码
parent
da3c29f5
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
174 additions
and
61 deletions
+174
-61
BattleUI.cs
TruckJourney/Assets/#A2_Scripts/Battle/UI/BattleUI.cs
+16
-0
CarView.cs
TruckJourney/Assets/#A2_Scripts/Battle/View/CarView.cs
+2
-0
Level2.prefab
TruckJourney/Assets/Res/Levels/Level2.prefab
+156
-61
No files found.
TruckJourney/Assets/#A2_Scripts/Battle/UI/BattleUI.cs
View file @
209eb921
...
...
@@ -50,6 +50,8 @@ public class BattleUI : MonoBehaviour
private
int
m_mouseIndex
=
0
;
//点击次数
private
bool
m_bIsShowMouse
=
true
;
//是否显示手指图标
private
int
m_bombIndex
=
0
;
//炸弹计数
private
Image
m_joystickImage
;
private
Image
m_thumbImage
;
public
bool
IsLeftEmtryBomb
{
get
{
return
m_bombIndex
>=
3
;
}
}
//是否不剩炸弹了
public
bool
IsBombButtonCanInteractable
{
get
{
return
m_boomBtn
.
interactable
;
}
}
void
Awake
()
...
...
@@ -73,6 +75,8 @@ public class BattleUI : MonoBehaviour
private
void
Start
()
{
m_boomBtn
.
interactable
=
false
;
m_joystickImage
=
GameServices
.
inputService
.
joyStick
.
GetComponent
<
Image
>();
m_thumbImage
=
GameServices
.
inputService
.
joyStick
.
thumb
.
GetComponent
<
Image
>();
}
void
SetDragMode
()
{
...
...
@@ -317,4 +321,16 @@ public class BattleUI : MonoBehaviour
varVec2
.
y
=
y
;
m_symbolObj
.
transform
.
localPosition
=
varVec2
;
}
//摇杆图标出现
public
void
ShowJoystick
()
{
m_joystickImage
.
color
=
Color
.
white
;
m_thumbImage
.
color
=
Color
.
white
;
}
//摇杆图标隐藏
public
void
HideJoystick
()
{
m_joystickImage
.
color
=
Color
.
clear
;
m_thumbImage
.
color
=
Color
.
clear
;
}
}
TruckJourney/Assets/#A2_Scripts/Battle/View/CarView.cs
View file @
209eb921
...
...
@@ -304,6 +304,7 @@ public class CarView : MonoBehaviour
varThumb
.
x
=
80
;
varThumb
.
y
=
80
;
m_thumbRT
.
sizeDelta
=
varThumb
;
BattleCtrl
.
instance
.
battleUI
.
ShowJoystick
();
}
// 抬起回调
void
OnTouchUp
()
...
...
@@ -336,6 +337,7 @@ public class CarView : MonoBehaviour
BattleCtrl
.
instance
.
battleUI
.
SetSymbolPos
(
0
,
0
);
//----------摇杆操作
BattleCtrl
.
instance
.
battleUI
.
HideJoystick
();
Vector2
varThumb
=
m_thumbRT
.
sizeDelta
;
varThumb
.
x
=
4000
;
varThumb
.
y
=
4000
;
...
...
TruckJourney/Assets/Res/Levels/Level2.prefab
View file @
209eb921
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