|
  
|
|
|||||||
| Development Discussions All developers who are coding games may stop by here for any help, suggestions, and everything development related. |
![]() |
|
|
LinkBack | Thread Tools |
|
|
#21 (permalink) |
|
Experienced Zuner
|
I got it to work... My friend is a software engineer, so I stopped by his house and asked him what was wrong. The problem with the code is that it was two different instances of the Location class. I needed to tie them together so it deals with the same instance.
old code: Code:
charsLocation = new Locations();
level = new LevelControls();
Code:
public LevelControls()
{
monsterControl = new Locations();
}
Code:
charsLocation = new Locations();
level = new LevelControls(charsLocation);
Code:
public LevelControls(Locations locations)
{
monsterControl = locations;
}
public void advanceLevel(int score)
{
//Level 2
if (score == 10)
{
monsterControl.changeMonSpeed(.5f);
}
}
__________________
To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts. To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts. To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts. Last edited by Rockman87 : 07-05-2008 at 08:17 PM. ![]() |
|
|
|
![]() |
| Thread Tools | |
|
|
| |