Commit eae31185 authored by liujiangnan's avatar liujiangnan

test

parent 42df169f
...@@ -2,7 +2,7 @@ import { DCGame } from "../../DataCenter/DCGame"; ...@@ -2,7 +2,7 @@ import { DCGame } from "../../DataCenter/DCGame";
import EventMgr from "../Module/EventMgr/EventMgr"; import EventMgr from "../Module/EventMgr/EventMgr";
import { UICtrl } from "../UICtrl/UICtrl"; import { UICtrl } from "../UICtrl/UICtrl";
import { DragGameAnswerObject } from "./DragGameAnswerObject"; import { DragGameAnswerObject } from "./DragGameAnswerObject";
import { DragGameOptionObject } from "./DragGameOptionObject_001"; import { DragGameOptionObject_001 } from "./DragGameOptionObject";
//拖拽管理器 //拖拽管理器
const { ccclass, property } = cc._decorator; const { ccclass, property } = cc._decorator;
...@@ -41,7 +41,7 @@ export class DragGameManager extends UICtrl { ...@@ -41,7 +41,7 @@ export class DragGameManager extends UICtrl {
//获得目标点 一般是根据配置id从列表中获取到当前的节点,现在直接在初始化中设置好了, //获得目标点 一般是根据配置id从列表中获取到当前的节点,现在直接在初始化中设置好了,
let nod = DCGame.getInstance().objOption; let nod = DCGame.getInstance().objOption;
//查看当前节点的矩阵跟之前矩阵的包含情况 //查看当前节点的矩阵跟之前矩阵的包含情况
let OptionAABB = nod.getComponent(DragGameOptionObject).setAABB(); let OptionAABB = nod.getComponent(DragGameOptionObject_001).setAABB();
let AnswerAABB = this.getCallerAABB(nodAnswer); let AnswerAABB = this.getCallerAABB(nodAnswer);
var isIntersect = OptionAABB.containsRect(AnswerAABB);//判断是否被包含 var isIntersect = OptionAABB.containsRect(AnswerAABB);//判断是否被包含
......
...@@ -7,7 +7,7 @@ import { UICtrl } from "../UICtrl/UICtrl"; ...@@ -7,7 +7,7 @@ import { UICtrl } from "../UICtrl/UICtrl";
const { ccclass, property } = cc._decorator; const { ccclass, property } = cc._decorator;
@ccclass @ccclass
export class DragGameOptionObject extends UICtrl { export class DragGameOptionObject_001 extends UICtrl {
onLoad(): void { onLoad(): void {
super.onLoad(); super.onLoad();
......
//游戏主逻辑 //游戏主逻辑
import { DragGameAnswerObject } from "../Common/DragGame/DragGameAnswerObject"; 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 AssetMgr from "../Common/Module/AssetMgr/AssetMgr";
import EventMgr from "../Common/Module/EventMgr/EventMgr"; import EventMgr from "../Common/Module/EventMgr/EventMgr";
import { UICtrl } from "../Common/UICtrl/UICtrl"; import { UICtrl } from "../Common/UICtrl/UICtrl";
...@@ -238,8 +238,8 @@ export class Game extends UICtrl { ...@@ -238,8 +238,8 @@ export class Game extends UICtrl {
//初始化Group //初始化Group
initGroup() { initGroup() {
let grop1 = this.getOption(1).getComponent(DragGameOptionObject) let grop1 = this.getOption(1).getComponent(DragGameOptionObject_001)
let grop2 = this.getOption(2).getComponent(DragGameOptionObject) let grop2 = this.getOption(2).getComponent(DragGameOptionObject_001)
grop1.setData(DCGame.getInstance().getGroup1()); grop1.setData(DCGame.getInstance().getGroup1());
grop2.setData(DCGame.getInstance().getGroup2()); grop2.setData(DCGame.getInstance().getGroup2());
} }
......
const { ccclass, property } = cc._decorator; const { ccclass, property } = cc._decorator;
import { DragGameAnswerObject } from "../Common/DragGame/DragGameAnswerObject"; 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 AssetMgr from "../Common/Module/AssetMgr/AssetMgr";
import { DCGame, Option } from "../DataCenter/DCGame"; import { DCGame, Option } from "../DataCenter/DCGame";
import { UICtrl } from "./../Common/UICtrl/UICtrl"; import { UICtrl } from "./../Common/UICtrl/UICtrl";
...@@ -72,7 +72,7 @@ export class ItemAnswer extends UICtrl { ...@@ -72,7 +72,7 @@ export class ItemAnswer extends UICtrl {
.to(0.4, { scale: 1.5 }) .to(0.4, { scale: 1.5 })
.call(() => { .call(() => {
let nodText = cc.instantiate(this.labText.node); 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.node.active = false;
this.labText.node.color = cc.Color.WHITE; this.labText.node.color = cc.Color.WHITE;
...@@ -89,7 +89,7 @@ export class ItemAnswer extends UICtrl { ...@@ -89,7 +89,7 @@ export class ItemAnswer extends UICtrl {
let objOption = DCGame.getInstance().objOption let objOption = DCGame.getInstance().objOption
let nodPic = cc.instantiate(this.sptPhoto.node); 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.node.active = false;
// this.DragGameAnswerObject.setOldPosition(); // this.DragGameAnswerObject.setOldPosition();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment