示例#1
0
    public override void OnStartServer()
    {
        //Get player and get teamcolor from player
        RTSPlayer player = connectionToClient.identity.GetComponent <RTSPlayer>();

        teamColor = player.GetTeamColor();
    }
示例#2
0
    public override void OnStartServer()
    {
        RTSPlayer player = connectionToClient.identity.GetComponent <RTSPlayer>();

        //Debug.Log($"TeamColorSetter {player} , color {player.GetTeamColor()} ");
        teamColor = player != null?player.GetTeamColor() : Color.red;
    }
示例#3
0
    public override void OnStartServer()
    {
        //Find Which Player Owns This Object
        RTSPlayer player = connectionToClient.identity.GetComponent <RTSPlayer>();

        //Get Color Belongs To Us
        teamColor = player.GetTeamColor();
    }