mardi 22 septembre 2015

AppWarp Implementation

I am trying to implement AppWarp into a game I am making. I followed a tutorial exactly as it was written but I am getting about a dozen errors at "NetworkPeer implements". The some of the errors are:

Error: Interface method onConnectDone in namespace com.shephertz.appwarp.listener:ConnectionRequestListener not implemented by class NetworkPeer.

Error: Interface method onDisConnectDone in namespace com.shephertz.appwarp.listener:ConnectionRequestListener not implemented by class NetworkPeer.

And so on...

Any help is greatly appreciated!

public class NetworkPeer implements ConnectionRequestListener, RoomRequestListener, NotificationListener
        {
            public var roomID:String = "Room";
            private var apiKey:String = "API_ID"
            private var secretKey:String = "Secret_Key";
            private var localUsername = Math.random().toString();

            public function NetworkPeer()
            {
                WarpClient.initialize(apiKey, secretKey);
                WarpClient.getInstance().setConnectionRequestListener(null);
                WarpClient.getInstance().setRoomRequestListener(null);
                WarpClient.getInstance().setNotificationListener(null);
            }

            private function connect_click(e:MouseEvent):void
            {
                if (WarpClient.getInstance().getConnectionState() == ConnectionState.disconnected)
                {
                    WarpClient.getInstance().connect(localUsername);
                    Main.connectbtn.text = "Connecting..";
                }
            }

        }

Aucun commentaire:

Enregistrer un commentaire