Package com.teamjmonkey.entity

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


        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

    }

    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

TOP

Related Classes of com.teamjmonkey.entity.BaseEntity

Copyright © 2018 www.massapicom. 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.