コード例 #1
0
ファイル: BuildBoard.cs プロジェクト: elegios/MShip2
    void DoBuild(NetworkViewID thingID)
    {
        Transform thing = NetworkView.Find(thingID).transform;

        thing.position = buildPoint.position;
        thing.rotation = buildPoint.rotation;
        thing.parent   = transform.parent;

        StationLink stationLink = thing.transform.Find("StationPart").GetComponent <StationLink>();

        if (Network.isServer)
        {
            stationLink.SetParent(transform.parent.GetComponent <StationLink>());
        }
        transform.parent.GetComponent <StationLink>().ChildAdded(gameObject, stationLink);

        DoActivate(false);
    }