mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
Updated DataTypes doc
This commit is contained in:
parent
0e1bc8110f
commit
05dd3b6660
@ -45,7 +45,7 @@ Sometimes you might want to send a polymorphic data type to your commands. Mirro
|
||||
```cs
|
||||
class Item
|
||||
{
|
||||
public String name;
|
||||
public string name;
|
||||
}
|
||||
|
||||
class Weapon : Item
|
||||
@ -62,7 +62,7 @@ class Armor : Item
|
||||
class Player : NetworkBehaviour
|
||||
{
|
||||
[Command]
|
||||
public void CmdEquip(Item item)
|
||||
void CmdEquip(Item item)
|
||||
{
|
||||
if (item is Weapon weapon)
|
||||
{
|
||||
@ -75,7 +75,7 @@ class Player : NetworkBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
public OnGUI()
|
||||
void OnGUI()
|
||||
{
|
||||
if (isLocalPlayer)
|
||||
{
|
||||
@ -94,7 +94,7 @@ class Player : NetworkBehaviour
|
||||
{
|
||||
name = "Gold Armor",
|
||||
hitPoints= 100,
|
||||
Level = 3
|
||||
level = 3
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user