Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zeroing-libs
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
劳工
zeroing-libs
Commits
fe477e13
Commit
fe477e13
authored
Dec 05, 2019
by
rockyl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
解决设置属性问题
解决回退场景问题
parent
9b0501ea
Changes
14
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
21 additions
and
19 deletions
+21
-19
pop-scene.json
dist/processes/view/pop-scene.json
+1
-1
set-mouse-enabled.json
dist/processes/view/set-mouse-enabled.json
+1
-1
set-node-property.json
dist/processes/view/set-node-property.json
+1
-1
set-node-visibility.json
dist/processes/view/set-node-visibility.json
+1
-1
set-script-enabled.json
dist/processes/view/set-script-enabled.json
+1
-1
set-script-property.json
dist/processes/view/set-script-property.json
+1
-1
buried-point.json
dist/scripts/buried-point.json
+1
-1
index.ts
src/process/view/pop-scene/index.ts
+2
-2
index.ts
src/process/view/set-mouse-enabled/index.ts
+1
-1
index.ts
src/process/view/set-node-property/index.ts
+1
-1
index.ts
src/process/view/set-node-visibility/index.ts
+4
-2
index.ts
src/process/view/set-script-enabled/index.ts
+1
-1
index.ts
src/process/view/set-script-property/index.ts
+1
-1
index.ts
src/script/buried-point/index.ts
+4
-4
No files found.
dist/processes/view/pop-scene.json
View file @
fe477e13
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
"complete"
"complete"
],
],
"id"
:
"pop-scene"
,
"id"
:
"pop-scene"
,
"script"
:
"if (props.closeAll) {
\n
if (!props.viewName) {
\n
console.log('没有设置视图名');
\n
next('exception', '没有设置视图名');
\n
}
\n
else {
\n
var gameStage = engine.gameStage;
\n
var viewConfig = gameStage.getViewConfigByName(props.viewName);
\n
if (viewConfig) {
\n
var view = engine.instantiate(viewConfig);
\n
gameStage.sceneContainer.push(view);
\n
}
\n
else {
\n
console.error('view config not exists');
\n
}
\n
next('complete');
\n
}
\n
}
\n
else {
\n
engine.gameStage.
popup
Container.pop();
\n
next('complete');
\n
}
\n
"
,
"script"
:
"if (props.closeAll) {
\n
if (!props.viewName) {
\n
console.log('没有设置视图名');
\n
next('exception', '没有设置视图名');
\n
}
\n
else {
\n
var gameStage = engine.gameStage;
\n
var viewConfig = gameStage.getViewConfigByName(props.viewName);
\n
if (viewConfig) {
\n
var view = engine.instantiate(viewConfig);
\n
gameStage.sceneContainer.push(view);
\n
}
\n
else {
\n
console.error('view config not exists');
\n
}
\n
next('complete');
\n
}
\n
}
\n
else {
\n
engine.gameStage.
scene
Container.pop();
\n
next('complete');
\n
}
\n
"
,
"group"
:
"view"
,
"group"
:
"view"
,
"type"
:
"builtin"
"type"
:
"builtin"
}
}
dist/processes/view/set-mouse-enabled.json
View file @
fe477e13
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
"success"
"success"
],
],
"id"
:
"set-mouse-enabled"
,
"id"
:
"set-mouse-enabled"
,
"script"
:
"var targetNode =
target || props.
target;
\n
if (targetNode) {
\n
targetNode.mouseEnabled = props.enabled;
\n
}
\n
next('success', args);
\n
"
,
"script"
:
"var targetNode =
props.target ||
target;
\n
if (targetNode) {
\n
targetNode.mouseEnabled = props.enabled;
\n
}
\n
next('success', args);
\n
"
,
"group"
:
"view"
,
"group"
:
"view"
,
"type"
:
"builtin"
"type"
:
"builtin"
}
}
dist/processes/view/set-node-property.json
View file @
fe477e13
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
"success"
"success"
],
],
"id"
:
"set-node-property"
,
"id"
:
"set-node-property"
,
"script"
:
"var targetNode =
target || props.
target;
\n
if (targetNode) {
\n
var field = props.field, valueType = props.valueType, value = props.value;
\n
if (field && value) {
\n
var tValue = void 0;
\n
switch (valueType) {
\n
case 'number':
\n
tValue = parseFloat(value);
\n
break;
\n
case 'string':
\n
tValue = value;
\n
break;
\n
case 'boolean':
\n
tValue = value === 'true' ? true : (value === 'false' ? false : value);
\n
break;
\n
}
\n
if (tValue !== undefined) {
\n
targetNode[field] = tValue;
\n
}
\n
}
\n
}
\n
next('success', args);
\n
"
,
"script"
:
"var targetNode =
props.target ||
target;
\n
if (targetNode) {
\n
var field = props.field, valueType = props.valueType, value = props.value;
\n
if (field && value) {
\n
var tValue = void 0;
\n
switch (valueType) {
\n
case 'number':
\n
tValue = parseFloat(value);
\n
break;
\n
case 'string':
\n
tValue = value;
\n
break;
\n
case 'boolean':
\n
tValue = value === 'true' ? true : (value === 'false' ? false : value);
\n
break;
\n
}
\n
if (tValue !== undefined) {
\n
targetNode[field] = tValue;
\n
}
\n
}
\n
}
\n
next('success', args);
\n
"
,
"group"
:
"view"
,
"group"
:
"view"
,
"type"
:
"builtin"
"type"
:
"builtin"
}
}
dist/processes/view/set-node-visibility.json
View file @
fe477e13
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
"success"
"success"
],
],
"id"
:
"set-node-visibility"
,
"id"
:
"set-node-visibility"
,
"script"
:
"var
targetNode = target || props.target;
\n
if (targetNode) {
\n
targetNode.visible = props.
visible;
\n
}
\n
next('success', args);
\n
"
,
"script"
:
"var
visible = engine.findVariable('visible', args, props);
\n
var targetNode = props.target || target;
\n
if (targetNode) {
\n
targetNode.visible =
visible;
\n
}
\n
next('success', args);
\n
"
,
"group"
:
"view"
,
"group"
:
"view"
,
"type"
:
"builtin"
"type"
:
"builtin"
}
}
dist/processes/view/set-script-enabled.json
View file @
fe477e13
...
@@ -24,7 +24,7 @@
...
@@ -24,7 +24,7 @@
"success"
"success"
],
],
"id"
:
"set-script-enabled"
,
"id"
:
"set-script-enabled"
,
"script"
:
"var targetNode =
target || props.
target;
\n
if (targetNode) {
\n
var scriptsProxy = targetNode.scriptsProxy;
\n
var scriptIndex = props.scriptIndex, scriptName = props.scriptName, enabled = props.enabled;
\n
if (scriptIndex !== undefined) {
\n
var script = scriptsProxy.all[scriptIndex];
\n
if (script) {
\n
script.disabled = !enabled;
\n
}
\n
}
\n
else if (scriptName !== undefined) {
\n
var scripts = scriptsProxy.get(scriptName);
\n
for (var _i = 0, scripts_1 = scripts; _i < scripts_1.length; _i++) {
\n
var script = scripts_1[_i];
\n
script.disabled = !enabled;
\n
}
\n
}
\n
}
\n
next('success', args);
\n
"
,
"script"
:
"var targetNode =
props.target ||
target;
\n
if (targetNode) {
\n
var scriptsProxy = targetNode.scriptsProxy;
\n
var scriptIndex = props.scriptIndex, scriptName = props.scriptName, enabled = props.enabled;
\n
if (scriptIndex !== undefined) {
\n
var script = scriptsProxy.all[scriptIndex];
\n
if (script) {
\n
script.disabled = !enabled;
\n
}
\n
}
\n
else if (scriptName !== undefined) {
\n
var scripts = scriptsProxy.get(scriptName);
\n
for (var _i = 0, scripts_1 = scripts; _i < scripts_1.length; _i++) {
\n
var script = scripts_1[_i];
\n
script.disabled = !enabled;
\n
}
\n
}
\n
}
\n
next('success', args);
\n
"
,
"group"
:
"view"
,
"group"
:
"view"
,
"type"
:
"builtin"
"type"
:
"builtin"
}
}
dist/processes/view/set-script-property.json
View file @
fe477e13
...
@@ -37,7 +37,7 @@
...
@@ -37,7 +37,7 @@
"success"
"success"
],
],
"id"
:
"set-script-property"
,
"id"
:
"set-script-property"
,
"script"
:
"var targetNode =
target || props.
target;
\n
if (targetNode) {
\n
var scriptsProxy = targetNode.scriptsProxy;
\n
var scriptIndex = props.scriptIndex, scriptName = props.scriptName, enabled = props.enabled;
\n
var script = void 0;
\n
if (scriptIndex !== undefined) {
\n
script = scriptsProxy.all[scriptIndex];
\n
}
\n
else if (scriptName !== undefined) {
\n
script = scriptsProxy.get(scriptName);
\n
}
\n
if (script) {
\n
var field = props.field, valueType = props.valueType, value = props.value;
\n
if (field && value) {
\n
var tValue = void 0;
\n
switch (valueType) {
\n
case 'number':
\n
tValue = parseFloat(value);
\n
break;
\n
case 'string':
\n
tValue = value;
\n
break;
\n
case 'boolean':
\n
tValue = value === 'true' ? true : (value === 'false' ? false : value);
\n
break;
\n
}
\n
if (tValue !== undefined) {
\n
script[field] = tValue;
\n
}
\n
}
\n
}
\n
}
\n
next('success', args);
\n
"
,
"script"
:
"var targetNode =
props.target ||
target;
\n
if (targetNode) {
\n
var scriptsProxy = targetNode.scriptsProxy;
\n
var scriptIndex = props.scriptIndex, scriptName = props.scriptName, enabled = props.enabled;
\n
var script = void 0;
\n
if (scriptIndex !== undefined) {
\n
script = scriptsProxy.all[scriptIndex];
\n
}
\n
else if (scriptName !== undefined) {
\n
script = scriptsProxy.get(scriptName);
\n
}
\n
if (script) {
\n
var field = props.field, valueType = props.valueType, value = props.value;
\n
if (field && value) {
\n
var tValue = void 0;
\n
switch (valueType) {
\n
case 'number':
\n
tValue = parseFloat(value);
\n
break;
\n
case 'string':
\n
tValue = value;
\n
break;
\n
case 'boolean':
\n
tValue = value === 'true' ? true : (value === 'false' ? false : value);
\n
break;
\n
}
\n
if (tValue !== undefined) {
\n
script[field] = tValue;
\n
}
\n
}
\n
}
\n
}
\n
next('success', args);
\n
"
,
"group"
:
"view"
,
"group"
:
"view"
,
"type"
:
"builtin"
"type"
:
"builtin"
}
}
dist/scripts/buried-point.json
View file @
fe477e13
...
@@ -18,5 +18,5 @@
...
@@ -18,5 +18,5 @@
}
}
},
},
"id"
:
"buried-point"
,
"id"
:
"buried-point"
,
"code"
:
"
\"
use strict
\"
;
\n
Object.defineProperty(exports,
\"
__esModule
\"
, { value: true });
\n
var BuriedPoint = (function (_super) {
\n
__extends(BuriedPoint, _super);
\n
function BuriedPoint() {
\n
var _this = _super !== null && _super.apply(this, arguments) || this;
\n
_this.dpm = '0.0.0.0';
\n
_this.dcm = '0.0.0.0';
\n
_this.dom = '0.0.0.0';
\n
return _this;
\n
}
\n
BuriedPoint.prototype.mounted = function () {
\n
this.dpm &&
fill(this.dpm);
\n
this.dcm && fill(this.dcm);
\n
this.dom && fill(this.dom);
\n
this.host.addEventListener(engine.MouseEvent.CLICK, this._onClick, this);
\n
};
\n
BuriedPoint.prototype.awake = function () {
\n
log('exposure', this);
\n
};
\n
BuriedPoint.prototype._onClick = function (e) {
\n
log('click', this);
\n
};
\n
BuriedPoint.id = 'buried-point';
\n
return BuriedPoint;
\n
}(engine.ScriptBase));
\n
exports.default = BuriedPoint;
\n
function fill(src) {
\n
var result = src;
\n
for (var key in engine.env) {
\n
result = result.replace(key, engine.env[key]);
\n
}
\n
return result;
\n
}
\n
function log(type, data) {
\n
var dpm = data.dpm, dcm = data.dcm, dom = data.dom;
\n
var params = {
\n
dpm: dpm, dcm: dcm, appID: engine.env.appID, projectID: engine.env.projectID
\n
};
\n
if (dom !== '0.0.0.0') {
\n
params.dom = dom;
\n
}
\n
var isExposure = type === 'exposure';
\n
engine.httpRequest(null, isExposure ? '//embedlog.duiba.com.cn/exposure/standard' : '/log/click', 'get', params, isExposure ? 'jsonp' : 'text');
\n
}
\n
"
"code"
:
"
\"
use strict
\"
;
\n
Object.defineProperty(exports,
\"
__esModule
\"
, { value: true });
\n
var BuriedPoint = (function (_super) {
\n
__extends(BuriedPoint, _super);
\n
function BuriedPoint() {
\n
var _this = _super !== null && _super.apply(this, arguments) || this;
\n
_this.dpm = '0.0.0.0';
\n
_this.dcm = '0.0.0.0';
\n
_this.dom = '0.0.0.0';
\n
return _this;
\n
}
\n
BuriedPoint.prototype.mounted = function () {
\n
this.dpm &&
(this.dpm = fill(this.dpm));
\n
this.dcm && (this.dcm = fill(this.dcm));
\n
this.dom && (this.dom = fill(this.dom));
\n
this.host.addEventListener(engine.MouseEvent.CLICK, this._onClick, this);
\n
};
\n
BuriedPoint.prototype.awake = function () {
\n
log('exposure', this);
\n
};
\n
BuriedPoint.prototype._onClick = function (e) {
\n
log('click', this);
\n
};
\n
BuriedPoint.id = 'buried-point';
\n
return BuriedPoint;
\n
}(engine.ScriptBase));
\n
exports.default = BuriedPoint;
\n
function fill(src) {
\n
var result = src;
\n
for (var key in engine.env) {
\n
result = result.replace(key, engine.env[key]);
\n
}
\n
return result;
\n
}
\n
function log(type, data) {
\n
var dpm = data.dpm, dcm = data.dcm, dom = data.dom;
\n
var params = {
\n
dpm: dpm, dcm: dcm, appId: engine.env.app_id
\n
};
\n
if (dom !== '0.0.0.0') {
\n
params.dom = dom;
\n
}
\n
var isExposure = type === 'exposure';
\n
engine.httpRequest(null, isExposure ? '//embedlog.duiba.com.cn/exposure/standard' : '/log/click', 'get', params, isExposure ? 'jsonp' : 'text');
\n
}
\n
"
}
}
src/process/view/pop-scene/index.ts
View file @
fe477e13
...
@@ -20,7 +20,7 @@ if(props.closeAll){
...
@@ -20,7 +20,7 @@ if(props.closeAll){
}
}
}
else
{
}
else
{
engine
.
gameStage
.
popup
Container
.
pop
();
engine
.
gameStage
.
scene
Container
.
pop
();
next
(
'complete'
);
next
(
'complete'
);
...
...
src/process/view/set-mouse-enabled/index.ts
View file @
fe477e13
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* Created by rockyl on 2019-11-16.
* Created by rockyl on 2019-11-16.
*/
*/
let
targetNode
=
target
||
props
.
target
;
let
targetNode
=
props
.
target
||
target
;
if
(
targetNode
){
if
(
targetNode
){
targetNode
.
mouseEnabled
=
props
.
enabled
;
targetNode
.
mouseEnabled
=
props
.
enabled
;
}
}
...
...
src/process/view/set-node-property/index.ts
View file @
fe477e13
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* Created by rockyl on 2019-11-16.
* Created by rockyl on 2019-11-16.
*/
*/
let
targetNode
=
target
||
props
.
target
;
let
targetNode
=
props
.
target
||
target
;
if
(
targetNode
)
{
if
(
targetNode
)
{
const
{
field
,
valueType
,
value
}
=
props
;
const
{
field
,
valueType
,
value
}
=
props
;
if
(
field
&&
value
)
{
if
(
field
&&
value
)
{
...
...
src/process/view/set-node-visibility/index.ts
View file @
fe477e13
...
@@ -2,9 +2,11 @@
...
@@ -2,9 +2,11 @@
* Created by rockyl on 2019-11-16.
* Created by rockyl on 2019-11-16.
*/
*/
let
targetNode
=
target
||
props
.
target
;
let
visible
=
engine
.
findVariable
(
'visible'
,
args
,
props
);
let
targetNode
=
props
.
target
||
target
;
if
(
targetNode
){
if
(
targetNode
){
targetNode
.
visible
=
props
.
visible
;
targetNode
.
visible
=
visible
;
}
}
next
(
'success'
,
args
);
next
(
'success'
,
args
);
src/process/view/set-script-enabled/index.ts
View file @
fe477e13
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* Created by rockyl on 2019-11-16.
* Created by rockyl on 2019-11-16.
*/
*/
let
targetNode
=
target
||
props
.
target
;
let
targetNode
=
props
.
target
||
target
;
if
(
targetNode
)
{
if
(
targetNode
)
{
const
{
scriptsProxy
}
=
targetNode
;
const
{
scriptsProxy
}
=
targetNode
;
const
{
scriptIndex
,
scriptName
,
enabled
}
=
props
;
const
{
scriptIndex
,
scriptName
,
enabled
}
=
props
;
...
...
src/process/view/set-script-property/index.ts
View file @
fe477e13
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* Created by rockyl on 2019-11-16.
* Created by rockyl on 2019-11-16.
*/
*/
let
targetNode
=
target
||
props
.
target
;
let
targetNode
=
props
.
target
||
target
;
if
(
targetNode
)
{
if
(
targetNode
)
{
const
{
scriptsProxy
}
=
targetNode
;
const
{
scriptsProxy
}
=
targetNode
;
const
{
scriptIndex
,
scriptName
,
enabled
}
=
props
;
const
{
scriptIndex
,
scriptName
,
enabled
}
=
props
;
...
...
src/script/buried-point/index.ts
View file @
fe477e13
...
@@ -10,9 +10,9 @@ export default class BuriedPoint extends engine.ScriptBase {
...
@@ -10,9 +10,9 @@ export default class BuriedPoint extends engine.ScriptBase {
dom
:
string
=
'0.0.0.0'
;
dom
:
string
=
'0.0.0.0'
;
mounted
()
{
mounted
()
{
this
.
dpm
&&
fill
(
this
.
dpm
);
this
.
dpm
&&
(
this
.
dpm
=
fill
(
this
.
dpm
)
);
this
.
dcm
&&
fill
(
this
.
dcm
);
this
.
dcm
&&
(
this
.
dcm
=
fill
(
this
.
dcm
)
);
this
.
dom
&&
fill
(
this
.
dom
);
this
.
dom
&&
(
this
.
dom
=
fill
(
this
.
dom
)
);
this
.
host
.
addEventListener
(
engine
.
MouseEvent
.
CLICK
,
this
.
_onClick
,
this
);
this
.
host
.
addEventListener
(
engine
.
MouseEvent
.
CLICK
,
this
.
_onClick
,
this
);
}
}
...
@@ -38,7 +38,7 @@ function log(type, data) {
...
@@ -38,7 +38,7 @@ function log(type, data) {
let
{
dpm
,
dcm
,
dom
}
=
data
;
let
{
dpm
,
dcm
,
dom
}
=
data
;
const
params
:
any
=
{
const
params
:
any
=
{
dpm
,
dcm
,
appI
D
:
engine
.
env
.
appID
,
projectID
:
engine
.
env
.
projectID
dpm
,
dcm
,
appI
d
:
engine
.
env
.
app_id
};
};
if
(
dom
!==
'0.0.0.0'
)
{
if
(
dom
!==
'0.0.0.0'
)
{
params
.
dom
=
dom
;
params
.
dom
=
dom
;
...
...
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