我目前正在为一个小游戏开发一个客户端和一个服务器。连接到服务器的客户端使用此方法建立连接:
// This method is called, passing on an ipv6 address and port number 6666
public void startConnection(String ip, int port) throws IOException {
try {
clientSocket = new Socket(ip, port);
out = new Print
我一直在尝试为一个小游戏制作一个分数计数器,在这个小游戏中,用户点击舞台上的按钮,每次用户按下按钮,分数就会递增10,但是我无法在动态文本字段上显示分数。我做错了什么?
var score:uint;
//scoreCounter is the instance name of the dynamic text box
function updateScore():void{
score += 10;
scoreCounter.text = score.toString();
}