Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
SteelBall
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
SteelBall
Commits
53b614da
Commit
53b614da
authored
Jan 20, 2021
by
wanqing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
隐藏UI录屏模式功能
parent
801081bb
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
154 additions
and
33 deletions
+154
-33
BattleUI.cs
SteelBall/Assets/0A2_Scripts/Battle/UI/BattleUI.cs
+4
-4
ChainHandle.cs
SteelBall/Assets/0A2_Scripts/Battle/View/ChainHandle.cs
+19
-26
BattleUI.prefab
SteelBall/Assets/0A3_Prefabs/BattleUI.prefab
+3
-3
Finger-Icon.png
SteelBall/Assets/0B1_UIs/Finger-Icon.png
+0
-0
Finger-Icon.png.meta
SteelBall/Assets/0B1_UIs/Finger-Icon.png.meta
+128
-0
No files found.
SteelBall/Assets/0A2_Scripts/Battle/UI/BattleUI.cs
View file @
53b614da
...
...
@@ -63,8 +63,8 @@ public class BattleUI : MonoBehaviour
//m_ShowOrHideMouseText = m_ShowOrHideMouseObj.GetComponentInChildren<Text>();
GameServices
.
audioServices
.
PlayBgm
(
GameServices
.
configService
.
audioConfig
.
GameBgm
);
GameServices
.
configService
.
playerConfig
.
ClawMoveSpeed
=
0.4f
;
//开始默认值
GameServices
.
configService
.
playerConfig
.
SteelBallMass
=
1
0
.0f
;
GameServices
.
configService
.
playerConfig
.
HandleMoveSpeed
=
3.
0
f
;
GameServices
.
configService
.
playerConfig
.
SteelBallMass
=
1
3
.0f
;
GameServices
.
configService
.
playerConfig
.
HandleMoveSpeed
=
3.
3
f
;
}
void
SetDragMode
()
{
...
...
@@ -254,8 +254,8 @@ public class BattleUI : MonoBehaviour
m_battleObj
.
SetActive
(
bool_
);
//m_successResultObj.SetActive(bool_);
//m_successResultMaskObj.SetActive(!bool_);
//
m_ShowMouseObj.SetActive(!bool_);
//
m_HideMouseObj.SetActive(!bool_);
m_ShowMouseObj
.
SetActive
(!
bool_
);
m_HideMouseObj
.
SetActive
(!
bool_
);
}
//设置手势位置
public
void
SetMousePos
(
float
x
,
float
y
)
...
...
SteelBall/Assets/0A2_Scripts/Battle/View/ChainHandle.cs
View file @
53b614da
...
...
@@ -103,6 +103,24 @@ public class ChainHandle : MonoBehaviour
// Update is called once per frame
void
Update
()
{
if
(!
BattleCtrl
.
instance
.
isStartBattle
)
{
return
;
}
if
(
Input
.
GetMouseButton
(
0
))
{
//float varX = Input.mousePosition.x - Screen.width / 2f;
//float varY = Input.mousePosition.y - Screen.height / 2f;
//BattleCtrl.instance.battleUI.SetMousePos(varX, varY);
Vector3
varVec3
=
Camera
.
main
.
WorldToScreenPoint
(
transform
.
position
);
varVec3
.
x
=
(
varVec3
.
x
-
Screen
.
width
/
2f
)
/
(
Screen
.
width
/
GlobalConfig
.
NormalWidth
)
+
50
;
varVec3
.
y
=
(
varVec3
.
y
-
Screen
.
height
/
2f
)
/
(
Screen
.
width
/
GlobalConfig
.
NormalWidth
)
-
50
;
BattleCtrl
.
instance
.
battleUI
.
SetMousePos
(
varVec3
.
x
,
varVec3
.
y
);
}
else
if
(
Input
.
GetMouseButtonUp
(
0
))
{
BattleCtrl
.
instance
.
battleUI
.
SetMousePos
(
0
,
0
);
}
//if (Input.GetMouseButtonDown(0))
//{
// m_StartPos = Input.mousePosition;
...
...
@@ -113,31 +131,6 @@ public class ChainHandle : MonoBehaviour
// Vector2 varVec2 = m_StartPos - m_DragPos;
// OnMove(varVec2);
// m_StartPos = m_DragPos;
//}
//float varMinX = GameServices.configService.playerConfig.xDirMinDis;
//float varMaxX = GameServices.configService.playerConfig.xDirMaxDis;
//float varMinY = GameServices.configService.playerConfig.yDirMinDis;
//float varMaxY = GameServices.configService.playerConfig.yDirMaxDis;
//Vector3 varVec3 = transform.position;
//if(varVec3.x <= varMinX)
//{
// varVec3.x = varMinX;
//}
//if (varVec3.x >= varMaxX)
//{
// varVec3.x = varMaxX;
//}
//if (varVec3.y <= varMinY)
//{
// varVec3.y = varMinY;
//}
//if (varVec3.y >= varMaxY)
//{
// varVec3.y = varMaxY;
//}
//transform.position = varVec3;
//transform.position = new Vector3(Mathf.Clamp(transform.position.x, varMinX, varMaxX),
// Mathf.Clamp(transform.position.y, varMinY, varMaxY),
// 0);
//} 0);
}
}
SteelBall/Assets/0A3_Prefabs/BattleUI.prefab
View file @
53b614da
...
...
@@ -6604,7 +6604,7 @@ MonoBehaviour:
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
6064464677632144689
}
m_Enabled
:
0
m_Enabled
:
1
m_EditorHideFlags
:
0
m_Script
:
{
fileID
:
11500000
,
guid
:
14433df62b9b3554e93abbfbc187fc8c
,
type
:
3
}
m_Name
:
...
...
@@ -13287,7 +13287,7 @@ RectTransform:
m_GameObject
:
{
fileID
:
7975587463478854421
}
m_LocalRotation
:
{
x
:
0
,
y
:
0
,
z
:
0
,
w
:
1
}
m_LocalPosition
:
{
x
:
0
,
y
:
0
,
z
:
0
}
m_LocalScale
:
{
x
:
1
.8
,
y
:
1.8
,
z
:
1
}
m_LocalScale
:
{
x
:
1
,
y
:
1
,
z
:
1
}
m_Children
:
[]
m_Father
:
{
fileID
:
6064464677632144690
}
m_RootOrder
:
11
...
...
@@ -13324,7 +13324,7 @@ MonoBehaviour:
m_OnCullStateChanged
:
m_PersistentCalls
:
m_Calls
:
[]
m_Sprite
:
{
fileID
:
21300000
,
guid
:
d9a4009ec8b5f26459ef82e44026d54f
,
type
:
3
}
m_Sprite
:
{
fileID
:
21300000
,
guid
:
1cf911be2e166054bb58daa6b9affab0
,
type
:
3
}
m_Type
:
0
m_PreserveAspect
:
0
m_FillCenter
:
1
...
...
SteelBall/Assets/0B1_UIs/Finger-Icon.png
0 → 100644
View file @
53b614da
7.29 KB
SteelBall/Assets/0B1_UIs/Finger-Icon.png.meta
0 → 100644
View file @
53b614da
fileFormatVersion: 2
guid: 1cf911be2e166054bb58daa6b9affab0
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 11
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: -1
mipBias: -100
wrapU: 1
wrapV: 1
wrapW: -1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
applyGammaDecoding: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: WebGL
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 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