// WARNING: This file is auto-generated and any changes to it will be overwritten import lang.stride.*; import java.util.*; import greenfoot.*; /** * */ public class Thing extends Actor { /** * */ public Thing(int factor) { /* factor: 1 = height 180*/ /* factor: 2 = height 90*/ double width = this.getImage().getWidth(); double height = this.getImage().getHeight(); int targetHeight = 180 / factor; double scaleFactor = height / 180; int targetWidth = (int)((width / scaleFactor) / factor); this.getImage().scale(targetWidth, targetHeight); } /** * Act - do whatever the Thing wants to do. This method is called whenever the 'Act' or 'Run' button gets pressed in the environment. */ public void act() { } }