/*private VigObject FUN_2BF44(ConfigContainer container, Type component) * { * obj[currentID].flags = (uint)((configContainers[container].flag & 0x800) != 0 ? 1 : 0) << 4; * obj[currentID].vr = configContainers[container].v3_2; * obj[currentID].screen = configContainers[container].v3_1; * obj[currentID].vData = this; * * if ((configContainers[container].flag & 0x7FF) < 0x7FF) * { * //apply 3d model; not necessery since it's been applied from the inspector * } * * if (-1 < configContainers[container].colliderID) * { * //apply collider; not necessery since it's been applied from the inspector * } * * return obj[currentID]; * }*/ public VigObject FUN_2BF44(ConfigContainer container, Type component) { ushort uVar2; VigObject oVar3; VigMesh mVar4; GameObject obj = new GameObject(); oVar3 = obj.AddComponent(component) as VigObject; uVar2 = container.flag; oVar3.flags = (uint)((uVar2 & 0x800) != 0 ? 1 : 0) << 4; oVar3.vr = container.v3_2; oVar3.screen = container.v3_1; oVar3.vData = xobf; if ((uVar2 & 0x7ff) < 0x7ff) { mVar4 = xobf.FUN_1FD18(obj, (uint)(uVar2 & 0x7ff), true); oVar3.vMesh = mVar4; } if (-1 < container.colliderID) { VigCollider vCollider = xobf.cbbList[container.colliderID]; oVar3.vCollider = new VigCollider(vCollider.buffer); } return(oVar3); }
public new VigObject FUN_2C344(XOBF_DB param1, ushort param2, uint param3) { VigMesh mVar1; int iVar2; VigObject oVar3; BufferedBinaryReader brVar4; ConfigContainer puVar5; puVar5 = param1.ini.configContainers[param2]; if ((puVar5.flag & 0x7ff) == 0x7ff) { vMesh = null; } else { mVar1 = param1.FUN_1FD18(gameObject, puVar5.flag & 0x7ffU, true); vMesh = mVar1; } if (puVar5.colliderID < 0) { vCollider = null; } else { VigCollider collider = param1.cbbList[puVar5.colliderID]; vCollider = new VigCollider(collider.buffer); } vData = param1; DAT_1A = (short)param2; if ((param3 & 8) == 0) { vAnim = null; } else { brVar4 = new BufferedBinaryReader(param1.animations); if (brVar4.GetBuffer() != null) { iVar2 = brVar4.ReadInt32(param2 * 4 + 4); if (iVar2 != 0) { brVar4.Seek(iVar2, SeekOrigin.Begin); } else { brVar4 = null; } } else { brVar4 = null; } vAnim = brVar4; } DAT_4A = GameManager.instance.timer; if ((param3 & 2) == 0 && puVar5.next != 0xffff) { oVar3 = param1.ini.FUN_2C17C_3(puVar5.next, typeof(WheelChild), param3 | 0x21); child2 = oVar3; if (oVar3 != null) { oVar3.ApplyTransformation(); child2.parent = this; } } else { child2 = null; } return(this); }