Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
Storage
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
Storage
Commits
024f86b4
Commit
024f86b4
authored
Mar 17, 2021
by
wanqing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改代码
parent
40ed08b0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
0 deletions
+24
-0
StorageView.cs
Storage/Assets/#A2_Scripts/Battle/View/StorageView.cs
+24
-0
No files found.
Storage/Assets/#A2_Scripts/Battle/View/StorageView.cs
View file @
024f86b4
...
@@ -156,6 +156,27 @@ public class StorageView : MonoBehaviour
...
@@ -156,6 +156,27 @@ public class StorageView : MonoBehaviour
}
}
}
}
}
}
//invoke旋转
void
RotateInvoke
()
{
CancelRotateInvoke
();
InvokeRepeating
(
"RotateTarget"
,
0.5f
,
0.5f
);
}
//取消invoke
void
CancelRotateInvoke
()
{
if
(
IsInvoking
(
"RotateTarget"
))
{
CancelInvoke
(
"RotateTarget"
);
}
}
void
RotateTarget
()
{
if
(
m_curTargetTrans
)
{
m_curTargetTrans
.
transform
.
Rotate
(
transform
.
up
,
90.0f
);
}
}
void
Update
()
void
Update
()
{
{
if
(!
BattleCtrl
.
instance
.
isStartBattle
)
if
(!
BattleCtrl
.
instance
.
isStartBattle
)
...
@@ -266,6 +287,7 @@ public class StorageView : MonoBehaviour
...
@@ -266,6 +287,7 @@ public class StorageView : MonoBehaviour
BattleCtrl
.
instance
.
battleUI
.
SetSymbolPos
(
0
,
0
);
BattleCtrl
.
instance
.
battleUI
.
SetSymbolPos
(
0
,
0
);
CancelDelayMatChangeHandle
();
CancelDelayMatChangeHandle
();
Invoke
(
"DelayMatChangeHandle"
,
0.5f
);
Invoke
(
"DelayMatChangeHandle"
,
0.5f
);
CancelRotateInvoke
();
}
}
void
CancelDelayMatChangeHandle
()
void
CancelDelayMatChangeHandle
()
{
{
...
@@ -355,6 +377,7 @@ public class StorageView : MonoBehaviour
...
@@ -355,6 +377,7 @@ public class StorageView : MonoBehaviour
{
{
m_curTargetTrans
.
GetComponent
<
MeshRenderer
>().
sharedMaterial
=
m_dicMat
[
m_curTargetTrans
];
m_curTargetTrans
.
GetComponent
<
MeshRenderer
>().
sharedMaterial
=
m_dicMat
[
m_curTargetTrans
];
}
}
RotateInvoke
();
break
;
break
;
}
}
}
}
...
@@ -386,5 +409,6 @@ public class StorageView : MonoBehaviour
...
@@ -386,5 +409,6 @@ public class StorageView : MonoBehaviour
GameServices
.
inputService
.
pad
.
onTouchUp
-=
OnTouchUp
;
GameServices
.
inputService
.
pad
.
onTouchUp
-=
OnTouchUp
;
}
}
CancelDelayMatChangeHandle
();
CancelDelayMatChangeHandle
();
CancelRotateInvoke
();
}
}
}
}
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