Exemplo n.º 1
0
 public void Jump()
 {
     if (isServer)
     {
         //send view update information to all clients
         ScreenLogger.getLogger().ShowMsg("called from server: JUMP");
         RpcJump();
     }
 }
Exemplo n.º 2
0
 void Log(string str)
 {
     if (logger == null)
     {
         logger = ScreenLogger.getLogger();
     }
     str = "Settings] " + str;
     logger.ShowMsg(str);
     Debug.Log(str);
 }
Exemplo n.º 3
0
    // Init
    void Start()
    {
        if (networkManager == null)
        {
            string goName = AWConfig.AW_CONFIG_GO_NAME;
            networkManager = GameObject.Find(goName).GetComponent <AWNetworkManager>();
        }

        logger = ScreenLogger.getLogger();
        initEvents();
    }
Exemplo n.º 4
0
 public void Rotate(Vector3 axis, float degree)
 {
     if (isServer)
     {
         ScreenLogger.getLogger().ShowMsg("called from server: ROTATE " + degree);
         RpcRotate(axis, degree);
     }
     if (isClient)
     {
         ScreenLogger.getLogger().ShowMsg("called from client: ROTATE " + degree);
         SendCmd("Rotate", axis, degree);
     }
 }
Exemplo n.º 5
0
    //Shared hologram methods

    public void SetColor(Color color)
    {
        if (isServer)
        {
            //send view update information to all clients
            ScreenLogger.getLogger().ShowMsg("called from server " + color.ToString());
            RpcSetColor(color);
        }
        if (isClient)
        {
            ScreenLogger.getLogger().ShowMsg("called from client" + color.ToString());
            //send the command to the server
            SendCmd("SetColor", color);
        }
    }
Exemplo n.º 6
0
 // Use this for initialization
 void Start()
 {
     logger     = ScreenLogger.getLogger();
     netManager = (AWNetworkManager)AWNetworkManager.singleton;
 }