コード例 #1
0
ファイル: StationLink.cs プロジェクト: elegios/MShip2
    //Must be called from code that is run for all players
    public void ChildAdded(GameObject buildBoard, StationLink child)
    {
        int i = 0;

        while (i < buildBoards.Length && buildBoards[i] != buildBoard)
        {
            i++;
        }
        if (i == buildBoards.Length)
        {
            print("Couldn't find the buildboard that built the child");
            return;
        }

        children[i] = child;
        child.GetComponent <Mass>().TransferMassTo(transform.root.rigidbody);
        Destroy(buildBoards[i]);
    }