Photon cloud

来源:互联网 发布:443端口和80端口 编辑:程序博客网 时间:2024/06/06 03:45

1 ConnectToMaster

 

publicDemoClient(): base()

{
    this.PlayerName = "Player"+ this.randomNumber.Next(1, 100);
    this.ConnectToMaster("yourAppIdHere", "v0.1", PlayerName);
}

 

 

2 room

publicvoid CreateNewRoom(stringname)
{
    Hashtable customGameProperties = newHashtable()
    { { "Map", "Dust"}, { "Mode", arcade } };
    this.OpCreateRoom(name, true, true, 4, customGameProperties, this.LocalPlayer.CustomProperties);
}
 
3 event
publicvoid SendSomeEvent()
{
    Hashtable eventContent = newHashtable();
    eventContent[(byte)10] = "my data";                
 
    this.OpRaiseEvent(1, eventContent, false, 0);
}