Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
new_taobao
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
wildfirecode13
new_taobao
Commits
55068487
Commit
55068487
authored
Sep 27, 2020
by
AU-Pro-mac
Browse files
Options
Browse Files
Download
Plain Diff
fix conflect
parents
904eaecc
229b0962
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
615 additions
and
113 deletions
+615
-113
copyJs.js
project/src/canvas/game/scripts/copyJs.js
+16
-16
StartScene.ts
project/src/canvas/game/src/scenes/StartScene.ts
+0
-1
CircleItem.ts
project/src/canvas/game/src/xiaoxiaole/CircleItem.ts
+61
-0
MainScene.ts
project/src/canvas/game/src/xiaoxiaole/MainScene.ts
+0
-89
ObjectPool.ts
project/src/canvas/game/src/xiaoxiaole/ObjectPool.ts
+28
-0
XxlScene.ts
project/src/canvas/game/src/xiaoxiaole/XxlScene.ts
+510
-7
No files found.
project/src/canvas/game/scripts/copyJs.js
View file @
55068487
var
fs
=
require
(
"fs"
);
var
fs
=
require
(
"fs"
);
// fs.writeFileSync(
// fs.writeFileSync(
// "./released/output.js",
// "./released/output.js",
// fs.readFileSync("./output.js")
// fs.readFileSync("./output.js")
// )
// )
// var endPath = 'D:/duibaGame/测试项目0527/taobaominiTest/client/pages/index1/';
// var endPath = 'D:/duibaGame/测试项目0527/taobaominiTest/client/pages/index1/';
var
endPath
=
'/Applications/DUIBA-TAOBAO/YD/new_taobao/taobao_mini/client/pages/pagecanvas/'
;
var
endPath
=
'/Applications/DUIBA-TAOBAO/YD/new_taobao/taobao_mini/client/pages/pagecanvas/'
;
var
version
=
Math
.
round
(
new
Date
().
getTime
()
/
1000
);
var
version
=
Math
.
round
(
new
Date
().
getTime
()
/
1000
);
// fs.writeFileSync(endPath + "output." + version + ".js", fs.readFileSync("./released/output.js"));
// fs.writeFileSync(endPath + "output." + version + ".js", fs.readFileSync("./released/output.js"));
fs
.
writeFileSync
(
endPath
+
"output.js"
,
fs
.
readFileSync
(
"./released/output.js"
));
fs
.
writeFileSync
(
endPath
+
"output.js"
,
fs
.
readFileSync
(
"./released/output.js"
));
// console.log("js覆盖完成")
// console.log("js覆盖完成")
console
.
log
(
`版本号:
console
.
log
(
`版本号:
${
version
}
`
)
${
version
}
`
)
\ No newline at end of file
project/src/canvas/game/src/scenes/StartScene.ts
View file @
55068487
...
@@ -3,7 +3,6 @@ import { RES } from "../../module/RES";
...
@@ -3,7 +3,6 @@ import { RES } from "../../module/RES";
import
Root
from
"./Root"
;
import
Root
from
"./Root"
;
// import res from "../../test/output.json"
// import res from "../../test/output.json"
import
resCanvasList
from
"../../../game/resCanvasList"
import
resCanvasList
from
"../../../game/resCanvasList"
import
{
MainScene
}
from
"../xiaoxiaole/MainScene"
;
import
{
Ins
}
from
"../Ins"
;
import
{
Ins
}
from
"../Ins"
;
import
{
changeScene
,
showPanel
}
from
"../../module/ctrls"
;
import
{
changeScene
,
showPanel
}
from
"../../module/ctrls"
;
import
{
SelectCatPanel
}
from
"../panels/selectcatpanel/SelectCatPanel"
;
import
{
SelectCatPanel
}
from
"../panels/selectcatpanel/SelectCatPanel"
;
...
...
project/src/canvas/game/src/xiaoxiaole/CircleItem.ts
0 → 100644
View file @
55068487
import
{
RES
}
from
"../../module/RES"
;
import
resCanvasList
from
"../../resCanvasList"
;
declare
interface
point
{
x
:
number
;
y
:
number
;
}
export
default
class
CircleItem
extends
FYGE
.
Sprite
{
//类型
type
:
number
circleRes
=
[
'2a747211-0210-4215-86a2-a6955b37c45b'
,
'7d1ec658-9371-4d52-b4d7-e75d04037daf'
,
'6a1345f6-969c-4969-8bfb-f4de637df34d'
,
'2e12a9ec-46be-487f-a9cd-550dd0af3746'
]
point
:
point
index
:
number
nnnn
:
number
constructor
(
type
:
number
,
point
:
point
,
index
:
number
)
{
super
();
this
.
type
=
type
this
.
point
=
{
x
:
point
.
x
+
39
,
y
:
point
.
y
+
39
}
this
.
x
=
point
.
x
this
.
y
=
point
.
y
this
.
index
=
index
this
.
texture
=
RES
.
getRes
(
resCanvasList
[
this
.
circleRes
[
type
]].
url
);
}
toBig
()
{
console
.
log
(
"变大"
)
this
.
scaleX
=
1.1
this
.
scaleY
=
1.1
}
toNormal
()
{
this
.
scaleY
=
this
.
scaleX
=
1
}
changeConfig
(
type
:
number
,
point
:
point
,
index
:
number
)
{
this
.
type
=
type
this
.
point
=
{
x
:
point
.
x
+
39
,
y
:
point
.
y
+
39
}
this
.
x
=
point
.
x
this
.
y
=
point
.
y
this
.
index
=
index
this
.
texture
=
RES
.
getRes
(
resCanvasList
[
this
.
circleRes
[
type
]].
url
);
}
}
project/src/canvas/game/src/xiaoxiaole/MainScene.ts
deleted
100644 → 0
View file @
904eaecc
import
{
Scene
}
from
"../../module/views/Scene"
;
import
resCanvasList
from
"../../resCanvasList"
;
import
{
RES
}
from
"../../module/RES"
;
import
{
Ins
}
from
"../Ins"
;
import
{
MainSceneBtnUi
}
from
"../ui/mainSceneBtnUi"
;
import
{
MSG
,
SCENETYPE
}
from
"../Enum"
;
import
{
showToast
}
from
"../../module/ctrls"
;
import
{
GDispatcher
}
from
"../Main"
;
import
{
Cat
}
from
"../cat/Cat"
;
import
{
Tools
}
from
"../Tools"
;
export
class
MainScene
extends
Scene
{
bg
:
FYGE
.
Sprite
initUi
()
{
var
that
=
this
;
that
.
initSceneEle
();
this
.
bg
=
Ins
.
initSprite
(
"7fcd3fb3-57bd-436a-afca-989b68b6b311"
)
this
.
addChild
(
this
.
bg
);
this
.
x
=
(
Ins
.
stageW
-
750
)
>>
1
;
this
.
y
=
(
Ins
.
stageH
-
1624
)
>>
1
;
this
.
setHexagram
(
7
)
}
// 初始化六角形4/7/10/13/16....
setHexagram
(
max
:
number
)
{
let
c
=
Math
.
ceil
(
max
/
2
)
let
x
=
(
2
*
max
+
1
)
/
3
let
str
=
""
for
(
let
i
=
0
;
i
<
2
*
max
-
x
;
i
++
)
{
if
(
i
<
max
-
x
)
{
for
(
let
j
=
0
;
j
<=
i
;
j
++
)
{
str
+=
`
${
j
}
`
}
str
+=
'
\
n'
}
else
if
(
i
>=
max
-
x
&&
i
<=
c
)
{
console
.
log
(
i
,
max
-
i
-
2
+
x
)
for
(
let
j
=
max
-
i
-
2
+
x
;
j
>
0
;
j
--
)
{
str
+=
`
${
j
}
`
}
str
+=
'
\
n'
}
else
if
(
i
>
c
&&
i
<
max
)
{
for
(
let
j
=
0
;
j
<
i
+
1
;
j
++
)
{
str
+=
`
${
j
}
`
}
str
+=
'
\
n'
}
else
{
for
(
let
j
=
max
-
i
-
2
+
x
;
j
>
0
;
j
--
)
{
str
+=
`
${
j
}
`
}
str
+=
'
\
n'
}
}
console
.
log
(
str
)
}
/**初始化场景元素 */
initSceneEle
()
{
console
.
log
(
1111
)
}
initEvents
()
{
var
that
=
this
;
console
.
log
(
"主场景添加事件"
)
// that.tlBtn.addEventListener(FYGE.MouseEvent.CLICK,()=>{that.changeMainScene(SCENETYPE.CLASSROOM)},that);
// that.mxqBtn.addEventListener(FYGE.MouseEvent.CLICK,()=>{that.changeMainScene(SCENETYPE.PLAYGROUND)},that);
// FYGE.GDispatcher.addEventListener(MSG.CHANGE_SCENE,()=>{that.changeMainScene(SCENETYPE.BEADROOM)},that);
}
removeEvents
()
{
var
that
=
this
;
console
.
log
(
"主场景移除事件"
)
// that.tlBtn.removeEventListener(FYGE.MouseEvent.CLICK,()=>{that.changeMainScene(SCENETYPE.CLASSROOM)},that);
// that.mxqBtn.removeEventListener(FYGE.MouseEvent.CLICK,()=>{that.changeMainScene(SCENETYPE.PLAYGROUND)},that);
// FYGE.GDispatcher.removeEventListener(MSG.CHANGE_SCENE,()=>{that.changeMainScene(SCENETYPE.BEADROOM)},that);
}
}
\ No newline at end of file
project/src/canvas/game/src/xiaoxiaole/ObjectPool.ts
0 → 100644
View file @
55068487
import
CircleItem
from
"./CircleItem"
declare
interface
point
{
x
:
number
;
y
:
number
;
}
export
class
ObjectPool
{
_circleItemPool
:
CircleItem
[]
=
[]
getItem
(
type
:
number
,
ponit
:
point
,
index
:
number
):
CircleItem
{
// console.log(this._circleItemPool.length)
let
co
=
this
.
_circleItemPool
.
shift
()
if
(
co
)
{
co
.
changeConfig
(
type
,
ponit
,
index
)
}
return
co
||
new
CircleItem
(
type
,
ponit
,
index
)
}
putItem
(
co
:
CircleItem
)
{
if
(
co
.
parent
)
{
co
.
parent
.
removeChild
(
co
)
}
this
.
_circleItemPool
.
push
(
co
)
}
}
\ No newline at end of file
project/src/canvas/game/src/xiaoxiaole/XxlScene.ts
View file @
55068487
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