Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
T
tuseGameColor
Project
Project
Details
Activity
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
shujianhe
tuseGameColor
Commits
df72c924
Commit
df72c924
authored
Aug 04, 2023
by
shujianhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
6c045fb5
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
151 additions
and
99 deletions
+151
-99
gameScene.unity
Assets/Scenes/gameScene.unity
+4
-0
NaivtDatas.cs
Assets/scripts/Datas/NaivtDatas.cs
+1
-0
gameEndLogic.cs
Assets/scripts/Views/gameScene/gameEndLogic.cs
+6
-2
gameSceneLogic.cs
Assets/scripts/Views/gameScene/gameSceneLogic.cs
+84
-34
gameUserInfos.cs
Assets/scripts/Views/gameScene/gameUserInfos.cs
+1
-1
Native.cs
Assets/scripts/Views/maingame/Native.cs
+1
-0
replayerBack.cs
Assets/scripts/Views/replayerScene/replayerBack.cs
+18
-11
mainGameView.cs
Assets/scripts/common/mainGameView.cs
+28
-26
colorItem.cs
Assets/scripts/perfabItems/colorItem.cs
+8
-25
No files found.
Assets/Scenes/gameScene.unity
View file @
df72c924
...
...
@@ -920,6 +920,10 @@ PrefabInstance:
propertyPath
:
m_AnchoredPosition.y
value
:
-707
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
282682974999690270
,
guid
:
e2f00cfdb21d04b46adf17805f74f20c
,
type
:
3
}
propertyPath
:
m_Sprite
value
:
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
318640049537846573
,
guid
:
e2f00cfdb21d04b46adf17805f74f20c
,
type
:
3
}
propertyPath
:
m_SizeDelta.x
value
:
585.1997
...
...
Assets/scripts/Datas/NaivtDatas.cs
View file @
df72c924
...
...
@@ -22,6 +22,7 @@ namespace Assets.scripts.Datas
public
int
autoSwitch
=
0
;
public
int
fillAnimation
=
0
;
public
int
vibration
=
0
;
public
string
name
=
"main"
;
public
string
getHighlightId
()
{
return
highlightId
.
ToString
();
...
...
Assets/scripts/Views/gameScene/gameEndLogic.cs
View file @
df72c924
...
...
@@ -163,7 +163,7 @@ public class gameEndLogic : MonoBehaviour,IEventHandler
GameObject
gameShowBase
=
transform
.
Find
(
"gameShowBase"
).
gameObject
;
Image
image
=
gameShowBase
.
GetComponent
<
Image
>();
Texture2D
texture
=
image
.
sprite
.
texture
;
//
Texture2D texture = image.sprite.texture;
//Color[] colors = texture.GetPixels(0, 0, texture.width, texture.height);
//int cout = utilsTools.checkResetYuanJiao(colors, texture.width, texture.height, 65);
//if (cout > 0)
...
...
@@ -234,5 +234,9 @@ public class gameEndLogic : MonoBehaviour,IEventHandler
}
}
}
public
void
OnDestroy
()
{
IRunEventManages
.
unOn
(
this
,
null
);
ActionManages
.
clearAllAction
();
}
}
Assets/scripts/Views/gameScene/gameSceneLogic.cs
View file @
df72c924
...
...
@@ -78,6 +78,7 @@ public class gameSceneLogic : MonoBehaviour, IEventHandler
transform
.
Find
(
"gameEndOperBase"
).
GetComponent
<
gameEndLogic
>().
initMember
();
transform
.
Find
(
"tipSelectGroup"
).
gameObject
.
SetActive
(
false
);
transform
.
Find
(
"top"
).
gameObject
.
SetActive
(
false
);
utilsTools
.
setGDataByKey
(
"PhoneOffsetValue"
,
50
);
utilsTools
.
addTimer_Sec
(
gameObject
,
"loopGetHot"
,
(
String
name
)
=>
{
addHotParams
<
float
>(
"TUSE_doubleTouchScale"
,
"doubleTouchScale"
,
float
.
TryParse
);
...
...
@@ -86,6 +87,7 @@ public class gameSceneLogic : MonoBehaviour, IEventHandler
addHotParams
<
float
>(
"TUSE_doubleTouchScale"
,
"doubleTouchScale"
,
float
.
TryParse
);
addHotParams
<
float
>(
"TUSE_doubleTouchScale"
,
"doubleTouchScale"
,
float
.
TryParse
);
addHotParams
<
float
>(
"TUSE_dyMinShowFontSize"
,
"dyMinShowFontSize"
,
float
.
TryParse
);
addHotParams
<
int
>(
"TUSE_PhoneOffsetValue"
,
"PhoneOffsetValue"
,
int
.
TryParse
);
return
true
;
},
3
,
0
);
utilsTools
.
resetGameObjectTreeSize
(
gameObject
,
(
String
path
)
=>
...
...
@@ -184,6 +186,23 @@ public class gameSceneLogic : MonoBehaviour, IEventHandler
}
var
maingameView
=
gameShowView
.
GetComponent
<
mainGameView
>();
int
idx
=
(
int
)
objects
[
0
];
bool
idxIsIndex
=
true
;
if
(
objects
.
Count
>
1
)
{
idxIsIndex
=
(
bool
)
objects
[
1
];
}
if
(
idxIsIndex
.
Equals
(
false
))
{
short
gid
=
(
short
)
idx
;
for
(
int
i
=
0
;
i
<
groupInfos
.
Count
;
i
++)
{
if
(
gid
.
Equals
(
groupInfos
[
i
].
gid
))
{
idx
=
i
;
break
;
}
}
}
nowidx
=
idx
;
var
nowSelectGroupId
=
groupInfos
[
idx
].
gid
;
item
=
gridViewList
.
getObjectById
(
idx
).
GetComponent
<
colorItem
>();
...
...
@@ -254,6 +273,16 @@ public class gameSceneLogic : MonoBehaviour, IEventHandler
{
int
width
,
height
;
mainview
.
getSize
(
out
width
,
out
height
);
short
ystart
=
(
short
)(
0
-
faulTolerant
+
y
);
short
yend
=
(
short
)(
0
+
faulTolerant
+
y
);
if
(
ystart
<
0
)
{
ystart
=
0
;
}
if
(
yend
>
height
)
{
yend
=
(
short
)
height
;
}
if
(
isFirst
)
{
int
flg
=
mainview
.
showAreaByPos
(
x
,
y
,
null
,
false
);
...
...
@@ -263,32 +292,50 @@ public class gameSceneLogic : MonoBehaviour, IEventHandler
}
else
if
(
flg
<
-
1
)
{
if
(
phoneClickByPos
(
ref
mainview
,
(
short
)(
x
+
faulTolerant
*
1.5
),
y
,
faulTolerant
,
false
))
return
true
;
if
(
phoneClickByPos
(
ref
mainview
,
(
short
)(
x
-
faulTolerant
*
1.5
),
y
,
faulTolerant
,
false
))
return
true
;
if
(
phoneClickByPos
(
ref
mainview
,
x
,
(
short
)(
y
+
faulTolerant
*
1.5
),
faulTolerant
,
false
))
return
true
;
if
(
phoneClickByPos
(
ref
mainview
,
x
,
(
short
)(
y
+
faulTolerant
*
1.5
),
faulTolerant
,
false
))
return
true
;
for
(
short
x1
=
(
short
)(
0
-
faulTolerant
);
x1
<
faulTolerant
;
x1
+=
2
)
{
short
x2
=
(
short
)(
x
+
x1
);
if
(
x2
<
0
||
x2
>=
width
)
{
continue
;
}
for
(
short
y1
=
ystart
;
y1
<
yend
;
y1
+=
2
)
{
//if (phoneClickByPos(ref mainview, x2, y1, faulTolerant, false)) return true;
if
(
mainview
.
showAreaByPos
(
x2
,
y1
,
null
,
false
)
>
0
)
{
return
true
;
}
}
}
if
(
phoneClickByPos
(
ref
mainview
,
(
short
)(
x
+
faulTolerant
),
(
short
)(
y
+
faulTolerant
),
faulTolerant
,
false
))
return
true
;
if
(
phoneClickByPos
(
ref
mainview
,
(
short
)(
x
+
faulTolerant
),
y
,
faulTolerant
,
false
))
return
true
;
if
(
phoneClickByPos
(
ref
mainview
,
(
short
)(
x
+
faulTolerant
),
(
short
)(
y
-
faulTolerant
),
faulTolerant
,
false
))
return
true
;
if
(
phoneClickByPos
(
ref
mainview
,
x
,
(
short
)(
y
-
faulTolerant
),
faulTolerant
,
false
))
return
true
;
if
(
phoneClickByPos
(
ref
mainview
,
x
,
(
short
)(
y
+
faulTolerant
),
faulTolerant
,
false
))
return
true
;
if
(
phoneClickByPos
(
ref
mainview
,
(
short
)(
x
-
faulTolerant
),
(
short
)(
y
+
faulTolerant
),
faulTolerant
,
false
))
return
true
;
if
(
phoneClickByPos
(
ref
mainview
,
(
short
)(
x
-
faulTolerant
),
y
,
faulTolerant
,
false
))
return
true
;
if
(
phoneClickByPos
(
ref
mainview
,
(
short
)(
x
-
faulTolerant
),
(
short
)(
y
-
faulTolerant
),
faulTolerant
,
false
))
return
true
;
return
false
;
}
}
short
ystart
=
(
short
)(
0
-
faulTolerant
+
y
);
short
yend
=
(
short
)(
0
-
faulTolerant
+
y
);
if
(
ystart
<
0
)
{
ystart
=
0
;
}
if
(
yend
>
height
)
{
yend
=
(
short
)
height
;
}
for
(
short
x1
=
(
short
)(
0
-
faulTolerant
);
x1
<
faulTolerant
;
x1
+=
2
)
for
(
short
x1
=
(
short
)(
0
-
faulTolerant
);
x1
<
faulTolerant
;
x1
+=
2
)
{
short
x2
=
(
short
)(
x
+
x1
);
if
(
x2
<
0
||
x2
>=
width
)
if
(
x2
<
0
||
x2
>=
width
)
{
continue
;
}
for
(
short
y1
=
ystart
;
y1
<
yend
;
y1
+=
2
)
for
(
short
y1
=
ystart
;
y1
<
yend
;
y1
+=
2
)
{
if
(
phoneClickByPos
(
ref
mainview
,
x2
,
y1
,
faulTolerant
,
false
))
return
true
;
//if (phoneClickByPos(ref mainview, x2, y1, faulTolerant, false)) return true;
if
(
mainview
.
showAreaByPos
(
x2
,
y1
,
null
,
false
)
>
0
)
{
return
true
;
}
}
}
return
false
;
...
...
@@ -310,14 +357,7 @@ public class gameSceneLogic : MonoBehaviour, IEventHandler
}
else
//手机不容易点中
{
short
faulTolerant
=
12
;
//for(short x1 = (short)(0 - faulTolerant);x1 < faulTolerant; x1++)
//{
// for(short y1 = (short)(0- faulTolerant);y1 < faulTolerant; y1++)
// {
// if(maingameView.showAreaByPos((short)(x+x1), (short)(y+y1), null) > 0) return;
// }
//}
short
faulTolerant
=
(
short
)(
utilsTools
.
getGDataByKey
<
int
>(
"PhoneOffsetValue"
,
50
));
phoneClickByPos
(
ref
maingameView
,
x
,
y
,
faulTolerant
,
true
);
}
...
...
@@ -556,13 +596,21 @@ public class gameSceneLogic : MonoBehaviour, IEventHandler
}
void
onGamePlayerEndHandlerEvent
(
List
<
UnityEngine
.
Object
>
uobjects
,
List
<
System
.
Object
>
objects
)
{
Debug
.
Log
(
"游戏完成,播放结束动画"
);
transform
.
Find
(
"gameProgressText"
).
gameObject
.
SetActive
(
false
);
transform
.
Find
(
"gameProgress"
).
gameObject
.
SetActive
(
false
);
areaGroupList
.
SetActive
(
false
);
transform
.
Find
(
"groupListBg"
).
gameObject
.
SetActive
(
false
);
gameEndLogic
gameEndlogic
=
transform
.
Find
(
"gameEndOperBase"
).
GetComponent
<
gameEndLogic
>();
gameEndlogic
.
initView
();
//Debug.Log("游戏完成,播放结束动画");
//transform.Find("gameProgressText").gameObject.SetActive(false);
//transform.Find("gameProgress").gameObject.SetActive(false);
//areaGroupList.SetActive(false);
//transform.Find("groupListBg").gameObject.SetActive(false);
//gameEndLogic gameEndlogic = transform.Find("gameEndOperBase").GetComponent<gameEndLogic>();
//gameEndlogic.initView();
//暂时调回放场景
utilsTools
.
sendEvent
(
"CloseScenePrve"
);
utilsTools
.
addTimer_Update
(
gameObject
,
"close"
,
(
String
name
)
=>
{
gameShowView
.
GetComponent
<
mainGameView
>().
onClear
();
SceneManager
.
LoadScene
(
"Scenes/replayeScene"
);
return
false
;
},
10
);
}
void
onSelectAreaEvent
(
List
<
UnityEngine
.
Object
>
uobjects
,
List
<
System
.
Object
>
objects
)
{
...
...
@@ -573,13 +621,15 @@ public class gameSceneLogic : MonoBehaviour, IEventHandler
if
(
nowAidByGid
!=
nowidx
)
return
;
if
(
groupInfos
!=
null
)
{
int
operId
=
0
;
int
operId
=
-
1
;
for
(
int
i
=
0
;
i
<
groupInfos
.
Count
;
i
++)
{
if
(
groupInfos
[
i
].
gid
.
Equals
(
nowAidByGid
))
{
operId
=
i
;
break
;
}
}
if
(
operId
.
Equals
(-
1
))
return
;
var
gridViewList
=
areaGroupList
.
GetComponent
<
gameSceneAreaGroupHandler
>();
colorItem
item
=
null
;
groupInfos
[
operId
].
show
++;
...
...
Assets/scripts/Views/gameScene/gameUserInfos.cs
View file @
df72c924
...
...
@@ -122,7 +122,7 @@ public class gameUserInfos : MonoBehaviour, IEventHandler
public
void
startId
(
string
id
,
netLableImageItem
jsondata
=
null
)
{
GameBackJavaData
gameBackJavaData
=
new
GameBackJavaData
();
gameBackJavaData
.
name
=
"main"
;
gameBackJavaData
.
name
=
utilsTools
.
getGDataByKey
<
string
>(
"Native_name"
,
""
)
;
gameBackJavaData
.
schedule
=
0
;
if
(
jsondata
!=
null
)
{
...
...
Assets/scripts/Views/maingame/Native.cs
View file @
df72c924
...
...
@@ -80,6 +80,7 @@ public class Native : MonoBehaviour
utilsTools
.
setGDataByKey
(
"highlight_areas"
,
settnigToGame
.
getHighlightId
());
utilsTools
.
setGDataByKey
(
"uid"
,
settnigToGame
.
uid
);
utilsTools
.
setGDataByKey
(
"fillanimation"
,
settnigToGame
.
getFillAnimation
());
utilsTools
.
setGDataByKey
(
"Native_name"
,
settnigToGame
.
name
);
}
...
...
Assets/scripts/Views/replayerScene/replayerBack.cs
View file @
df72c924
...
...
@@ -44,17 +44,17 @@ public class replayerBack : MonoBehaviour, IEventHandler
initData
();
return
false
;
},
5
);
string
tuijian
=
"{\"status\":200,\"msg\":\"请求成功\",\"sign\":\"\",\"result\":{\"data\":["
;
for
(
int
i
=
0
;
i
<
8
;
i
++)
{
tuijian
=
tuijian
+
json
+
","
;
}
tuijian
=
tuijian
+
json
+
"],\"extras\":null},\"enc\":null,\"security\":\"\"}"
;
utilsTools
.
addTimer_Sec
(
gameObject
,
"__"
,
(
string
_
)
=>
{
onTuiJianBack
(
tuijian
);
return
false
;
},
1
);
//
string tuijian = "{\"status\":200,\"msg\":\"请求成功\",\"sign\":\"\",\"result\":{\"data\":[";
//
for (int i = 0; i < 8; i++)
//
{
//
tuijian = tuijian + json + ",";
//
}
//
tuijian = tuijian + json + "],\"extras\":null},\"enc\":null,\"security\":\"\"}";
//
utilsTools.addTimer_Sec(gameObject, "__", (string _) =>
//
{
//
onTuiJianBack(tuijian);
//
return false;
//
}, 1);
transform
.
Find
(
"gameEndOperBase/gameShowBase/btnsBase/saveOptions"
).
gameObject
.
SetActive
(
false
);
showPageByJinDu
(
false
);
transform
.
Find
(
"clear"
).
gameObject
.
SetActive
(
false
);
...
...
@@ -110,6 +110,8 @@ public class replayerBack : MonoBehaviour, IEventHandler
{
gameScenUser
.
thumbnailUrl
=
jsonData
.
getSmallLineUrl
();
}
string
hist
=
utilsDB
.
getDBStringDataByKey
(
"history_"
+
jsonData
.
id
,
""
);
gameScenUser
.
setShowAreaids
(
hist
);
utilsTools
.
sendEventObjectParams
(
"initViewShowData"
,
gameScenUser
);
}
//onGameViewOnInitEndEvent
...
...
@@ -531,4 +533,9 @@ public class replayerBack : MonoBehaviour, IEventHandler
onSaveToMp4Handler
();
}
}
public
void
OnDestroy
()
{
IRunEventManages
.
unOn
(
this
,
null
);
ActionManages
.
clearAllAction
();
}
}
Assets/scripts/common/mainGameView.cs
View file @
df72c924
...
...
@@ -43,7 +43,7 @@ public class mainGameView : MonoBehaviour
protected
short
bianlun
=
-
1
;
protected
short
fullShow
=
-
2
;
protected
Texture2D
thumbnailTexture2d
=
null
;
private
bool
isDebugTestToEnd
=
fals
e
;
private
bool
isDebugTestToEnd
=
tru
e
;
public
GameObject
clickPosEff
=
null
;
Dictionary
<
string
,
Color
[
]>
allColor
=
new
Dictionary
<
string
,
Color
[
]>
();
[
SerializeField
]
...
...
@@ -1028,6 +1028,7 @@ public class mainGameView : MonoBehaviour
}
public
virtual
int
showAreaByPos
(
short
x
,
short
y
,
OnAreaHandler
showBack
,
bool
ignoreGid
=
false
)
{
Debug
.
Log
(
"x = "
+
x
.
ToSafeString
()
+
"y = "
+
y
.
ToSafeString
()
+
" ignoreGid = "
+
ignoreGid
.
ToSafeString
());
if
(
x
>=
digitMatrix
.
RowCount
||
y
>=
digitMatrix
.
ColumnCount
||
this
.
nowSelectgid
<
0
||
x
<
0
||
y
<
0
)
{
if
(
showBack
!=
null
)
...
...
@@ -1318,16 +1319,18 @@ public class mainGameView : MonoBehaviour
{
if
(
thumbnailTexture2d
!=
null
)
{
thumbnailTexture2d
.
SetPixels
(
allColor
[
"thumbnail"
]);
string
path
=
gameScenUseInfo
.
getLocalThumbnailPath
();
var
sltTextureSize
=
new
Vector2
(
400
,
400
);
// utilsTools.getGDataByKey<Vector2>("sltTextureSize", Vector2.one);
if
(
thumbnailTexture2d
.
width
.
Equals
(
thumbnailTexture2d
.
height
)
==
false
)
if
(
allColor
.
ContainsKey
(
"thumbnail"
))
{
sltTextureSize
=
new
Vector2
(
200
,
400
);
thumbnailTexture2d
.
SetPixels
(
allColor
[
"thumbnail"
]);
string
path
=
gameScenUseInfo
.
getLocalThumbnailPath
();
var
sltTextureSize
=
new
Vector2
(
400
,
400
);
// utilsTools.getGDataByKey<Vector2>("sltTextureSize", Vector2.one);
if
(
thumbnailTexture2d
.
width
.
Equals
(
thumbnailTexture2d
.
height
)
==
false
)
{
sltTextureSize
=
new
Vector2
(
200
,
400
);
}
utilsTools
.
saveByteToPath
(
utilsTools
.
ScaleTexture
(
thumbnailTexture2d
,
Convert
.
ToInt32
(
sltTextureSize
.
x
),
Convert
.
ToInt32
(
sltTextureSize
.
y
)).
EncodeToJPG
(),
path
);
utilsTools
.
saveByteToPath
(
thumbnailTexture2d
.
EncodeToJPG
(),
path
);
}
utilsTools
.
saveByteToPath
(
utilsTools
.
ScaleTexture
(
thumbnailTexture2d
,
Convert
.
ToInt32
(
sltTextureSize
.
x
),
Convert
.
ToInt32
(
sltTextureSize
.
y
)).
EncodeToJPG
(),
path
);
utilsTools
.
saveByteToPath
(
thumbnailTexture2d
.
EncodeToJPG
(),
path
);
Destroy
(
thumbnailTexture2d
);
thumbnailTexture2d
=
null
;
}
...
...
@@ -1377,26 +1380,25 @@ public class mainGameView : MonoBehaviour
//查找
utilsTools
.
addTimer_Sec
(
gameObject
,
"autoFill"
,
(
string
_
)
=>
{
short
aid
=
aids
[
idx
];
var
infos
=
gameidJsondata
.
getAid
(
aid
);
showAreaByPos
(
infos
.
px
,
infos
.
py
,
null
,
true
);
idx
++;
if
(
idx
.
Equals
(
aidsLen
))
{
utilsTools
.
setGDataByKey
(
"enableZoomMove"
,
true
);
return
false
;
}
aid
=
aids
[
idx
];
infos
=
gameidJsondata
.
getAid
(
aid
);
showAreaByPos
(
infos
.
px
,
infos
.
py
,
null
,
true
);
idx
++;
if
(
idx
.
Equals
(
aidsLen
))
for
(
int
i
=
0
;
i
<
2
;
i
++)
{
utilsTools
.
setGDataByKey
(
"enableZoomMove"
,
true
);
return
false
;
short
aid
=
aids
[
idx
];
var
infos
=
gameidJsondata
.
getAid
(
aid
);
if
(
infos
.
gid
.
Equals
(
nowSelectgid
)
==
false
)
{
int
gid
=
infos
.
gid
;
utilsTools
.
sendEventObjectParams
(
"switchGameAreaGroupId"
,
gid
,
false
);
}
showAreaByPos
(
infos
.
px
,
infos
.
py
,
null
,
true
);
idx
++;
if
(
idx
.
Equals
(
aidsLen
))
{
utilsTools
.
setGDataByKey
(
"enableZoomMove"
,
true
);
return
false
;
}
}
return
true
;
},
1
,
10
);
},
0.8
,
10
);
}
public
void
onTipHandler
()
{
...
...
Assets/scripts/perfabItems/colorItem.cs
View file @
df72c924
...
...
@@ -23,25 +23,6 @@ public class colorItem : MonoBehaviour
private
List
<
Vector2
>
initScaleSize
=
new
List
<
Vector2
>();
private
float
offset
=
0
;
void
initMember1
()
{
if
(
effectImg
==
null
)
{
var
selfRectTrans
=
GetComponent
<
RectTransform
>();
normalScale
=
transform
.
localScale
*
0.85f
;
transform
.
localScale
=
normalScale
;
Vector2
listViewTempCellSize
=
utilsTools
.
getGDataByKey
<
Vector2
>(
"listViewTempCellSize"
,
Vector2
.
zero
);
var
size1
=
listViewTempCellSize
;
// new Vector2(selfRectTrans.sizeDelta.x * selfRectTrans.localScale.x, selfRectTrans.sizeDelta.y * selfRectTrans.localScale.y);
for
(
int
i
=
0
;
i
<
transform
.
childCount
;
i
++)
{
var
temp
=
transform
.
GetChild
(
i
).
GetComponent
<
RectTransform
>();
temp
.
localScale
=
new
Vector3
(
temp
.
localScale
.
x
*
size1
.
x
/
125f
/
1.2f
,
temp
.
localScale
.
y
*
size1
.
y
/
125f
/
1.2f
);
initScaleSize
.
Add
(
new
Vector2
(
temp
.
localScale
.
x
,
temp
.
localScale
.
y
));
}
effectImg
=
transform
.
Find
(
"circle"
).
GetComponent
<
gameGroupEffect
>();
}
}
void
initMember
()
{
if
(
effectImg
==
null
)
...
...
@@ -89,16 +70,18 @@ public class colorItem : MonoBehaviour
transform
.
localPosition
=
new
Vector2
(
x
,
0
-
(
transform
.
localScale
.
y
*
rectTransform
.
rect
.
height
)
/
2
-
offset
);
ActionManages
.
addMoveByScale
(
gameObject
,
normalScale
,
0.25f
);
}
ActionManages
.
addCallBackByLen
(
gameObject
,
1000
,
0.25f
,
(
float
_
)
=>
{
transform
.
localPosition
=
new
Vector2
(
x
,
0
-
(
transform
.
localScale
.
y
*
rectTransform
.
rect
.
height
)
/
2
-
offset
);
//transform.localPosition = new Vector2(x, 0 - (transform.localScale.y * rectTransform.rect.height) / 2 - offset);
rectTransform
.
anchoredPosition
=
new
Vector2
(
rectTransform
.
anchoredPosition
.
x
,
0
);
},
(
GameObject
gobject
,
int
id
)
=>
{
float
a
=
transform
.
localScale
.
y
*
rectTransform
.
rect
.
height
;
transform
.
localPosition
=
new
Vector2
(
x
,
0
-
(
transform
.
localScale
.
y
*
rectTransform
.
rect
.
height
)
/
2
-
offset
);
//float a = transform.localScale.y * rectTransform.rect.height;
//transform.localPosition = new Vector2(x, 0 - (transform.localScale.y * rectTransform.rect.height) / 2 - offset);
rectTransform
.
anchoredPosition
=
new
Vector2
(
rectTransform
.
anchoredPosition
.
x
,
0
);
});
}
public
void
switchPlayAnimation1
()
...
...
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