void Start()
    {
        xmlDoc = new XmlDocument();
        SlipStreamComponent = GameObject.FindObjectOfType <SlipStream>();
        SlipStreamComponent.PacketNotification += new PacketReceivedHandler(OnPacketReceived);

        if (origin == null)
        {
            origin = new GameObject("Origin").transform;
        }

        /* NEW CODE */
        multiSkeletonBones = new SkeletonBones[skeletonList.Count];

        nBones = skeletonBonesList.Count / skeletonList.Count;       // number of bones per skeleton (assuming they've the same amount)

        for (int i = 0; i < multiSkeletonBones.Length; i++)
        {
            multiSkeletonBones[i] = new SkeletonBones();
            multiSkeletonBones[i].skeletonBonesIDs         = new int[nBones];
            multiSkeletonBones[i].skeletonBonesNames       = new string[nBones];
            multiSkeletonBones[i].skeletonBonesPositions   = new Vector3[nBones];
            multiSkeletonBones[i].skeletonBonesQuaternions = new Quaternion[nBones];
        }
        /* END OF NEW CODE */
    }
Пример #2
0
	void Start () 
	{
		xmlDoc= new XmlDocument();
		SlipStreamComponent = GameObject.FindObjectOfType<SlipStream>();
		SlipStreamComponent.PacketNotification += new PacketReceivedHandler(OnPacketReceived);

		if(origin == null) {
			origin = new GameObject("Origin").transform;
		}
	}
Пример #3
0
    void Start()
    {
        xmlDoc = new XmlDocument();
        SlipStreamComponent = GameObject.FindObjectOfType <SlipStream>();
        SlipStreamComponent.PacketNotification += new PacketReceivedHandler(OnPacketReceived);

        if (origin == null)
        {
            origin = new GameObject("Origin").transform;
        }
    }
Пример #4
0
    void Awake()
    {
        Instance          = this;
        mReceiveBuffer    = new byte[kMaxSubPacketSize];
        mPacket           = System.String.Empty;
        mRemoteIpEndPoint = new IPEndPoint(IPAddress.Parse(IP), Port);
        mListener         = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
        mListener.Bind(mRemoteIpEndPoint);
        mListener.Blocking          = false;
        mListener.ReceiveBufferSize = 128 * 1024;

        xmlDoc = new XmlDocument();
    }
    // Use this for initialization
    void Awake()
    {
        // we start the connection to the server from Unity by running the .bat file named UnitySample
        string path = Application.dataPath.Substring(2) + "/Server";
        path = path.Replace('/', '\\');
        Debug.Log(Application.dataPath + "/Server/UnitySample.bat " + remoteIP+ " " + myIp+ " " + myDrive + " " + '"' + path + '"');
        System.Diagnostics.Process.Start(Application.dataPath + "/Server/UnitySample.bat ", remoteIP + " " + myIp + " "  + myDrive + " "+'"'+ path+'"');

        xmlDoc = new XmlDocument();
        if (SlipStreamObject == null)
        {
            stream = GetComponent<SlipStream>();
        }
        else
        {
            stream = SlipStreamObject.GetComponent<SlipStream>();
        }
    }
Пример #6
0
    // Use this for initialization
    void Awake()
    {
        // we start the connection to the server from Unity by running the .bat file named UnitySample
        string path = Application.dataPath.Substring(2) + "/Server";

        path = path.Replace('/', '\\');
        Debug.Log(Application.dataPath + "/Server/UnitySample.bat " + remoteIP + " " + myIp + " " + myDrive + " " + '"' + path + '"');
        System.Diagnostics.Process.Start(Application.dataPath + "/Server/UnitySample.bat ", remoteIP + " " + myIp + " " + myDrive + " " + '"' + path + '"');

        xmlDoc = new XmlDocument();
        if (SlipStreamObject == null)
        {
            stream = GetComponent <SlipStream>();
        }
        else
        {
            stream = SlipStreamObject.GetComponent <SlipStream>();
        }
    }
    void Start()
    {
        xmlDoc= new XmlDocument();
        SlipStreamComponent = GameObject.FindObjectOfType<SlipStream>();
        SlipStreamComponent.PacketNotification += new PacketReceivedHandler(OnPacketReceived);

        if(origin == null) {
            origin = new GameObject("Origin").transform;
        }

        /* NEW CODE */
        multiSkeletonBones = new SkeletonBones[skeletonList.Count];

        nBones = skeletonBonesList.Count/skeletonList.Count; // number of bones per skeleton (assuming they've the same amount)

        for (int i = 0; i < multiSkeletonBones.Length; i++) {
            multiSkeletonBones[i] = new SkeletonBones();
            multiSkeletonBones[i].skeletonBonesIDs = new int[nBones];
            multiSkeletonBones[i].skeletonBonesNames = new string[nBones];
            multiSkeletonBones[i].skeletonBonesPositions = new Vector3[nBones];
            multiSkeletonBones[i].skeletonBonesQuaternions = new Quaternion[nBones];
        }
        /* END OF NEW CODE */
    }