Serialize Class on Photon
Options
Hi I've a problem, for my "Combat System" I have an abstract class Character and 2 class Hero and NPC that inherit Character. Inside Character I have the methods Damage and TakeDamage that calculate the damage and apply the damage, but for calculate this value I need the tarhet class to apply te defensive value.
This methods are called by a script Photon.Monobehaviour.
So I need serialize the abstract class, but I don't know how to do, I looked for on serveral forums and I'm still in difficulty
This methods are called by a script Photon.Monobehaviour.
So I need serialize the abstract class, but I don't know how to do, I looked for on serveral forums and I'm still in difficulty
0
Comments
-
Hi @Danny07,
Thank you for choosing Photon!
I don't understand what do you want to serialize?
What does the methods have to do with this? or abstract class?
Maybe you need to use PUN RPC or events or properties to update and propagate damage or health values.
Or maybe you want to serialize a custom type using Photon.0