Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

移植至 GameMaker: Studio 的可能性 #2

Closed
LiarOnce opened this issue Aug 16, 2018 · 3 comments
Closed

移植至 GameMaker: Studio 的可能性 #2

LiarOnce opened this issue Aug 16, 2018 · 3 comments
Labels
enhancement New feature or request

Comments

@LiarOnce
Copy link
Member

LiarOnce commented Aug 16, 2018

目测是可以移植至 GameMaker: Studio,不过有两行代码倒是在 GM: S 中出错,应该是不支持这种写法

case GMU_ANIM_EXPO:
switch(_ease){
case GMU_ANIM_IN:
r=(t==0)?b : c*power(2,10*(t/d-1))+b;  //'?' get an error in GM: S: Unexpected symbol
break;
case GMU_ANIM_OUT:
r=(t==d)?b+c : c * (-power(2,-10*t/d)+1)+b;  //'?' get an error in GM: S: Unexpected symbol
break;
case GMU_ANIM_IN_OUT:
if (t==0){
r=b;
}
   if(t==d){
r=b+c;
}
t/=d/2;
  if (t<1){
r=c/2*power(2,10*(t-1))+b;
}else{
r=c/2*(-power(2,-10*--t)+2)+b;
}
break;
}
break;
@LiarOnce LiarOnce added the enhancement New feature or request label Aug 16, 2018
@TML233
Copy link
Contributor

TML233 commented Aug 16, 2018

GMS1不支持三目运算符吧

@LiarOnce
Copy link
Member Author

LiarOnce commented Aug 16, 2018

@HouJunhao33 确实是不支持三目运算符,估计要自己写了
或者只能取消 GMU_ANIM_EXPO 效果了
还有现在的 GMS1 支持 variable_instance_setvariable_exist 函数但不支持 instance_create_depth 函数,不知道直接用instance_create 代替行不行

@LiarOnce
Copy link
Member Author

@HouJunhao33 我在这个分支里做了一些修改,不过能不能用就不知道了
https://github.com/LiarOnce/GMU_Anim/tree/gms1

@TML233 TML233 closed this as completed Aug 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants