/* * Copyright (c) 2013 Jayce Rettob * * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License. * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/3.0/. */ using PlayerIOClient; using UnityEngine; namespace com.jbrettob.data.api { public interface IPlayerIOAPI { string gameID { get; } void init(MonoBehaviour monoBehaviour); bool initialized { get; } // web-client stuff Client client { get; } void setClient(Client client); void connectClient(string connectionID, string userID, string auth, string partnerID, PlayerIOClient.Callback onClientConnected, PlayerIOClient.Callback onClientConnectError); // server-side stuff Connection connection { get; } void setConnection(Connection connection); void addSendRateComponent(IPlayerIOSendRate playerIOSendRateComponent); void updateSendRateComponents(float deltaTime); void sendMessage(string eventName); void sendMessage(string eventName, bool forced); void sendMessage(string eventName, bool forced, params object[] data); void setDeltaTime(float deltaTime); float deltaTime { get; } } }