當前位置: 首頁>>代碼示例>>Java>>正文


Java Group.clearActions方法代碼示例

本文整理匯總了Java中com.badlogic.gdx.scenes.scene2d.Group.clearActions方法的典型用法代碼示例。如果您正苦於以下問題:Java Group.clearActions方法的具體用法?Java Group.clearActions怎麽用?Java Group.clearActions使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.badlogic.gdx.scenes.scene2d.Group的用法示例。


在下文中一共展示了Group.clearActions方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: move0

import com.badlogic.gdx.scenes.scene2d.Group; //導入方法依賴的package包/類
private void move0(Group gr, float procent, float time) {
    MoveToAction move = new MoveToAction();
    move.setDuration(time);
    ScaleToAction scale = new ScaleToAction();
    scale.setDuration(time);
    if(time == 0) {
        gr.clearActions();
        gr.clearActions();
        if (procent < 0) {
            scale.setScale(0.5f + (Math.abs(procent) * 0.3f));
            move.setPosition(p0.x + procent * d01.x, p0.y + (1 - (procent * d01.y)));
            addfirst();
        }else{
            scale.setScale(0.5f);
            move.setPosition(p0.x,p0.y);
        }
    }else{
        if(Math.abs(procent)<=0.5){
            scale.setScale(0.5f);
            move.setPosition(p0.x,p0.y);
        }else if(procent < -0.5) {
            scale.setScale(0.8f);
            move.setPosition(p1.x, p1.y);
            addfirst();
        }else{
            scale.setScale(0.5f);
            move.setPosition(p0.x,p0.y);
        }
    }
    gr.addAction(scale);
    gr.addAction(move);
}
 
開發者ID:TudorRosca,項目名稱:enklave,代碼行數:33,代碼來源:DrawAttachers.java

示例2: move1

import com.badlogic.gdx.scenes.scene2d.Group; //導入方法依賴的package包/類
private void move1(Group gr, float procent, float time) {
    MoveToAction move = new MoveToAction();
    move.setDuration(time);
    ScaleToAction scale = new ScaleToAction();
    scale.setDuration(time);
    if(time == 0) {
        gr.clearActions();
        gr.clearActions();
        if (procent > 0) {
            scale.setScale(0.8f - (Math.abs(procent) * 0.3f));
            move.setPosition(p1.x + (procent * d01.x), p1.y + (1 - (procent * d01.y)));
        } else {
            scale.setScale(0.8f + (Math.abs(procent) * 0.2f));
            move.setPosition(p1.x + (procent * d12.x), p1.y + (1 - (procent * d12.y)));
        }
    }else{
        if(Math.abs(procent)<=0.5){
            scale.setScale(0.8f);
            move.setPosition(p1.x,p1.y);
        }else if(procent > 0.5){
            scale.setScale(0.5f);
            move.setPosition(p0.x, p0.y);
        }else{
            scale.setScale(1);
            move.setPosition(p2.x,p2.y);
        }
    }
    gr.addAction(scale);
    gr.addAction(move);
}
 
開發者ID:TudorRosca,項目名稱:enklave,代碼行數:31,代碼來源:DrawAttachers.java

示例3: move5

import com.badlogic.gdx.scenes.scene2d.Group; //導入方法依賴的package包/類
private void move5(Group gr, float procent, float time) {
    MoveToAction move = new MoveToAction();
    move.setDuration(time);
    ScaleToAction scale = new ScaleToAction();
    scale.setDuration(time);
    if(time == 0) {
        gr.clearActions();
        gr.clearActions();
        if (procent > 0) {
            scale.setScale(0.8f + (Math.abs(procent) * 0.2f));
            move.setPosition(p5.x - (procent * d45.x), p5.y + (1 - (procent * d45.y)));
        } else {
            scale.setScale(0.8f - (Math.abs(procent) * 0.3f));
            move.setPosition(p5.x - (procent * d56.x),p5.y + (1-(procent*d56.y)));
        }
    }else{
        if(Math.abs(procent)<=0.5){
            scale.setScale(0.8f);
            move.setPosition(p5.x,p5.y);
        }else if(procent > 0.5){
            scale.setScale(1);
            move.setPosition(p4.x, p4.y);
        }else{
            scale.setScale(0.5f);
            move.setPosition(p6.x,p6.y);
        }
    }
    gr.addAction(scale);
    gr.addAction(move);
}
 
開發者ID:TudorRosca,項目名稱:enklave,代碼行數:31,代碼來源:DrawAttachers.java

示例4: move6

import com.badlogic.gdx.scenes.scene2d.Group; //導入方法依賴的package包/類
private void move6(Group gr, float procent, float time) {
    MoveToAction move = new MoveToAction();
    move.setDuration(time);
    ScaleToAction scale = new ScaleToAction();
    scale.setDuration(time);
    if(time == 0) {
        gr.clearActions();
        gr.clearActions();
        if (procent > 0) {
            scale.setScale(0.5f + (Math.abs(procent) * 0.3f));
            move.setPosition(p6.x - procent * d56.x, p6.y + (1 - (procent * d56.y)));
            addlast();
        }else{
            scale.setScale(0.5f);
            move.setPosition(p6.x,p6.y);
        }
    }else{
        if(Math.abs(procent)<=0.5){
            scale.setScale(0.5f);
            move.setPosition(p6.x,p6.y);
        }else if(procent > 0.5) {
            scale.setScale(0.8f);
            move.setPosition(p5.x, p5.y);
            addlast();
        }else{
            scale.setScale(0.5f);
            move.setPosition(p6.x,p6.y);
        }
    }
    gr.addAction(scale);
    gr.addAction(move);
}
 
開發者ID:TudorRosca,項目名稱:enklave,代碼行數:33,代碼來源:DrawAttachers.java

示例5: onChangedState

import com.badlogic.gdx.scenes.scene2d.Group; //導入方法依賴的package包/類
@Override public void onChangedState(Boolean active) {
    Group appearing = active ? onGroup : offGroup;
    Group disappearing = active ? offGroup : onGroup;
    appearing.clearActions();
    appearing.addAction(alpha(1, 0.5f));
    disappearing.clearActions();
    disappearing.addAction(alpha(0, 0.5f));
    if (active) {
        SoundManager.instance.playMusicAsSound("step-detector-activation");
    }
}
 
開發者ID:ratrecommends,項目名稱:dice-heroes,代碼行數:12,代碼來源:StepDetectorSubView.java


注:本文中的com.badlogic.gdx.scenes.scene2d.Group.clearActions方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。