A
Arda Coskun
Hi,
I have a problem with references in C#.
I have three classes; Game class, Player class and Bonus class.
In Game class,
I have created a Player object and named it myPlayer and set myPlayer's
color to White.
I have created a Bonus object and named it myBonus and send myPlayer to
myBonus as a parameter.
In Bonus class,
I have created a Timer object and named it myTimer.
The thing I want to do is change myPlayer's color from myTimer's Tick event.
I do not want to declare myPlayer's color as static. I want to solve this
with references but how?
Any help would be appriciated.
I have a problem with references in C#.
I have three classes; Game class, Player class and Bonus class.
In Game class,
I have created a Player object and named it myPlayer and set myPlayer's
color to White.
I have created a Bonus object and named it myBonus and send myPlayer to
myBonus as a parameter.
In Bonus class,
I have created a Timer object and named it myTimer.
The thing I want to do is change myPlayer's color from myTimer's Tick event.
I do not want to declare myPlayer's color as static. I want to solve this
with references but how?
Any help would be appriciated.