Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
liwei_test_001
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
template admin
liwei_test_001
Commits
eae31185
Commit
eae31185
authored
Nov 29, 2022
by
liujiangnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test
parent
42df169f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
9 deletions
+9
-9
DragGameManager.ts
.../liwei_test_001/Script/Common/DragGame/DragGameManager.ts
+2
-2
DragGameOptionObject.ts
...i_test_001/Script/Common/DragGame/DragGameOptionObject.ts
+1
-1
DragGameOptionObject.ts.meta
...t_001/Script/Common/DragGame/DragGameOptionObject.ts.meta
+0
-0
Game.ts
assets/liwei_test_001/Script/Game/Game.ts
+3
-3
ItemAnswer.ts
assets/liwei_test_001/Script/Game/ItemAnswer.ts
+3
-3
No files found.
assets/liwei_test_001/Script/Common/DragGame/DragGameManager.ts
View file @
eae31185
...
...
@@ -2,7 +2,7 @@ import { DCGame } from "../../DataCenter/DCGame";
import
EventMgr
from
"
../Module/EventMgr/EventMgr
"
;
import
{
UICtrl
}
from
"
../UICtrl/UICtrl
"
;
import
{
DragGameAnswerObject
}
from
"
./DragGameAnswerObject
"
;
import
{
DragGameOptionObject
}
from
"
./DragGameOptionObject_001
"
;
import
{
DragGameOptionObject
_001
}
from
"
./DragGameOptionObject
"
;
//拖拽管理器
const
{
ccclass
,
property
}
=
cc
.
_decorator
;
...
...
@@ -41,7 +41,7 @@ export class DragGameManager extends UICtrl {
//获得目标点 一般是根据配置id从列表中获取到当前的节点,现在直接在初始化中设置好了,
let
nod
=
DCGame
.
getInstance
().
objOption
;
//查看当前节点的矩阵跟之前矩阵的包含情况
let
OptionAABB
=
nod
.
getComponent
(
DragGameOptionObject
).
setAABB
();
let
OptionAABB
=
nod
.
getComponent
(
DragGameOptionObject
_001
).
setAABB
();
let
AnswerAABB
=
this
.
getCallerAABB
(
nodAnswer
);
var
isIntersect
=
OptionAABB
.
containsRect
(
AnswerAABB
);
//判断是否被包含
...
...
assets/liwei_test_001/Script/Common/DragGame/DragGameOptionObject
_001
.ts
→
assets/liwei_test_001/Script/Common/DragGame/DragGameOptionObject.ts
View file @
eae31185
...
...
@@ -7,7 +7,7 @@ import { UICtrl } from "../UICtrl/UICtrl";
const
{
ccclass
,
property
}
=
cc
.
_decorator
;
@
ccclass
export
class
DragGameOptionObject
extends
UICtrl
{
export
class
DragGameOptionObject
_001
extends
UICtrl
{
onLoad
():
void
{
super
.
onLoad
();
...
...
assets/liwei_test_001/Script/Common/DragGame/DragGameOptionObject
_001
.ts.meta
→
assets/liwei_test_001/Script/Common/DragGame/DragGameOptionObject.ts.meta
View file @
eae31185
File moved
assets/liwei_test_001/Script/Game/Game.ts
View file @
eae31185
//游戏主逻辑
import
{
DragGameAnswerObject
}
from
"
../Common/DragGame/DragGameAnswerObject
"
;
import
{
DragGameOptionObject
}
from
"
../Common/DragGame/DragGameOptionObject_001
"
;
import
{
DragGameOptionObject
_001
}
from
"
../Common/DragGame/DragGameOptionObject
"
;
import
AssetMgr
from
"
../Common/Module/AssetMgr/AssetMgr
"
;
import
EventMgr
from
"
../Common/Module/EventMgr/EventMgr
"
;
import
{
UICtrl
}
from
"
../Common/UICtrl/UICtrl
"
;
...
...
@@ -238,8 +238,8 @@ export class Game extends UICtrl {
//初始化Group
initGroup
()
{
let
grop1
=
this
.
getOption
(
1
).
getComponent
(
DragGameOptionObject
)
let
grop2
=
this
.
getOption
(
2
).
getComponent
(
DragGameOptionObject
)
let
grop1
=
this
.
getOption
(
1
).
getComponent
(
DragGameOptionObject
_001
)
let
grop2
=
this
.
getOption
(
2
).
getComponent
(
DragGameOptionObject
_001
)
grop1
.
setData
(
DCGame
.
getInstance
().
getGroup1
());
grop2
.
setData
(
DCGame
.
getInstance
().
getGroup2
());
}
...
...
assets/liwei_test_001/Script/Game/ItemAnswer.ts
View file @
eae31185
const
{
ccclass
,
property
}
=
cc
.
_decorator
;
import
{
DragGameAnswerObject
}
from
"
../Common/DragGame/DragGameAnswerObject
"
;
import
{
DragGameOptionObject
}
from
"
../Common/DragGame/DragGameOptionObject_001
"
;
import
{
DragGameOptionObject
_001
}
from
"
../Common/DragGame/DragGameOptionObject
"
;
import
AssetMgr
from
"
../Common/Module/AssetMgr/AssetMgr
"
;
import
{
DCGame
,
Option
}
from
"
../DataCenter/DCGame
"
;
import
{
UICtrl
}
from
"
./../Common/UICtrl/UICtrl
"
;
...
...
@@ -72,7 +72,7 @@ export class ItemAnswer extends UICtrl {
.
to
(
0.4
,
{
scale
:
1.5
})
.
call
(()
=>
{
let
nodText
=
cc
.
instantiate
(
this
.
labText
.
node
);
objOption
.
getComponent
(
DragGameOptionObject
).
Effect_1
(
nodText
,
this
.
dmOption
);
objOption
.
getComponent
(
DragGameOptionObject
_001
).
Effect_1
(
nodText
,
this
.
dmOption
);
this
.
node
.
active
=
false
;
this
.
labText
.
node
.
color
=
cc
.
Color
.
WHITE
;
...
...
@@ -89,7 +89,7 @@ export class ItemAnswer extends UICtrl {
let
objOption
=
DCGame
.
getInstance
().
objOption
let
nodPic
=
cc
.
instantiate
(
this
.
sptPhoto
.
node
);
objOption
.
getComponent
(
DragGameOptionObject
).
Effect_2
(
nodPic
,
this
.
dmOption
);
objOption
.
getComponent
(
DragGameOptionObject
_001
).
Effect_2
(
nodPic
,
this
.
dmOption
);
this
.
node
.
active
=
false
;
// this.DragGameAnswerObject.setOldPosition();
...
...
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