Examples of BaseEntity


Examples of com.sk89q.worldedit.entity.BaseEntity

        this.removing = removing;
    }

    @Override
    public boolean apply(Entity entity) throws WorldEditException {
        BaseEntity state = entity.getState();
        if (state != null) {
            Location location = entity.getLocation();
            Vector newPosition = transform.apply(location.toVector().subtract(from));
            Vector newDirection = transform.apply(location.getDirection()).subtract(transform.apply(Vector.ZERO)).normalize();
            Location newLocation = new Location(destination, newPosition.add(to), newDirection);
View Full Code Here

Examples of com.sk89q.worldedit.entity.BaseEntity

                        builder.putByte("Direction", (byte) MCDirections.toHanging(newDirection));
                        builder.putByte("Dir", MCDirections.toLegacyHanging(MCDirections.toHanging(newDirection)));
                    }
                }

                return new BaseEntity(state.getTypeId(), builder.build());
            }
        }

        return state;
    }
View Full Code Here

Examples of com.teamjmonkey.entity.BaseEntity

        if (!isEnabled()) {
            return;
        }
        it = entList.iterator();
        while (it.hasNext()) {
            BaseEntity ent = (BaseEntity) it.next();
            if (ent.getAnimComponent() != null) {
                if (ent.getAnimComponent().getCurAnim() != null) {
                    AnimInfo curAnimInfo = map.get(ent.getAnimComponent().getCurAnim());
                    AnimChannel channel = ent.getAnimComponent().getAnimControl().getChannel(AnimConf.UPPER_BODY);

                    if (GameState.getGameState() == GameState.RUNNING) {
                        if (channel.getAnimationName() != null ) {
                            if (!channel.getAnimationName().equals(curAnimInfo.name) || ent.getAnimComponent().getAnimControl().getChannel(AnimConf.UPPER_BODY).getSpeed() == 0f) {
                                ent.getAnimComponent().getAnimControl().getChannel(AnimConf.UPPER_BODY).setLoopMode(curAnimInfo.loop);
                                ent.getAnimComponent().getAnimControl().getChannel(AnimConf.UPPER_BODY).setSpeed(curAnimInfo.speed);
                                ent.getAnimComponent().getAnimControl().getChannel(AnimConf.UPPER_BODY).setAnim(curAnimInfo.name, curAnimInfo.blendTime);
                            }
                        }
                    }

                }
View Full Code Here

Examples of com.teamjmonkey.entity.BaseEntity

        Collection<?> list = myApp.getLevelManager().getCurrentLevel().getAllEntities();
       
        if(list == null) return;
        it2 = list.iterator();
        while (it2.hasNext()) {
            BaseEntity ent = (BaseEntity) it2.next();
            if (ent.getAnimComponent() != null) {
                if (ent.getAnimComponent().getCurAnim() != null) {
                    String animName = channel.getAnimationName();
                    if (animName.equals("Jump") || animName.equals("Attack") || animName.equals("Eat")  ) {
                        if (control.getSpatial().getName().equals("bull")) {
                            ent.getAnimComponent().setCurAnim(AnimType.STAND);
                        } else {
                            ent.getAnimComponent().setCurAnim(AnimType.IDLE);                     
                        }

                    }
                }
            }
View Full Code Here

Examples of com.teamjmonkey.entity.BaseEntity

    }

    public void freezeAnimations() {
        it = entList.iterator();
        while (it.hasNext()) {
            BaseEntity ent = (BaseEntity) it.next();
            if (ent.getAnimComponent() != null) {
                if (ent.getAnimComponent().getCurAnim() != null) {
                    AnimChannel channel = ent.getAnimComponent().getAnimControl().getChannel(AnimConf.UPPER_BODY);
                    if (channel.getAnimationName() != null) {
                        ent.getAnimComponent().getAnimControl().getChannel(AnimConf.UPPER_BODY).setSpeed(0f);
                    }
                }
            }
        }
    }
View Full Code Here

Examples of invaders101.entities.BaseEntity

        if (AlienBonusShip.getBonusAlienCount() > 0) {
            return;
        }
        millisToNextBonus -= delta;
        if (millisToNextBonus <= 0) {
            BaseEntity bounusAlien = new AlienBonusShip(
                    this, 50, 50,
                    0.1f + randomGenerator.nextFloat() * 0.05f);
            this.resetBonusTimer();
            this.addEntity(bounusAlien);
        }
View Full Code Here

Examples of invaders101.entities.BaseEntity

        // if a game event has indicated that game logic should
        // be resolved, cycle round every entity requesting that
        // their personal logic should be considered.
        if (logicRequiredThisLoop) {
            for (int i = 0; i < entities.size(); i++) {
                BaseEntity entity = entities.get(i);
                entity.update(delta);
            }
            logicRequiredThisLoop = false;
        }
        sprite.update(delta);
    }
View Full Code Here

Examples of invaders101.entities.BaseEntity

        // if a game event has indicated that game logic should
        // be resolved, cycle round every entity requesting that
        // their personal logic should be considered.
        if (logicRequiredThisLoop) {
            for (int i = 0; i < entities.size(); i++) {
                BaseEntity entity = entities.get(i);
                entity.update(delta);
            }
            logicRequiredThisLoop = false;
        }
        sprite.update(delta);
    }
View Full Code Here

Examples of invaders101.entities.BaseEntity

        // if a game event has indicated that game logic should
        // be resolved, cycle round every entity requesting that
        // their personal logic should be considered.
        if (logicRequiredThisLoop) {
            for (int i = 0; i < entities.size(); i++) {
                BaseEntity entity = entities.get(i);
                entity.update(delta);
            }
            logicRequiredThisLoop = false;
        }
        sprite.update(delta);
    }
View Full Code Here

Examples of org.apache.cayenne.testdo.inherit.BaseEntity

     * used.
     */
    public void testCAY1008() {
        RelatedEntity related = context.newObject(RelatedEntity.class);

        BaseEntity base = context.newObject(BaseEntity.class);
        base.setToRelatedEntity(related);

        assertEquals(1, related.getBaseEntities().size());
        assertEquals(0, related.getSubEntities().size());

        SubEntity sub = context.newObject(SubEntity.class);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.