当前位置: 首页>>代码示例>>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;未经允许,请勿转载。