当前位置: 首页>>代码示例>>Java>>正文


Java AlphaModifier类代码示例

本文整理汇总了Java中org.andengine.entity.modifier.AlphaModifier的典型用法代码示例。如果您正苦于以下问题:Java AlphaModifier类的具体用法?Java AlphaModifier怎么用?Java AlphaModifier使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


AlphaModifier类属于org.andengine.entity.modifier包,在下文中一共展示了AlphaModifier类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createCursorSprite

import org.andengine.entity.modifier.AlphaModifier; //导入依赖的package包/类
/**
 * カーソル描画.
 * @param mapPoint
 */
private Sprite createCursorSprite(Point mapIndexPoint, Color color) {
	PointF pointF = MapGridUtil.indexToDisp(new Point(mapIndexPoint.x, mapIndexPoint.y));
	
	Sprite cursor = getBaseScene().getResourceSprite("grid128.png");
	cursor.setColor(color);
	cursor.setSize(MapGridUtil.GRID_X, MapGridUtil.GRID_Y);
	cursor.setPosition(pointF.x, pointF.y);
	cursor.registerEntityModifier(new LoopEntityModifier(new SequenceEntityModifier(
			new AlphaModifier(0.5f, 0.2f, 0.6f),
			new AlphaModifier(0.5f, 0.6f, 0.2f)
			)));
	getBaseMap().attachChild(cursor);
	
	return cursor;
}
 
开发者ID:kyokomi,项目名称:AndEngineSRPGQuest,代码行数:20,代码来源:SRPGPart.java

示例2: hideDices

import org.andengine.entity.modifier.AlphaModifier; //导入依赖的package包/类
public void hideDices(){
    for(DiceSprite diceSprite :diceSprites){
         if(!diceSprite.isReadyToRoll()){
             if(diceSprite.getAlpha()!=0f) {
                 diceSprite.registerEntityModifier(new AlphaModifier(Constants.ANIMATION_DURATION, 1f, 0f));
             }
         }
    }
}
 
开发者ID:viniciusDSL,项目名称:One-Cachito,代码行数:10,代码来源:CachoSprite.java

示例3: showDices

import org.andengine.entity.modifier.AlphaModifier; //导入依赖的package包/类
public void showDices(){
    for(DiceSprite diceSprite :diceSprites){
        if(!diceSprite.isReadyToRoll()){
            diceSprite.registerEntityModifier(new AlphaModifier(Constants.ANIMATION_DURATION,0f,1f));
        }
    }
}
 
开发者ID:viniciusDSL,项目名称:One-Cachito,代码行数:8,代码来源:CachoSprite.java

示例4: onMenuItemPositionBuilt

import org.andengine.entity.modifier.AlphaModifier; //导入依赖的package包/类
@Override
protected void onMenuItemPositionBuilt(final MenuScene pMenuScene, final int pIndex, final IMenuItem pMenuItem, final float pX, final float pY) {
	pMenuItem.setPosition(pX, pY);

	final AlphaModifier alphaModifier = new AlphaModifier(AlphaMenuSceneAnimator.DURATION, AlphaMenuSceneAnimator.ALPHA_FROM, AlphaMenuSceneAnimator.ALPHA_TO, this.mEaseFunction);
	alphaModifier.setAutoUnregisterWhenFinished(false);
	pMenuItem.registerEntityModifier(alphaModifier);
}
 
开发者ID:ArturVasilov,项目名称:AndroidCourses,代码行数:9,代码来源:AlphaMenuSceneAnimator.java

示例5: buildAnimations

import org.andengine.entity.modifier.AlphaModifier; //导入依赖的package包/类
@Override
public void buildAnimations(final ArrayList<IMenuItem> pMenuItems, final float pCameraWidth, final float pCameraHeight) {
	final IEaseFunction easeFunction = this.mEaseFunction;
	final int menuItemCount = pMenuItems.size();
	for(int i = menuItemCount - 1; i >= 0; i--) {
		final AlphaModifier alphaModifier = new AlphaModifier(DURATION, ALPHA_FROM, ALPHA_TO, easeFunction);
		alphaModifier.setAutoUnregisterWhenFinished(false);
		pMenuItems.get(i).registerEntityModifier(alphaModifier);
	}
}
 
开发者ID:peterchaula,项目名称:ClassicF1,代码行数:11,代码来源:AlphaMenuAnimator.java

示例6: createEntityFactory

import org.andengine.entity.modifier.AlphaModifier; //导入依赖的package包/类
private static IEntityFactory<Rectangle> createEntityFactory(final VertexBufferObjectManager vbom) {

        return new IEntityFactory<Rectangle>() {
            @Override
            public Rectangle create(final float pX, final float pY) {

                Rectangle rectangle = new Rectangle(pX, pY, 30, 15, vbom);
                rectangle.setColor(COLOR_MAP[getRandomBetweenZeroAndThree()]);
                rectangle.registerEntityModifier(new RotationModifier(7f, (float) Math.random() * 360,
                        (7 - (float) Math.random() * 15) * 360));
                rectangle.registerEntityModifier(new AlphaModifier(4f, 0.7f, 0f));
                return rectangle;
            }};
    }
 
开发者ID:djschilling,项目名称:sopa,代码行数:15,代码来源:ConfettiParticleSystem.java

示例7: show

import org.andengine.entity.modifier.AlphaModifier; //导入依赖的package包/类
public void show(){
    if(this.getAlpha()!=1f) {
        this.registerEntityModifier(new AlphaModifier(Constants.ANIMATION_DICE, 0f, 1f));
    }
}
 
开发者ID:viniciusDSL,项目名称:One-Cachito,代码行数:6,代码来源:NextArrowSprite.java

示例8: hide

import org.andengine.entity.modifier.AlphaModifier; //导入依赖的package包/类
public void hide(){
    if(this.getAlpha()!=0f) {
        this.registerEntityModifier(new AlphaModifier(Constants.ANIMATION_DICE, 1f, 0f));
    }
}
 
开发者ID:viniciusDSL,项目名称:One-Cachito,代码行数:6,代码来源:NextArrowSprite.java

示例9: onModifierFinished

import org.andengine.entity.modifier.AlphaModifier; //导入依赖的package包/类
@Override
protected void onModifierFinished(IEntity pItem) {

    pEntity.registerEntityModifier(new AlphaModifier(0.1f, 1f, 0f));
}
 
开发者ID:djschilling,项目名称:sopa,代码行数:6,代码来源:FlashEntityModifier.java

示例10: onShowScene

import org.andengine.entity.modifier.AlphaModifier; //导入依赖的package包/类
@SuppressWarnings("static-access")
@Override
public void onShowScene() {
	SFXManager.playSound(ResourceManager.getInstance().menuLogoMadgear);

	sprLogoMadGear = new Sprite(SCREEN_WIDTH/2, SCREEN_HEIGHT/2, 
			ResourceManager.getInstance().splashLogo.getWidth(), 
			ResourceManager.getInstance().splashLogo.getHeight(),
			ResourceManager.getInstance().splashLogo,
			ResourceManager.getInstance().engine.getVertexBufferObjectManager());
	sprLogoMadGear.setAlpha(0f);
	attachChild(sprLogoMadGear);

	mSeqEntMod= new SequenceEntityModifier(
               new DelayModifier(timePreLogo),// Logo still not visible
               new ParallelEntityModifier(// Logo enters
                   new AlphaModifier(timeLogoIn, 0, 1),
                   new ScaleModifier(timeLogoIn, 0.95f, 1)
               ),
               new DelayModifier(timeLogoStay), // Logo stays
               new ParallelEntityModifier(// Logo exits
                   new AlphaModifier(timeLogoOut, 1, 0),
                   new ScaleModifier(timeLogoOut, 1, 0.95f)
               ),
               new DelayModifier(timePostLogo) // Logo not visible again
       );
	sprLogoMadGear.registerEntityModifier(mSeqEntMod);

	startTime = ResourceManager.getInstance().engine.getSecondsElapsedTotal();
	updateHandler = new IUpdateHandler() {
           @Override
           public void onUpdate(float pSecondsElapsed) {
           	if (ResourceManager.getInstance().engine.getSecondsElapsedTotal()>startTime+exitDelay) {
           		unregisterUpdateHandler(updateHandler);
           		skip();
           	}            	
           }
           @Override public void reset() {}            
       };
       registerUpdateHandler(updateHandler);
}
 
开发者ID:jjhaggar,项目名称:ninja-trials,代码行数:42,代码来源:SplashIntroScene.java


注:本文中的org.andengine.entity.modifier.AlphaModifier类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。