Advertisement



Go Back   Zune Boards > Zune Discussions > Zune Games > Development Discussions

New Member?



 
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Development Discussions All developers who are coding games may stop by here for any help, suggestions, and everything development related.

Reply
 
LinkBack Thread Tools
Old 07-05-2008, 02:54 PM   #21 (permalink)
Experienced Zuner
 
Rockman87's Avatar
 
Join Date: Nov 2007
Location: UT, USA
Posts: 199
Reputation: 25
Send a message via MSN to Rockman87
Default


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();
        }
New code:
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);
                
            }
        }
Thanks for your time...I would have never solved this one by myself!



__________________

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.




Rockman87 is offline   Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT -8. The time now is 07:47 PM.

 
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0 RC8
vB Ad Management by =RedTyger=
(C) ZuneBoards 2006-2007
Copyright © 2006 - 2008 Zune Boards | About Zune Boards | Legal | A member of the Crowdgather Forum Community