@Override protected void createContent(Composite parent) { final Composite content = new Composite(parent, SWT.NONE); content.setLayout(new GridLayout(2, false)); content.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); final Group animGroup = new Group(content, SWT.NONE); animGroup.setLayout(new GridLayout(1, false)); animGroup.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); animGroup.setText(Messages.AnimationEditor_Animation); final TabFolder animationTabs = new TabFolder(animGroup, SWT.TOP); final AnimationFrameSelector animationFrameSelector = createAnimationFrameSelector(animationTabs); final AnimationRenderer animationRenderer = createAnimationRenderer(animationTabs); final AnimationProperties animationProperties = new AnimationProperties(animationList, animationRenderer); animationList.addListener(animationProperties); final AnimationPlayer animationPlayer = new AnimationPlayer(animationList, animationRenderer); animationPlayer.createAnimationPlayer(animationRenderer.getParent().getParent()); animationFrameSelector.setAnimationList(animationList); animationFrameSelector.setAnimationProperties(animationProperties); animationProperties.setAnimationFrameSelector(animationFrameSelector); animationRenderer.setAnimationPlayer(animationPlayer); final Composite properties = new Composite(content, SWT.NONE); properties.setLayout(new GridLayout(1, false)); properties.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); animationList.create(properties); animationProperties.create(properties); animationList.loadAnimations(); }
public Player( String playerName, float speed, float frameSpeed, float rote, float widht, float hight, Vector2 position, String fileName, String fileAnimationName) { super(speed, rote, widht, hight, position); Player.playerName = playerName; this.fileName = fileName; this.fileAnimationName = fileAnimationName; playerTexture = new Texture(this.fileName); AnimationPlayer ap = new AnimationPlayer(frameSpeed, this.fileAnimationName); walkUp = ap.getWalkAnimationUp(); walkDown = ap.getWalkAnimationDown(); walkLeft = ap.getWalkAnimationLeft(); walkRight = ap.getWalkAnimationRight(); }