public void loadResources() { leftCoast = new CoastController("left"); rightCoast = new CoastController("right"); boat = new BoatController(); for (int i = 0; i < 3; i++) { zyzCharacterController newPriest = new zyzCharacterController("priest"); newPriest.setName("priest" + i); newPriest.setPosition(leftCoast.getEmptyPosition()); newPriest.toCoast(leftCoast); leftCoast.toCoast(newPriest); characters[i] = newPriest; } for (int i = 0; i < 3; i++) { zyzCharacterController newDevil = new zyzCharacterController("devil"); newDevil.setName("devil" + i); newDevil.setPosition(leftCoast.getEmptyPosition()); newDevil.toCoast(leftCoast); leftCoast.toCoast(newDevil); characters[i + 3] = newDevil; } }
public void loadResources() { GameObject water = Instantiate(Resources.Load("Prefabs/Water", typeof(GameObject)), waterPosititon, Quaternion.identity, null) as GameObject; water.name = "water"; leftCoast = new CoastController("left"); rightCoast = new CoastController("right"); boat = new BoatController(); for (int i = 0; i < 3; i++) { zyzCharacterController newPriest = new zyzCharacterController("priest"); newPriest.setName("priest" + i); newPriest.setPosition(leftCoast.getEmptyPosition()); newPriest.toCoast(leftCoast); leftCoast.toCoast(newPriest); characters[i] = newPriest; } for (int i = 0; i < 3; i++) { zyzCharacterController newDevil = new zyzCharacterController("devil"); newDevil.setName("devil" + i); newDevil.setPosition(leftCoast.getEmptyPosition()); newDevil.toCoast(leftCoast); leftCoast.toCoast(newDevil); characters[i + 3] = newDevil; } }