Re:ACT游戏基础元素--血槽的制作
哇哈哈哈~~好不容易弄出来了~~~用第二种方法很好玩噢
zuidaxie = 100;
chengjie = 100;
shengxie = 100;
bujin = 30;
function ys() {
if (chengjie<0) {
chengjie = 0;
} else if (chengjie>zuidaxie) {
chengjie = zuidaxie;
} else if (chengjie != shengxie && a == false && shengxie<zuidaxie) {
shengxie++;
_root.hong._xscale = chengjie;
_root.xie._xscale = shengxie;
} else if (chengjie != shengxie && a && shengxie>0) {
shengxie--;
_root.hong._xscale = chengjie;
_root.xie._xscale = shengxie;
}
}
_root.one.onRelease = function() {
chengjie -= bujin;
a = true;
_root.xie.onEnterFrame = function() {
ys();
};
};
_root.two.onRelease = function() {
chengjie += bujin;
a = false;
_root.xie.onEnterFrame = function() {
ys();
};
};