I'm making a turn based game using as3 and c#. When the player selects their character at the beginning of the game (ex: Wolverine) I want to send their choice to the server and have the server instantiate the Wolverine class (which extends from a Character base class), and then send Wolverine's data (health, attacks, etc) back to the client.
So far I can get the character choice to the server, but I don't know how to take that string ("Wolverine") and instantiate the Wolverine class from it. I tried using System.Activator.CreateInstance, but it says it is a non-allowed method.
The reason I'm storing the data for the characters on the server is for security reasons. Players could theoretically cheat by giving their characters a billion health or something if they were stored on the client. If I can't solve this problem I will store them on the client, but it'd be great if someone could help me out.