Commit 0b317c13 authored by rockyl's avatar rockyl

飞入飞出增加inPos参数,用来指示坐标

parent fdd5f93c
......@@ -76,10 +76,10 @@ const effects = {
}
},
flew(params, mutex, lastView, view, container, callback) {
const {duration = 300, direction = 'top', ease = 'backOut'} = params;
const {duration = 300, direction = 'top', ease = 'backOut', inPos: inPosInput} = params;
const {stage: {width, height}} = gameStage;
let outPos: any = {};
let outPos: any;
switch (direction) {
case 'left':
outPos.x = -width;
......@@ -128,8 +128,8 @@ const effects = {
function flewIn(callback) {
if (view) {
let inPos: any = {
x: view.x,
y: view.y,
x: inPosInput && inPosInput.hasOwnProperty('x') ? inPosInput.x : view.x,
y: inPosInput && inPosInput.hasOwnProperty('y') ? inPosInput.y : view.y,
};
view.visible = true;
......
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