package de.uniks.pmws1920.controller.ingame; public class ShroomController { @FXML public ; private ModelBuilder builder; private AnchorPane pane; private Shroom shroom; private double xPos; private double yPos; // =================================================================================== // Init // =================================================================================== public void setContent(ModelBuilder builder, AnchorPane pane, Shroom shroom, double xPos, double yPos) { // save parameter in fields // maybe additional location calculations this.setup(); } private void setup() { this.bindValues(); this.relocateSelf(, ); } // =================================================================================== // Init View // =================================================================================== private void bindValues() { // Bind shape the pane // Optional bind property change listener to shroom } // =================================================================================== // Update View // =================================================================================== // Use this method for the view update in the HouseController public void relocateSelf(double xPos, double yPos) { // optional calculations for shroom position this.placeSelf(); } public void placeSelf() { // place shape at given (or calculated) position } // =================================================================================== // Helping Methods // =================================================================================== // feel free to add setter/getter or other kinds of self written methods }