public static Transform ConnectPartModels(CorePartModelConnectionData core, PartModelConnectionData head, PartModelConnectionData leftWepon,
                                              PartModelConnectionData rightWepon, PartModelConnectionData leg)
    {
        Vector3 zero = new Vector3(0, 0, 0);

        //移動や向きの関係からレッグが親でコアがその子 残りはコアの子になる
        core.LegConnectionTrans.SetParent(leg.ConnectionTrans);
        core.LegConnectionTrans.localPosition = zero;
        //core.LegConnectionTrans.localScale = new Vector3(1, 1, 1);
        head.ConnectionTrans.SetParent(core.HeadConnectionTrans);
        head.ConnectionTrans.localPosition = zero;

        leftWepon.ConnectionTrans.SetParent(core.LeftWeponConnectionTrans);
        leftWepon.ConnectionTrans.localPosition = zero;

        rightWepon.ConnectionTrans.SetParent(core.RightWeponConnectionTrans);
        rightWepon.ConnectionTrans.localPosition = zero;

        return(leg.transform);
    }
Beispiel #2
0
    //モデル生成
    public PartModelConnectionData CreateModel(PartModelConnectionData prefab)
    {
        var ins = Instantiate <PartModelConnectionData>(prefab);

        return(ins);
    }