Hay have an issue with int share between actors. I read a lot about this int this site but i cant do it dont know why... Can u pl help me?
----------------------------------------------------
So i want to move the Int2 Into the Example.class and do a Int=Int+Int2 finale score. How can i do this?
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
public class Example extends Moduls
{
int Int=0;
public void act()
{
// Add your action code here.
}
}
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
public class Example2 extends Moduls
{
int Int2=0;
public void act()
{
// Add your action code here.
}
public void something(){
Int2++;
}
public Example2(){
somethhing();
}
}
