| @@ -0,0 +1,83 @@ | ||
| %YAML 1.1 | ||
| %TAG !u! tag:unity3d.com,2011: | ||
| --- !u!1 &110218 | ||
| GameObject: | ||
| m_ObjectHideFlags: 0 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 100100000} | ||
| serializedVersion: 4 | ||
| m_Component: | ||
| - 4: {fileID: 410218} | ||
| - 33: {fileID: 3310218} | ||
| - 65: {fileID: 6510218} | ||
| - 23: {fileID: 2310218} | ||
| m_Layer: 0 | ||
| m_Name: Ground | ||
| m_TagString: Untagged | ||
| m_Icon: {fileID: 0} | ||
| m_NavMeshLayer: 0 | ||
| m_StaticEditorFlags: 0 | ||
| m_IsActive: 1 | ||
| --- !u!4 &410218 | ||
| Transform: | ||
| m_ObjectHideFlags: 1 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 100100000} | ||
| m_GameObject: {fileID: 110218} | ||
| m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} | ||
| m_LocalPosition: {x: 0, y: 0, z: 0} | ||
| m_LocalScale: {x: 48.2234955, y: -.160010383, z: 48.2234879} | ||
| m_Children: [] | ||
| m_Father: {fileID: 0} | ||
| m_RootOrder: 0 | ||
| --- !u!23 &2310218 | ||
| Renderer: | ||
| m_ObjectHideFlags: 1 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 100100000} | ||
| m_GameObject: {fileID: 110218} | ||
| m_Enabled: 1 | ||
| m_CastShadows: 1 | ||
| m_ReceiveShadows: 1 | ||
| m_LightmapIndex: 255 | ||
| m_LightmapTilingOffset: {x: 1, y: 1, z: 0, w: 0} | ||
| m_Materials: | ||
| - {fileID: 2100000, guid: 86cc962a32d10494d83fcb846f6328ff, type: 2} | ||
| m_SubsetIndices: | ||
| m_StaticBatchRoot: {fileID: 0} | ||
| m_UseLightProbes: 0 | ||
| m_LightProbeAnchor: {fileID: 0} | ||
| m_ScaleInLightmap: 1 | ||
| m_SortingLayerID: 0 | ||
| m_SortingOrder: 0 | ||
| --- !u!33 &3310218 | ||
| MeshFilter: | ||
| m_ObjectHideFlags: 1 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 100100000} | ||
| m_GameObject: {fileID: 110218} | ||
| m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} | ||
| --- !u!65 &6510218 | ||
| BoxCollider: | ||
| m_ObjectHideFlags: 1 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 100100000} | ||
| m_GameObject: {fileID: 110218} | ||
| m_Material: {fileID: 0} | ||
| m_IsTrigger: 0 | ||
| m_Enabled: 1 | ||
| serializedVersion: 2 | ||
| m_Size: {x: 1, y: 1, z: 1} | ||
| m_Center: {x: 0, y: 0, z: 0} | ||
| --- !u!1001 &100100000 | ||
| Prefab: | ||
| m_ObjectHideFlags: 1 | ||
| serializedVersion: 2 | ||
| m_Modification: | ||
| m_TransformParent: {fileID: 0} | ||
| m_Modifications: [] | ||
| m_RemovedComponents: [] | ||
| m_ParentPrefab: {fileID: 0} | ||
| m_RootGameObject: {fileID: 110218} | ||
| m_IsPrefabParent: 1 | ||
| m_IsExploded: 1 |
| @@ -0,0 +1,168 @@ | ||
| %YAML 1.1 | ||
| %TAG !u! tag:unity3d.com,2011: | ||
| --- !u!1 &166966 | ||
| GameObject: | ||
| m_ObjectHideFlags: 0 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 100100000} | ||
| serializedVersion: 4 | ||
| m_Component: | ||
| - 4: {fileID: 483828} | ||
| - 33: {fileID: 3311786} | ||
| - 23: {fileID: 2365414} | ||
| - 135: {fileID: 13596006} | ||
| - 54: {fileID: 5490672} | ||
| - 114: {fileID: 11455046} | ||
| - 114: {fileID: 11418854} | ||
| - 114: {fileID: 11425872} | ||
| - 114: {fileID: 11426228} | ||
| m_Layer: 9 | ||
| m_Name: RollerBall | ||
| m_TagString: Player | ||
| m_Icon: {fileID: 0} | ||
| m_NavMeshLayer: 0 | ||
| m_StaticEditorFlags: 0 | ||
| m_IsActive: 1 | ||
| --- !u!4 &483828 | ||
| Transform: | ||
| m_ObjectHideFlags: 1 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 100100000} | ||
| m_GameObject: {fileID: 166966} | ||
| m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} | ||
| m_LocalPosition: {x: -.839999974, y: 4.03999996, z: -6.30999994} | ||
| m_LocalScale: {x: 1, y: 1, z: 1} | ||
| m_Children: [] | ||
| m_Father: {fileID: 0} | ||
| m_RootOrder: 0 | ||
| --- !u!23 &2365414 | ||
| MeshRenderer: | ||
| m_ObjectHideFlags: 1 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 100100000} | ||
| m_GameObject: {fileID: 166966} | ||
| m_Enabled: 1 | ||
| m_CastShadows: 1 | ||
| m_ReceiveShadows: 1 | ||
| m_Materials: | ||
| - {fileID: 2100000, guid: e4a12fd3405832f448a43cdddb4a4e87, type: 2} | ||
| m_SubsetIndices: | ||
| m_StaticBatchRoot: {fileID: 0} | ||
| m_UseLightProbes: 0 | ||
| m_ReflectionProbeUsage: 1 | ||
| m_ProbeAnchor: {fileID: 0} | ||
| m_ScaleInLightmap: 1 | ||
| m_PreserveUVs: 0 | ||
| m_ImportantGI: 0 | ||
| m_AutoUVMaxDistance: .5 | ||
| m_AutoUVMaxAngle: 89 | ||
| m_LightmapParameters: {fileID: 0} | ||
| m_SortingLayerID: 0 | ||
| m_SortingOrder: 0 | ||
| --- !u!33 &3311786 | ||
| MeshFilter: | ||
| m_ObjectHideFlags: 1 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 100100000} | ||
| m_GameObject: {fileID: 166966} | ||
| m_Mesh: {fileID: 4300052, guid: d05d496cb4f43c14e80630addd23652e, type: 3} | ||
| --- !u!54 &5490672 | ||
| Rigidbody: | ||
| m_ObjectHideFlags: 1 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 100100000} | ||
| m_GameObject: {fileID: 166966} | ||
| serializedVersion: 2 | ||
| m_Mass: 1 | ||
| m_Drag: .100000001 | ||
| m_AngularDrag: 1 | ||
| m_UseGravity: 1 | ||
| m_IsKinematic: 0 | ||
| m_Interpolate: 0 | ||
| m_Constraints: 0 | ||
| m_CollisionDetection: 0 | ||
| --- !u!114 &11418854 | ||
| MonoBehaviour: | ||
| m_ObjectHideFlags: 1 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 100100000} | ||
| m_GameObject: {fileID: 166966} | ||
| m_Enabled: 0 | ||
| m_EditorHideFlags: 0 | ||
| m_Script: {fileID: 11500000, guid: daa7e0829bc72c94babd728cc0466196, type: 3} | ||
| m_Name: | ||
| m_EditorClassIdentifier: | ||
| --- !u!114 &11425872 | ||
| MonoBehaviour: | ||
| m_ObjectHideFlags: 1 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 100100000} | ||
| m_GameObject: {fileID: 166966} | ||
| m_Enabled: 1 | ||
| m_EditorHideFlags: 0 | ||
| m_Script: {fileID: 11500000, guid: aa584fbee541324448dd18d8409c7a41, type: 3} | ||
| m_Name: | ||
| m_EditorClassIdentifier: | ||
| ownerId: 0 | ||
| group: 0 | ||
| prefixBackup: -1 | ||
| observed: {fileID: 0} | ||
| synchronization: 3 | ||
| onSerializeTransformOption: 3 | ||
| onSerializeRigidBodyOption: 2 | ||
| ownershipTransfer: 0 | ||
| ObservedComponents: | ||
| - {fileID: 11426228} | ||
| ObservedComponentsFoldoutOpen: 1 | ||
| viewIdField: 0 | ||
| instantiationId: -1 | ||
| isRuntimeInstantiated: 0 | ||
| --- !u!114 &11426228 | ||
| MonoBehaviour: | ||
| m_ObjectHideFlags: 1 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 100100000} | ||
| m_GameObject: {fileID: 166966} | ||
| m_Enabled: 1 | ||
| m_EditorHideFlags: 0 | ||
| m_Script: {fileID: 11500000, guid: 9eb9ac6044a044249ae4bec9304cdb7b, type: 3} | ||
| m_Name: | ||
| m_EditorClassIdentifier: | ||
| --- !u!114 &11455046 | ||
| MonoBehaviour: | ||
| m_ObjectHideFlags: 1 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 100100000} | ||
| m_GameObject: {fileID: 166966} | ||
| m_Enabled: 1 | ||
| m_EditorHideFlags: 0 | ||
| m_Script: {fileID: 11500000, guid: e004fefca5c7ba44d9c5ffd46fdee2ed, type: 3} | ||
| m_Name: | ||
| m_EditorClassIdentifier: | ||
| m_MovePower: 5 | ||
| m_UseTorque: 1 | ||
| m_MaxAngularVelocity: 25 | ||
| m_JumpPower: 4 | ||
| --- !u!135 &13596006 | ||
| SphereCollider: | ||
| m_ObjectHideFlags: 1 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 100100000} | ||
| m_GameObject: {fileID: 166966} | ||
| m_Material: {fileID: 0} | ||
| m_IsTrigger: 0 | ||
| m_Enabled: 1 | ||
| serializedVersion: 2 | ||
| m_Radius: .5 | ||
| m_Center: {x: 0, y: 0, z: 0} | ||
| --- !u!1001 &100100000 | ||
| Prefab: | ||
| m_ObjectHideFlags: 1 | ||
| serializedVersion: 2 | ||
| m_Modification: | ||
| m_TransformParent: {fileID: 0} | ||
| m_Modifications: [] | ||
| m_RemovedComponents: [] | ||
| m_ParentPrefab: {fileID: 0} | ||
| m_RootGameObject: {fileID: 166966} | ||
| m_IsPrefabParent: 1 |
| @@ -0,0 +1,191 @@ | ||
| %YAML 1.1 | ||
| %TAG !u! tag:unity3d.com,2011: | ||
| --- !u!21 &2100000 | ||
| Material: | ||
| serializedVersion: 4 | ||
| m_ObjectHideFlags: 0 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 0} | ||
| m_Name: RollerBallGrey | ||
| m_Shader: {fileID: 45, guid: 0000000000000000f000000000000000, type: 0} | ||
| m_ShaderKeywords: _LIGHTMAPPING_BAKED _LIGHTMAPPING_STATIC_LIGHTMAPS _UVPRIM_UV1 | ||
| _UVSEC_UV1 | ||
| m_CustomRenderQueue: -1 | ||
| m_SavedProperties: | ||
| serializedVersion: 2 | ||
| m_TexEnvs: | ||
| data: | ||
| first: | ||
| name: _MainTex | ||
| second: | ||
| m_Texture: {fileID: 0} | ||
| m_Scale: {x: 1, y: 1} | ||
| m_Offset: {x: 0, y: 0} | ||
| data: | ||
| first: | ||
| name: _BumpMap | ||
| second: | ||
| m_Texture: {fileID: 0} | ||
| m_Scale: {x: 1, y: 1} | ||
| m_Offset: {x: 0, y: 0} | ||
| data: | ||
| first: | ||
| name: _DetailNormalMap | ||
| second: | ||
| m_Texture: {fileID: 0} | ||
| m_Scale: {x: 1, y: 1} | ||
| m_Offset: {x: 0, y: 0} | ||
| data: | ||
| first: | ||
| name: _EmissionMap | ||
| second: | ||
| m_Texture: {fileID: 0} | ||
| m_Scale: {x: 1, y: 1} | ||
| m_Offset: {x: 0, y: 0} | ||
| data: | ||
| first: | ||
| name: _ParallaxMap | ||
| second: | ||
| m_Texture: {fileID: 0} | ||
| m_Scale: {x: 1, y: 1} | ||
| m_Offset: {x: 0, y: 0} | ||
| data: | ||
| first: | ||
| name: _Occlusion | ||
| second: | ||
| m_Texture: {fileID: 0} | ||
| m_Scale: {x: 1, y: 1} | ||
| m_Offset: {x: 0, y: 0} | ||
| data: | ||
| first: | ||
| name: _SpecGlossMap | ||
| second: | ||
| m_Texture: {fileID: 0} | ||
| m_Scale: {x: 1, y: 1} | ||
| m_Offset: {x: 0, y: 0} | ||
| data: | ||
| first: | ||
| name: _DetailMask | ||
| second: | ||
| m_Texture: {fileID: 0} | ||
| m_Scale: {x: 1, y: 1} | ||
| m_Offset: {x: 0, y: 0} | ||
| data: | ||
| first: | ||
| name: _DetailAlbedoMap | ||
| second: | ||
| m_Texture: {fileID: 0} | ||
| m_Scale: {x: 1, y: 1} | ||
| m_Offset: {x: 0, y: 0} | ||
| data: | ||
| first: | ||
| name: _OcclusionMap | ||
| second: | ||
| m_Texture: {fileID: 0} | ||
| m_Scale: {x: 1, y: 1} | ||
| m_Offset: {x: 0, y: 0} | ||
| data: | ||
| first: | ||
| name: _MetallicGlossMap | ||
| second: | ||
| m_Texture: {fileID: 0} | ||
| m_Scale: {x: 1, y: 1} | ||
| m_Offset: {x: 0, y: 0} | ||
| m_Floats: | ||
| data: | ||
| first: | ||
| name: _AlphaTestRef | ||
| second: .5 | ||
| data: | ||
| first: | ||
| name: _Lightmapping | ||
| second: 0 | ||
| data: | ||
| first: | ||
| name: _SrcBlend | ||
| second: 1 | ||
| data: | ||
| first: | ||
| name: _DstBlend | ||
| second: 0 | ||
| data: | ||
| first: | ||
| name: _Parallax | ||
| second: .0199999996 | ||
| data: | ||
| first: | ||
| name: _ZWrite | ||
| second: 1 | ||
| data: | ||
| first: | ||
| name: _Glossiness | ||
| second: .200000003 | ||
| data: | ||
| first: | ||
| name: _BumpScale | ||
| second: 1 | ||
| data: | ||
| first: | ||
| name: _OcclusionStrength | ||
| second: 1 | ||
| data: | ||
| first: | ||
| name: _DetailNormalMapScale | ||
| second: 1 | ||
| data: | ||
| first: | ||
| name: _UVSec | ||
| second: 0 | ||
| data: | ||
| first: | ||
| name: _Mode | ||
| second: 0 | ||
| data: | ||
| first: | ||
| name: _EmissionScaleUI | ||
| second: 1 | ||
| data: | ||
| first: | ||
| name: _EmissionScale | ||
| second: 1 | ||
| data: | ||
| first: | ||
| name: _DetailAlbedoMultiplier | ||
| second: 2 | ||
| data: | ||
| first: | ||
| name: _UVPrim | ||
| second: 0 | ||
| data: | ||
| first: | ||
| name: _DetailMode | ||
| second: 0 | ||
| data: | ||
| first: | ||
| name: _Metallic | ||
| second: 0 | ||
| m_Colors: | ||
| data: | ||
| first: | ||
| name: _EmissionColor | ||
| second: {r: 0, g: 0, b: 0, a: 1} | ||
| data: | ||
| first: | ||
| name: _Color | ||
| second: {r: .498039216, g: .498039216, b: .498039216, a: 1} | ||
| data: | ||
| first: | ||
| name: _SpecularColor | ||
| second: {r: .0588235259, g: .0588235259, b: .0588235259, a: 1} | ||
| data: | ||
| first: | ||
| name: _EmissionColorUI | ||
| second: {r: 0, g: 0, b: 0, a: 1} | ||
| data: | ||
| first: | ||
| name: _EmissionColorWithMapUI | ||
| second: {r: 1, g: 1, b: 1, a: 1} | ||
| data: | ||
| first: | ||
| name: _SpecColor | ||
| second: {r: .235294119, g: .235294119, b: .235294119, a: 1} |
| @@ -0,0 +1,191 @@ | ||
| %YAML 1.1 | ||
| %TAG !u! tag:unity3d.com,2011: | ||
| --- !u!21 &2100000 | ||
| Material: | ||
| serializedVersion: 4 | ||
| m_ObjectHideFlags: 0 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 0} | ||
| m_Name: RollerBallWhite | ||
| m_Shader: {fileID: 45, guid: 0000000000000000f000000000000000, type: 0} | ||
| m_ShaderKeywords: _LIGHTMAPPING_BAKED _LIGHTMAPPING_STATIC_LIGHTMAPS _UVPRIM_UV1 | ||
| _UVSEC_UV1 | ||
| m_CustomRenderQueue: -1 | ||
| m_SavedProperties: | ||
| serializedVersion: 2 | ||
| m_TexEnvs: | ||
| data: | ||
| first: | ||
| name: _MainTex | ||
| second: | ||
| m_Texture: {fileID: 0} | ||
| m_Scale: {x: 1, y: 1} | ||
| m_Offset: {x: 0, y: 0} | ||
| data: | ||
| first: | ||
| name: _BumpMap | ||
| second: | ||
| m_Texture: {fileID: 0} | ||
| m_Scale: {x: 1, y: 1} | ||
| m_Offset: {x: 0, y: 0} | ||
| data: | ||
| first: | ||
| name: _DetailNormalMap | ||
| second: | ||
| m_Texture: {fileID: 0} | ||
| m_Scale: {x: 1, y: 1} | ||
| m_Offset: {x: 0, y: 0} | ||
| data: | ||
| first: | ||
| name: _EmissionMap | ||
| second: | ||
| m_Texture: {fileID: 0} | ||
| m_Scale: {x: 1, y: 1} | ||
| m_Offset: {x: 0, y: 0} | ||
| data: | ||
| first: | ||
| name: _ParallaxMap | ||
| second: | ||
| m_Texture: {fileID: 0} | ||
| m_Scale: {x: 1, y: 1} | ||
| m_Offset: {x: 0, y: 0} | ||
| data: | ||
| first: | ||
| name: _Occlusion | ||
| second: | ||
| m_Texture: {fileID: 0} | ||
| m_Scale: {x: 1, y: 1} | ||
| m_Offset: {x: 0, y: 0} | ||
| data: | ||
| first: | ||
| name: _SpecGlossMap | ||
| second: | ||
| m_Texture: {fileID: 0} | ||
| m_Scale: {x: 1, y: 1} | ||
| m_Offset: {x: 0, y: 0} | ||
| data: | ||
| first: | ||
| name: _DetailMask | ||
| second: | ||
| m_Texture: {fileID: 0} | ||
| m_Scale: {x: 1, y: 1} | ||
| m_Offset: {x: 0, y: 0} | ||
| data: | ||
| first: | ||
| name: _DetailAlbedoMap | ||
| second: | ||
| m_Texture: {fileID: 0} | ||
| m_Scale: {x: 1, y: 1} | ||
| m_Offset: {x: 0, y: 0} | ||
| data: | ||
| first: | ||
| name: _OcclusionMap | ||
| second: | ||
| m_Texture: {fileID: 0} | ||
| m_Scale: {x: 1, y: 1} | ||
| m_Offset: {x: 0, y: 0} | ||
| data: | ||
| first: | ||
| name: _MetallicGlossMap | ||
| second: | ||
| m_Texture: {fileID: 0} | ||
| m_Scale: {x: 1, y: 1} | ||
| m_Offset: {x: 0, y: 0} | ||
| m_Floats: | ||
| data: | ||
| first: | ||
| name: _AlphaTestRef | ||
| second: .5 | ||
| data: | ||
| first: | ||
| name: _Lightmapping | ||
| second: 0 | ||
| data: | ||
| first: | ||
| name: _SrcBlend | ||
| second: 1 | ||
| data: | ||
| first: | ||
| name: _DstBlend | ||
| second: 0 | ||
| data: | ||
| first: | ||
| name: _Parallax | ||
| second: .0199999996 | ||
| data: | ||
| first: | ||
| name: _ZWrite | ||
| second: 1 | ||
| data: | ||
| first: | ||
| name: _Glossiness | ||
| second: .200000003 | ||
| data: | ||
| first: | ||
| name: _BumpScale | ||
| second: 1 | ||
| data: | ||
| first: | ||
| name: _OcclusionStrength | ||
| second: 1 | ||
| data: | ||
| first: | ||
| name: _DetailNormalMapScale | ||
| second: 1 | ||
| data: | ||
| first: | ||
| name: _UVSec | ||
| second: 0 | ||
| data: | ||
| first: | ||
| name: _Mode | ||
| second: 0 | ||
| data: | ||
| first: | ||
| name: _EmissionScaleUI | ||
| second: 1 | ||
| data: | ||
| first: | ||
| name: _Metallic | ||
| second: 0 | ||
| data: | ||
| first: | ||
| name: _EmissionScale | ||
| second: 1 | ||
| data: | ||
| first: | ||
| name: _DetailAlbedoMultiplier | ||
| second: 2 | ||
| data: | ||
| first: | ||
| name: _UVPrim | ||
| second: 0 | ||
| data: | ||
| first: | ||
| name: _DetailMode | ||
| second: 0 | ||
| m_Colors: | ||
| data: | ||
| first: | ||
| name: _EmissionColor | ||
| second: {r: 0, g: 0, b: 0, a: 1} | ||
| data: | ||
| first: | ||
| name: _Color | ||
| second: {r: 1, g: 1, b: 1, a: 1} | ||
| data: | ||
| first: | ||
| name: _SpecularColor | ||
| second: {r: .0588235259, g: .0588235259, b: .0588235259, a: 1} | ||
| data: | ||
| first: | ||
| name: _EmissionColorUI | ||
| second: {r: 0, g: 0, b: 0, a: 1} | ||
| data: | ||
| first: | ||
| name: _EmissionColorWithMapUI | ||
| second: {r: 1, g: 1, b: 1, a: 1} | ||
| data: | ||
| first: | ||
| name: _SpecColor | ||
| second: {r: .235294119, g: .235294119, b: .235294119, a: 1} |
| @@ -0,0 +1,15 @@ | ||
| The RollerBall prefab is a very simple controllable example which is designed to be used as-is. Just drop the prefab into your scene and you're good to go. It's designed as a minimal demonstration of using our Cross Platform Input scripts, and to demonstrate the way we've chosen to separate the input from the mechanics of the controller, so that you're free to swap in other input styles or AI controls. | ||
|
|
||
| The ball converts its input to camera-relative motion, so it works fine with any of the camera rigs provided - even the CCTV Camera Rig! | ||
|
|
||
| The simplest way to get started with the rolling ball controller is to: | ||
|
|
||
| 1) Start with a suitable scene. There ought to be enough flat ground to roll around on. | ||
|
|
||
| 2) Place the "RollerBall" prefab in the scene. | ||
|
|
||
| 3) Place a camera rig in the scene, from the Cameras folder. | ||
|
|
||
| 4) If present, delete the "Main Camera" that exists in new scenes by default. The camera rigs contain their own camera, so you don't need the default camera. | ||
|
|
||
| There are a number of simple adjustable settings on the Ball allowing you to change the handling and jump power. For more information, see the comments in the script. |
| @@ -0,0 +1,86 @@ | ||
| %YAML 1.1 | ||
| %TAG !u! tag:unity3d.com,2011: | ||
| --- !u!1 &151386 | ||
| GameObject: | ||
| m_ObjectHideFlags: 0 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 100100000} | ||
| serializedVersion: 4 | ||
| m_Component: | ||
| - 4: {fileID: 408658} | ||
| - 33: {fileID: 3366096} | ||
| - 65: {fileID: 6546528} | ||
| - 23: {fileID: 2360962} | ||
| m_Layer: 0 | ||
| m_Name: SpawnLocation | ||
| m_TagString: Untagged | ||
| m_Icon: {fileID: 0} | ||
| m_NavMeshLayer: 0 | ||
| m_StaticEditorFlags: 4294967295 | ||
| m_IsActive: 1 | ||
| --- !u!4 &408658 | ||
| Transform: | ||
| m_ObjectHideFlags: 1 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 100100000} | ||
| m_GameObject: {fileID: 151386} | ||
| m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} | ||
| m_LocalPosition: {x: 0, y: .100000001, z: -7.8499999} | ||
| m_LocalScale: {x: 1, y: 1, z: 1} | ||
| m_Children: [] | ||
| m_Father: {fileID: 0} | ||
| m_RootOrder: 0 | ||
| --- !u!23 &2360962 | ||
| MeshRenderer: | ||
| m_ObjectHideFlags: 1 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 100100000} | ||
| m_GameObject: {fileID: 151386} | ||
| m_Enabled: 0 | ||
| m_CastShadows: 1 | ||
| m_ReceiveShadows: 1 | ||
| m_Materials: | ||
| - {fileID: 10302, guid: 0000000000000000f000000000000000, type: 0} | ||
| m_SubsetIndices: | ||
| m_StaticBatchRoot: {fileID: 0} | ||
| m_UseLightProbes: 0 | ||
| m_ReflectionProbeUsage: 1 | ||
| m_ProbeAnchor: {fileID: 0} | ||
| m_ScaleInLightmap: 1 | ||
| m_PreserveUVs: 0 | ||
| m_ImportantGI: 0 | ||
| m_AutoUVMaxDistance: .5 | ||
| m_AutoUVMaxAngle: 89 | ||
| m_LightmapParameters: {fileID: 0} | ||
| m_SortingLayerID: 0 | ||
| m_SortingOrder: 0 | ||
| --- !u!33 &3366096 | ||
| MeshFilter: | ||
| m_ObjectHideFlags: 1 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 100100000} | ||
| m_GameObject: {fileID: 151386} | ||
| m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} | ||
| --- !u!65 &6546528 | ||
| BoxCollider: | ||
| m_ObjectHideFlags: 1 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 100100000} | ||
| m_GameObject: {fileID: 151386} | ||
| m_Material: {fileID: 0} | ||
| m_IsTrigger: 0 | ||
| m_Enabled: 0 | ||
| serializedVersion: 2 | ||
| m_Size: {x: 1, y: 1, z: 1} | ||
| m_Center: {x: 0, y: 0, z: 0} | ||
| --- !u!1001 &100100000 | ||
| Prefab: | ||
| m_ObjectHideFlags: 1 | ||
| serializedVersion: 2 | ||
| m_Modification: | ||
| m_TransformParent: {fileID: 0} | ||
| m_Modifications: [] | ||
| m_RemovedComponents: [] | ||
| m_ParentPrefab: {fileID: 0} | ||
| m_RootGameObject: {fileID: 151386} | ||
| m_IsPrefabParent: 1 |
| @@ -0,0 +1,52 @@ | ||
| %YAML 1.1 | ||
| %TAG !u! tag:unity3d.com,2011: | ||
| --- !u!1 &108336 | ||
| GameObject: | ||
| m_ObjectHideFlags: 0 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 100100000} | ||
| serializedVersion: 4 | ||
| m_Component: | ||
| - 4: {fileID: 492272} | ||
| - 114: {fileID: 11490066} | ||
| m_Layer: 0 | ||
| m_Name: _SCRIPTS | ||
| m_TagString: Untagged | ||
| m_Icon: {fileID: 0} | ||
| m_NavMeshLayer: 0 | ||
| m_StaticEditorFlags: 0 | ||
| m_IsActive: 1 | ||
| --- !u!4 &492272 | ||
| Transform: | ||
| m_ObjectHideFlags: 1 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 100100000} | ||
| m_GameObject: {fileID: 108336} | ||
| m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} | ||
| m_LocalPosition: {x: 0, y: 0, z: 0} | ||
| m_LocalScale: {x: 1, y: 1, z: 1} | ||
| m_Children: [] | ||
| m_Father: {fileID: 0} | ||
| m_RootOrder: 0 | ||
| --- !u!114 &11490066 | ||
| MonoBehaviour: | ||
| m_ObjectHideFlags: 1 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 100100000} | ||
| m_GameObject: {fileID: 108336} | ||
| m_Enabled: 1 | ||
| m_EditorHideFlags: 0 | ||
| m_Script: {fileID: 11500000, guid: a6e881f3d1c053c4387fd6d1940c6986, type: 3} | ||
| m_Name: | ||
| m_EditorClassIdentifier: | ||
| --- !u!1001 &100100000 | ||
| Prefab: | ||
| m_ObjectHideFlags: 1 | ||
| serializedVersion: 2 | ||
| m_Modification: | ||
| m_TransformParent: {fileID: 0} | ||
| m_Modifications: [] | ||
| m_RemovedComponents: [] | ||
| m_ParentPrefab: {fileID: 0} | ||
| m_RootGameObject: {fileID: 108336} | ||
| m_IsPrefabParent: 1 |
| @@ -0,0 +1,124 @@ | ||
| %YAML 1.1 | ||
| %TAG !u! tag:unity3d.com,2011: | ||
| --- !u!21 &2100000 | ||
| Material: | ||
| serializedVersion: 3 | ||
| m_ObjectHideFlags: 0 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 0} | ||
| m_Name: earth_sphere | ||
| m_Shader: {fileID: 10, guid: 0000000000000000f000000000000000, type: 0} | ||
| m_ShaderKeywords: [] | ||
| m_CustomRenderQueue: -1 | ||
| m_SavedProperties: | ||
| serializedVersion: 2 | ||
| m_TexEnvs: | ||
| data: | ||
| first: | ||
| name: _MainTex | ||
| second: | ||
| m_Texture: {fileID: 2800000, guid: 6bcb10c57eede3e489d8e1057228057e, type: 3} | ||
| m_Scale: {x: 1, y: 1} | ||
| m_Offset: {x: 0, y: 0} | ||
| data: | ||
| first: | ||
| name: _Control | ||
| second: | ||
| m_Texture: {fileID: 0} | ||
| m_Scale: {x: 1, y: 1} | ||
| m_Offset: {x: 0, y: 0} | ||
| data: | ||
| first: | ||
| name: _BumpMap | ||
| second: | ||
| m_Texture: {fileID: 0} | ||
| m_Scale: {x: 1, y: 1} | ||
| m_Offset: {x: 0, y: 0} | ||
| data: | ||
| first: | ||
| name: _DecalTex | ||
| second: | ||
| m_Texture: {fileID: 0} | ||
| m_Scale: {x: 1, y: 1} | ||
| m_Offset: {x: 0, y: 0} | ||
| data: | ||
| first: | ||
| name: _Illum | ||
| second: | ||
| m_Texture: {fileID: 0} | ||
| m_Scale: {x: 1, y: 1} | ||
| m_Offset: {x: 0, y: 0} | ||
| data: | ||
| first: | ||
| name: _Splat3 | ||
| second: | ||
| m_Texture: {fileID: 0} | ||
| m_Scale: {x: 1, y: 1} | ||
| m_Offset: {x: 0, y: 0} | ||
| data: | ||
| first: | ||
| name: _Splat2 | ||
| second: | ||
| m_Texture: {fileID: 0} | ||
| m_Scale: {x: 1, y: 1} | ||
| m_Offset: {x: 0, y: 0} | ||
| data: | ||
| first: | ||
| name: _Splat1 | ||
| second: | ||
| m_Texture: {fileID: 0} | ||
| m_Scale: {x: 1, y: 1} | ||
| m_Offset: {x: 0, y: 0} | ||
| data: | ||
| first: | ||
| name: _Splat0 | ||
| second: | ||
| m_Texture: {fileID: 0} | ||
| m_Scale: {x: 1, y: 1} | ||
| m_Offset: {x: 0, y: 0} | ||
| data: | ||
| first: | ||
| name: _Normal3 | ||
| second: | ||
| m_Texture: {fileID: 0} | ||
| m_Scale: {x: 1, y: 1} | ||
| m_Offset: {x: 0, y: 0} | ||
| data: | ||
| first: | ||
| name: _Normal2 | ||
| second: | ||
| m_Texture: {fileID: 0} | ||
| m_Scale: {x: 1, y: 1} | ||
| m_Offset: {x: 0, y: 0} | ||
| data: | ||
| first: | ||
| name: _Normal1 | ||
| second: | ||
| m_Texture: {fileID: 0} | ||
| m_Scale: {x: 1, y: 1} | ||
| m_Offset: {x: 0, y: 0} | ||
| data: | ||
| first: | ||
| name: _Normal0 | ||
| second: | ||
| m_Texture: {fileID: 0} | ||
| m_Scale: {x: 1, y: 1} | ||
| m_Offset: {x: 0, y: 0} | ||
| m_Floats: | ||
| data: | ||
| first: | ||
| name: _Shininess | ||
| second: .078125 | ||
| data: | ||
| first: | ||
| name: _EmissionLM | ||
| second: 0 | ||
| m_Colors: | ||
| data: | ||
| first: | ||
| name: _Color | ||
| second: {r: 1, g: 1, b: 1, a: 1} | ||
| data: | ||
| first: | ||
| name: _SpecColor | ||
| second: {r: .5, g: .5, b: .5, a: 1} |
| @@ -0,0 +1,28 @@ | ||
| %YAML 1.1 | ||
| %TAG !u! tag:unity3d.com,2011: | ||
| --- !u!21 &2100000 | ||
| Material: | ||
| serializedVersion: 3 | ||
| m_ObjectHideFlags: 0 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 0} | ||
| m_Name: ground01 | ||
| m_Shader: {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} | ||
| m_ShaderKeywords: [] | ||
| m_CustomRenderQueue: -1 | ||
| m_SavedProperties: | ||
| serializedVersion: 2 | ||
| m_TexEnvs: | ||
| data: | ||
| first: | ||
| name: _MainTex | ||
| second: | ||
| m_Texture: {fileID: 2800000, guid: bd88edfe65e4e164192a263f313bbaf7, type: 3} | ||
| m_Scale: {x: 3, y: 3} | ||
| m_Offset: {x: 0, y: 0} | ||
| m_Floats: {} | ||
| m_Colors: | ||
| data: | ||
| first: | ||
| name: _Color | ||
| second: {r: 1, g: 1, b: 1, a: 1} |
| @@ -0,0 +1,390 @@ | ||
| %YAML 1.1 | ||
| %TAG !u! tag:unity3d.com,2011: | ||
| --- !u!29 &1 | ||
| SceneSettings: | ||
| m_ObjectHideFlags: 0 | ||
| m_PVSData: | ||
| m_PVSObjectsArray: [] | ||
| m_PVSPortalsArray: [] | ||
| m_OcclusionBakeSettings: | ||
| smallestOccluder: 5 | ||
| smallestHole: .25 | ||
| backfaceThreshold: 100 | ||
| --- !u!104 &2 | ||
| RenderSettings: | ||
| m_ObjectHideFlags: 0 | ||
| serializedVersion: 6 | ||
| m_Fog: 0 | ||
| m_FogColor: {r: .5, g: .5, b: .5, a: 1} | ||
| m_FogMode: 3 | ||
| m_FogDensity: .00999999978 | ||
| m_LinearFogStart: 0 | ||
| m_LinearFogEnd: 300 | ||
| m_AmbientSkyColor: {r: .211999997, g: .226999998, b: .259000003, a: 1} | ||
| m_AmbientEquatorColor: {r: .114, g: .125, b: .133000001, a: 1} | ||
| m_AmbientGroundColor: {r: .0469999984, g: .0430000015, b: .0350000001, a: 1} | ||
| m_AmbientIntensity: 1 | ||
| m_AmbientMode: 0 | ||
| m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} | ||
| m_HaloStrength: .5 | ||
| m_FlareStrength: 1 | ||
| m_FlareFadeSpeed: 3 | ||
| m_HaloTexture: {fileID: 0} | ||
| m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} | ||
| m_DefaultReflectionMode: 0 | ||
| m_DefaultReflectionResolution: 128 | ||
| m_ReflectionBounces: 1 | ||
| m_ReflectionIntensity: 1 | ||
| m_CustomReflection: {fileID: 0} | ||
| m_Sun: {fileID: 0} | ||
| --- !u!127 &3 | ||
| LevelGameManager: | ||
| m_ObjectHideFlags: 0 | ||
| --- !u!157 &4 | ||
| LightmapSettings: | ||
| m_ObjectHideFlags: 0 | ||
| serializedVersion: 5 | ||
| m_GIWorkflowMode: 0 | ||
| m_LightmapsMode: 1 | ||
| m_GISettings: | ||
| serializedVersion: 2 | ||
| m_BounceScale: 1 | ||
| m_IndirectOutputScale: 1 | ||
| m_AlbedoBoost: 1 | ||
| m_TemporalCoherenceThreshold: 1 | ||
| m_EnvironmentLightingMode: 0 | ||
| m_EnableBakedLightmaps: 1 | ||
| m_EnableRealtimeLightmaps: 1 | ||
| m_LightmapEditorSettings: | ||
| serializedVersion: 3 | ||
| m_Resolution: 2 | ||
| m_BakeResolution: 40 | ||
| m_TextureWidth: 1024 | ||
| m_TextureHeight: 1024 | ||
| m_AOMaxDistance: 1 | ||
| m_Padding: 2 | ||
| m_CompAOExponent: 0 | ||
| m_LightmapParameters: {fileID: 0} | ||
| m_TextureCompression: 1 | ||
| m_FinalGather: 0 | ||
| m_FinalGatherRayCount: 1024 | ||
| m_LightmapSnapshot: {fileID: 0} | ||
| m_RuntimeCPUUsage: 25 | ||
| --- !u!196 &5 | ||
| NavMeshSettings: | ||
| serializedVersion: 2 | ||
| m_ObjectHideFlags: 0 | ||
| m_BuildSettings: | ||
| serializedVersion: 2 | ||
| agentRadius: .5 | ||
| agentHeight: 2 | ||
| agentSlope: 45 | ||
| agentClimb: .400000006 | ||
| ledgeDropHeight: 0 | ||
| maxJumpAcrossDistance: 0 | ||
| accuratePlacement: 0 | ||
| minRegionArea: 2 | ||
| cellSize: .166666672 | ||
| manualCellSize: 0 | ||
| m_NavMeshData: {fileID: 0} | ||
| --- !u!1 &1188966588 | ||
| GameObject: | ||
| m_ObjectHideFlags: 0 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 0} | ||
| serializedVersion: 4 | ||
| m_Component: | ||
| - 4: {fileID: 1188966589} | ||
| m_Layer: 0 | ||
| m_Name: _StaticObjects | ||
| m_TagString: Untagged | ||
| m_Icon: {fileID: 0} | ||
| m_NavMeshLayer: 0 | ||
| m_StaticEditorFlags: 4294967295 | ||
| m_IsActive: 1 | ||
| --- !u!4 &1188966589 | ||
| Transform: | ||
| m_ObjectHideFlags: 0 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 0} | ||
| m_GameObject: {fileID: 1188966588} | ||
| m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} | ||
| m_LocalPosition: {x: 0, y: 0, z: 0} | ||
| m_LocalScale: {x: 1, y: 1, z: 1} | ||
| m_Children: | ||
| - {fileID: 1988081371} | ||
| - {fileID: 1716931683} | ||
| m_Father: {fileID: 0} | ||
| m_RootOrder: 0 | ||
| --- !u!1001 &1256922092 | ||
| Prefab: | ||
| m_ObjectHideFlags: 0 | ||
| serializedVersion: 2 | ||
| m_Modification: | ||
| m_TransformParent: {fileID: 0} | ||
| m_Modifications: | ||
| - target: {fileID: 410218, guid: 88d4aa400d310fd408b7796cbcafcd0f, type: 2} | ||
| propertyPath: m_LocalPosition.x | ||
| value: 0 | ||
| objectReference: {fileID: 0} | ||
| - target: {fileID: 410218, guid: 88d4aa400d310fd408b7796cbcafcd0f, type: 2} | ||
| propertyPath: m_LocalPosition.y | ||
| value: 0 | ||
| objectReference: {fileID: 0} | ||
| - target: {fileID: 410218, guid: 88d4aa400d310fd408b7796cbcafcd0f, type: 2} | ||
| propertyPath: m_LocalPosition.z | ||
| value: 0 | ||
| objectReference: {fileID: 0} | ||
| - target: {fileID: 410218, guid: 88d4aa400d310fd408b7796cbcafcd0f, type: 2} | ||
| propertyPath: m_LocalRotation.x | ||
| value: 0 | ||
| objectReference: {fileID: 0} | ||
| - target: {fileID: 410218, guid: 88d4aa400d310fd408b7796cbcafcd0f, type: 2} | ||
| propertyPath: m_LocalRotation.y | ||
| value: 0 | ||
| objectReference: {fileID: 0} | ||
| - target: {fileID: 410218, guid: 88d4aa400d310fd408b7796cbcafcd0f, type: 2} | ||
| propertyPath: m_LocalRotation.z | ||
| value: 0 | ||
| objectReference: {fileID: 0} | ||
| - target: {fileID: 410218, guid: 88d4aa400d310fd408b7796cbcafcd0f, type: 2} | ||
| propertyPath: m_LocalRotation.w | ||
| value: 1 | ||
| objectReference: {fileID: 0} | ||
| - target: {fileID: 410218, guid: 88d4aa400d310fd408b7796cbcafcd0f, type: 2} | ||
| propertyPath: m_RootOrder | ||
| value: 3 | ||
| objectReference: {fileID: 0} | ||
| m_RemovedComponents: [] | ||
| m_ParentPrefab: {fileID: 100100000, guid: 88d4aa400d310fd408b7796cbcafcd0f, type: 2} | ||
| m_IsPrefabParent: 0 | ||
| --- !u!1 &1490168166 | ||
| GameObject: | ||
| m_ObjectHideFlags: 0 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 0} | ||
| serializedVersion: 4 | ||
| m_Component: | ||
| - 4: {fileID: 1490168168} | ||
| - 114: {fileID: 1490168167} | ||
| m_Layer: 0 | ||
| m_Name: _SCRIPTS | ||
| m_TagString: Untagged | ||
| m_Icon: {fileID: 0} | ||
| m_NavMeshLayer: 0 | ||
| m_StaticEditorFlags: 0 | ||
| m_IsActive: 1 | ||
| --- !u!114 &1490168167 | ||
| MonoBehaviour: | ||
| m_ObjectHideFlags: 0 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 0} | ||
| m_GameObject: {fileID: 1490168166} | ||
| m_Enabled: 1 | ||
| m_EditorHideFlags: 0 | ||
| m_Script: {fileID: 11500000, guid: a6e881f3d1c053c4387fd6d1940c6986, type: 3} | ||
| m_Name: | ||
| m_EditorClassIdentifier: | ||
| --- !u!4 &1490168168 | ||
| Transform: | ||
| m_ObjectHideFlags: 0 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 0} | ||
| m_GameObject: {fileID: 1490168166} | ||
| m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} | ||
| m_LocalPosition: {x: 0, y: 0, z: 0} | ||
| m_LocalScale: {x: 1, y: 1, z: 1} | ||
| m_Children: [] | ||
| m_Father: {fileID: 0} | ||
| m_RootOrder: 1 | ||
| --- !u!1001 &1558910334 | ||
| Prefab: | ||
| m_ObjectHideFlags: 0 | ||
| serializedVersion: 2 | ||
| m_Modification: | ||
| m_TransformParent: {fileID: 0} | ||
| m_Modifications: | ||
| - target: {fileID: 400006, guid: c9799767e9488be47baa3da052e39d10, type: 3} | ||
| propertyPath: m_LocalPosition.x | ||
| value: 0 | ||
| objectReference: {fileID: 0} | ||
| - target: {fileID: 400006, guid: c9799767e9488be47baa3da052e39d10, type: 3} | ||
| propertyPath: m_LocalPosition.y | ||
| value: 0 | ||
| objectReference: {fileID: 0} | ||
| - target: {fileID: 400006, guid: c9799767e9488be47baa3da052e39d10, type: 3} | ||
| propertyPath: m_LocalPosition.z | ||
| value: 0 | ||
| objectReference: {fileID: 0} | ||
| - target: {fileID: 400006, guid: c9799767e9488be47baa3da052e39d10, type: 3} | ||
| propertyPath: m_LocalRotation.x | ||
| value: 0 | ||
| objectReference: {fileID: 0} | ||
| - target: {fileID: 400006, guid: c9799767e9488be47baa3da052e39d10, type: 3} | ||
| propertyPath: m_LocalRotation.y | ||
| value: 0 | ||
| objectReference: {fileID: 0} | ||
| - target: {fileID: 400006, guid: c9799767e9488be47baa3da052e39d10, type: 3} | ||
| propertyPath: m_LocalRotation.z | ||
| value: 0 | ||
| objectReference: {fileID: 0} | ||
| - target: {fileID: 400006, guid: c9799767e9488be47baa3da052e39d10, type: 3} | ||
| propertyPath: m_LocalRotation.w | ||
| value: 1 | ||
| objectReference: {fileID: 0} | ||
| - target: {fileID: 400006, guid: c9799767e9488be47baa3da052e39d10, type: 3} | ||
| propertyPath: m_RootOrder | ||
| value: 2 | ||
| objectReference: {fileID: 0} | ||
| m_RemovedComponents: [] | ||
| m_ParentPrefab: {fileID: 100100000, guid: c9799767e9488be47baa3da052e39d10, type: 3} | ||
| m_IsPrefabParent: 0 | ||
| --- !u!1 &1612532813 | ||
| GameObject: | ||
| m_PrefabParentObject: {fileID: 100006, guid: c9799767e9488be47baa3da052e39d10, type: 3} | ||
| m_PrefabInternal: {fileID: 1558910334} | ||
| --- !u!64 &1612532815 | ||
| MeshCollider: | ||
| m_ObjectHideFlags: 0 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 0} | ||
| m_GameObject: {fileID: 1612532813} | ||
| m_Material: {fileID: 0} | ||
| m_IsTrigger: 0 | ||
| m_Enabled: 1 | ||
| serializedVersion: 2 | ||
| m_Convex: 0 | ||
| m_Mesh: {fileID: 0} | ||
| --- !u!1 &1716931682 | ||
| GameObject: | ||
| m_ObjectHideFlags: 0 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 0} | ||
| serializedVersion: 4 | ||
| m_Component: | ||
| - 4: {fileID: 1716931683} | ||
| - 33: {fileID: 1716931686} | ||
| - 65: {fileID: 1716931685} | ||
| - 23: {fileID: 1716931684} | ||
| m_Layer: 0 | ||
| m_Name: SpawnLocation | ||
| m_TagString: Untagged | ||
| m_Icon: {fileID: 0} | ||
| m_NavMeshLayer: 0 | ||
| m_StaticEditorFlags: 4294967295 | ||
| m_IsActive: 1 | ||
| --- !u!4 &1716931683 | ||
| Transform: | ||
| m_ObjectHideFlags: 0 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 0} | ||
| m_GameObject: {fileID: 1716931682} | ||
| m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} | ||
| m_LocalPosition: {x: 0, y: .100000001, z: -7.8499999} | ||
| m_LocalScale: {x: 1, y: 1, z: 1} | ||
| m_Children: [] | ||
| m_Father: {fileID: 1188966589} | ||
| m_RootOrder: 1 | ||
| --- !u!23 &1716931684 | ||
| MeshRenderer: | ||
| m_ObjectHideFlags: 0 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 0} | ||
| m_GameObject: {fileID: 1716931682} | ||
| m_Enabled: 0 | ||
| m_CastShadows: 1 | ||
| m_ReceiveShadows: 1 | ||
| m_Materials: | ||
| - {fileID: 10302, guid: 0000000000000000f000000000000000, type: 0} | ||
| m_SubsetIndices: | ||
| m_StaticBatchRoot: {fileID: 0} | ||
| m_UseLightProbes: 0 | ||
| m_ReflectionProbeUsage: 1 | ||
| m_ProbeAnchor: {fileID: 0} | ||
| m_ScaleInLightmap: 1 | ||
| m_PreserveUVs: 0 | ||
| m_ImportantGI: 0 | ||
| m_AutoUVMaxDistance: .5 | ||
| m_AutoUVMaxAngle: 89 | ||
| m_LightmapParameters: {fileID: 0} | ||
| m_SortingLayerID: 0 | ||
| m_SortingOrder: 0 | ||
| --- !u!65 &1716931685 | ||
| BoxCollider: | ||
| m_ObjectHideFlags: 0 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 0} | ||
| m_GameObject: {fileID: 1716931682} | ||
| m_Material: {fileID: 0} | ||
| m_IsTrigger: 0 | ||
| m_Enabled: 0 | ||
| serializedVersion: 2 | ||
| m_Size: {x: 1, y: 1, z: 1} | ||
| m_Center: {x: 0, y: 0, z: 0} | ||
| --- !u!33 &1716931686 | ||
| MeshFilter: | ||
| m_ObjectHideFlags: 0 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 0} | ||
| m_GameObject: {fileID: 1716931682} | ||
| m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} | ||
| --- !u!1 &1988081369 | ||
| GameObject: | ||
| m_ObjectHideFlags: 0 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 0} | ||
| serializedVersion: 4 | ||
| m_Component: | ||
| - 4: {fileID: 1988081371} | ||
| - 108: {fileID: 1988081370} | ||
| m_Layer: 0 | ||
| m_Name: Directional light | ||
| m_TagString: Untagged | ||
| m_Icon: {fileID: 0} | ||
| m_NavMeshLayer: 0 | ||
| m_StaticEditorFlags: 4294967295 | ||
| m_IsActive: 1 | ||
| --- !u!108 &1988081370 | ||
| Light: | ||
| m_ObjectHideFlags: 0 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 0} | ||
| m_GameObject: {fileID: 1988081369} | ||
| m_Enabled: 1 | ||
| serializedVersion: 6 | ||
| m_Type: 1 | ||
| m_Color: {r: 1, g: 1, b: 1, a: 1} | ||
| m_Intensity: 1 | ||
| m_Range: 10 | ||
| m_SpotAngle: 30 | ||
| m_CookieSize: 10 | ||
| m_Shadows: | ||
| m_Type: 0 | ||
| m_Resolution: -1 | ||
| m_Strength: 1 | ||
| m_Bias: .0500000007 | ||
| m_NormalBias: .400000006 | ||
| m_Cookie: {fileID: 0} | ||
| m_DrawHalo: 0 | ||
| m_Flare: {fileID: 0} | ||
| m_RenderMode: 0 | ||
| m_CullingMask: | ||
| serializedVersion: 2 | ||
| m_Bits: 4294967295 | ||
| m_Lightmapping: 1 | ||
| m_BounceIntensity: 1 | ||
| m_ShadowRadius: 0 | ||
| m_ShadowAngle: 0 | ||
| m_AreaSize: {x: 1, y: 1} | ||
| --- !u!4 &1988081371 | ||
| Transform: | ||
| m_ObjectHideFlags: 0 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 0} | ||
| m_GameObject: {fileID: 1988081369} | ||
| m_LocalRotation: {x: .408217937, y: -.234569728, z: .109381661, w: .875426114} | ||
| m_LocalPosition: {x: 0, y: -10, z: 0} | ||
| m_LocalScale: {x: 1, y: 1, z: 1} | ||
| m_Children: [] | ||
| m_Father: {fileID: 1188966589} | ||
| m_RootOrder: 0 |
| @@ -0,0 +1,47 @@ | ||
| using System; | ||
| using UnityEngine; | ||
|
|
||
| namespace UnityStandardAssets.Vehicles.Ball | ||
| { | ||
| public class Ball : MonoBehaviour | ||
| { | ||
| [SerializeField] private float m_MovePower = 5; // The force added to the ball to move it. | ||
| [SerializeField] private bool m_UseTorque = true; // Whether or not to use torque to move the ball. | ||
| [SerializeField] private float m_MaxAngularVelocity = 25; // The maximum velocity the ball can rotate at. | ||
| [SerializeField] private float m_JumpPower = 2; // The force added to the ball when it jumps. | ||
|
|
||
| private const float k_GroundRayLength = 1f; // The length of the ray to check if the ball is grounded. | ||
| private Rigidbody m_Rigidbody; | ||
|
|
||
|
|
||
| private void Start() | ||
| { | ||
| m_Rigidbody = GetComponent<Rigidbody>(); | ||
| // Set the maximum angular velocity. | ||
| GetComponent<Rigidbody>().maxAngularVelocity = m_MaxAngularVelocity; | ||
| } | ||
|
|
||
|
|
||
| public void Move(Vector3 moveDirection, bool jump) | ||
| { | ||
| // If using torque to rotate the ball... | ||
| if (m_UseTorque) | ||
| { | ||
| // ... add torque around the axis defined by the move direction. | ||
| m_Rigidbody.AddTorque(new Vector3(moveDirection.z, 0, -moveDirection.x)*m_MovePower); | ||
| } | ||
| else | ||
| { | ||
| // Otherwise add force in the move direction. | ||
| m_Rigidbody.AddForce(moveDirection*m_MovePower); | ||
| } | ||
|
|
||
| // If on the ground and jump is pressed... | ||
| if (Physics.Raycast(transform.position, -Vector3.up, k_GroundRayLength) && jump) | ||
| { | ||
| // ... add force in upwards. | ||
| m_Rigidbody.AddForce(Vector3.up*m_JumpPower, ForceMode.Impulse); | ||
| } | ||
| } | ||
| } | ||
| } |
| @@ -0,0 +1,69 @@ | ||
| using System; | ||
| using UnityEngine; | ||
| using UnityStandardAssets.CrossPlatformInput; | ||
|
|
||
| namespace UnityStandardAssets.Vehicles.Ball | ||
| { | ||
| public class BallUserControl : MonoBehaviour | ||
| { | ||
| private Ball ball; // Reference to the ball controller. | ||
|
|
||
| private Vector3 move; | ||
| // the world-relative desired move direction, calculated from the camForward and user input. | ||
|
|
||
| private Transform cam; // A reference to the main camera in the scenes transform | ||
| private Vector3 camForward; // The current forward direction of the camera | ||
| private bool jump; // whether the jump button is currently pressed | ||
|
|
||
|
|
||
| private void Awake() | ||
| { | ||
| // Set up the reference. | ||
| ball = GetComponent<Ball>(); | ||
|
|
||
|
|
||
| // get the transform of the main camera | ||
| if (Camera.main != null) | ||
| { | ||
| cam = Camera.main.transform; | ||
| } | ||
| else | ||
| { | ||
| Debug.LogWarning( | ||
| "Warning: no main camera found. Ball needs a Camera tagged \"MainCamera\", for camera-relative controls."); | ||
| // we use world-relative controls in this case, which may not be what the user wants, but hey, we warned them! | ||
| } | ||
| } | ||
|
|
||
|
|
||
| private void Update() | ||
| { | ||
| // Get the axis and jump input. | ||
|
|
||
| float h = CrossPlatformInputManager.GetAxis("Horizontal"); | ||
| float v = CrossPlatformInputManager.GetAxis("Vertical"); | ||
| jump = CrossPlatformInputManager.GetButton("Jump"); | ||
|
|
||
| // calculate move direction | ||
| if (cam != null) | ||
| { | ||
| // calculate camera relative direction to move: | ||
| camForward = Vector3.Scale(cam.forward, new Vector3(1, 0, 1)).normalized; | ||
| move = (v*camForward + h*cam.right).normalized; | ||
| } | ||
| else | ||
| { | ||
| // we use world-relative directions in the case of no main camera | ||
| move = (v*Vector3.forward + h*Vector3.right).normalized; | ||
| } | ||
| } | ||
|
|
||
|
|
||
| private void FixedUpdate() | ||
| { | ||
| // Call the Move function of the ball controller | ||
| ball.Move(move, jump); | ||
| jump = false; | ||
| } | ||
| } | ||
| } |
| @@ -0,0 +1,37 @@ | ||
| using UnityEngine; | ||
| using System.Collections; | ||
|
|
||
| public class NetworkCharacter : Photon.MonoBehaviour { | ||
|
|
||
| Vector3 realPosition = Vector3.zero; | ||
| Quaternion realRotation = Quaternion.identity; | ||
|
|
||
| // Use this for initialization | ||
| void Start () { | ||
|
|
||
| } | ||
|
|
||
| // Update is called once per frame | ||
| void Update () { | ||
| if (photonView.isMine) { | ||
| // Do Nothing -- the character motor / input is movin us | ||
| } else { | ||
| transform.position = Vector3.Lerp(transform.position, realPosition, 0.1f); //TODO 0.1 makes movement little bit diferent between my client side vs other players | ||
| transform.rotation = Quaternion.Lerp(transform.rotation, realRotation, 0.1f); //TODO 0.1 makes movement ... | ||
| } | ||
| } | ||
|
|
||
| void OnPhotonSerializeView(PhotonStream stream , PhotonMessageInfo info) { | ||
|
|
||
| if(stream.isWriting) { | ||
| // This is OUR player. We send our actual position to the network | ||
| stream.SendNext(transform.position); | ||
| stream.SendNext(transform.rotation); | ||
| } | ||
| else { | ||
| // This is other's players position. we receive it and update it | ||
| realPosition = (Vector3)stream.ReceiveNext(); | ||
| realRotation = (Quaternion)stream.ReceiveNext(); | ||
| } | ||
| } | ||
| } |
| @@ -0,0 +1,72 @@ | ||
| using UnityEngine; | ||
| using System.Collections; | ||
|
|
||
| public class NetworkManager : MonoBehaviour { | ||
|
|
||
| bool isMenuVisible = false; | ||
|
|
||
| // Use this for initialization | ||
| void Start () { | ||
| Connect (); | ||
| } | ||
|
|
||
| void Connect() { | ||
| PhotonNetwork.ConnectUsingSettings("1.0.0"); | ||
|
|
||
| } | ||
|
|
||
| void MyJoinRoom() { | ||
| PhotonNetwork.JoinRandomRoom(); | ||
| } | ||
|
|
||
| void OnPhotonRandomJoinFailed() { | ||
| Debug.Log("OnPhotonRandomJoinFailed"); | ||
| PhotonNetwork.CreateRoom(null); | ||
| } | ||
|
|
||
| void OnGUI() { | ||
| GUILayout.Label( PhotonNetwork.connectionState.ToString() ); | ||
| if (isMenuVisible) { | ||
| if(GUILayout.Button("Join a Random Room")) { | ||
| MyJoinRoom(); | ||
| isMenuVisible = false; | ||
| } | ||
| } | ||
| } | ||
|
|
||
| void OnJoinedLobby() { | ||
| Debug.Log("OnJoinedLobby"); | ||
|
|
||
| bool showAButton = false; | ||
| if (showAButton) { | ||
| isMenuVisible = true; | ||
| } | ||
| else { | ||
| MyJoinRoom(); | ||
| } | ||
|
|
||
| } | ||
|
|
||
| void OnJoinedRoom() { | ||
| Debug.Log ("OnJoinedRoom"); | ||
| SpawnMyPlayer(); | ||
| } | ||
|
|
||
| void SpawnMyPlayer() { | ||
| GameObject spawnLocationObject = GameObject.Find ("SpawnLocation"); | ||
| GameObject player = PhotonNetwork.Instantiate("RollerBall", spawnLocationObject.transform.position, spawnLocationObject.transform.rotation, 0); | ||
|
|
||
| //Esto creo que no va: player.GetComponent<NetworkCharacter>().enabled = false; | ||
|
|
||
| player.GetComponent<UnityStandardAssets.Vehicles.Ball.BallUserControl>().enabled = true; | ||
|
|
||
| float myrand = Random.Range(0.0f,1.0f); | ||
| if(myrand < 0.33f){ | ||
| player.GetComponent<Renderer>().material.mainTexture = (Texture2D)Resources.Load("img/blue"); | ||
| } else if( myrand < 0.66f) { | ||
| player.GetComponent<Renderer>().material.mainTexture = (Texture2D)Resources.Load("img/red"); | ||
| } else { | ||
| player.GetComponent<Renderer>().material.mainTexture = (Texture2D)Resources.Load("img/green"); | ||
| } | ||
| } | ||
| } |
| @@ -0,0 +1,11 @@ | ||
| using UnityEngine; | ||
| using System.Collections; | ||
|
|
||
| public class changeMaterial : MonoBehaviour { | ||
|
|
||
|
|
||
| public void changeMat(Material mat) | ||
| { | ||
| GetComponent<Renderer> ().material = mat; | ||
| } | ||
| } |
| @@ -0,0 +1,14 @@ | ||
| using UnityEngine; | ||
| using System.Collections; | ||
|
|
||
| public class collider : MonoBehaviour { | ||
|
|
||
| public GameObject baseObj; | ||
|
|
||
| void OnCollisionEnter (Collision col) | ||
| { | ||
| if (col.gameObject.name == "RollerBall(Clone)") { | ||
| baseObj.GetComponent<changeMaterial>().changeMat(col.gameObject.GetComponent<Renderer>().material); | ||
| } | ||
| } | ||
| } |
| @@ -0,0 +1,17 @@ | ||
| using UnityEngine; | ||
| using System.Collections; | ||
|
|
||
| public class fallScript : MonoBehaviour { | ||
|
|
||
| // Use this for initialization | ||
| void Start () { | ||
|
|
||
| } | ||
|
|
||
| // Update is called once per frame | ||
| void Update () { | ||
| if (transform.position.y < -10) { | ||
| transform.position = new Vector3(0,4,-7); | ||
| } | ||
| } | ||
| } |
| @@ -0,0 +1,209 @@ | ||
| // ---------------------------------------------------------------------------- | ||
| // <copyright file="AccountService.cs" company="Exit Games GmbH"> | ||
| // Photon Cloud Account Service - Copyright (C) 2012 Exit Games GmbH | ||
| // </copyright> | ||
| // <summary> | ||
| // Provides methods to register a new user-account for the Photon Cloud and | ||
| // get the resulting appId. | ||
| // </summary> | ||
| // <author>developer@exitgames.com</author> | ||
| // ---------------------------------------------------------------------------- | ||
|
|
||
| using System.Net.Security; | ||
| using System.Security.Cryptography.X509Certificates; | ||
|
|
||
|
|
||
| using System; | ||
| using System.Collections.Generic; | ||
| using System.IO; | ||
| using System.Net; | ||
|
|
||
| using Newtonsoft.Json; | ||
|
|
||
| public class AccountService | ||
| { | ||
| private const string ServiceUrl = "https://service.exitgames.com/AccountExt/AccountServiceExt.aspx"; | ||
|
|
||
| private Action<AccountService> registrationCallback; // optional (when using async reg) | ||
|
|
||
| public string Message { get; private set; } // msg from server (in case of success, this is the appid) | ||
|
|
||
| protected internal Exception Exception { get; set; } // exceptions in account-server communication | ||
|
|
||
| public string AppId { get; private set; } | ||
|
|
||
| public int ReturnCode { get; private set; } // 0 = OK. anything else is a error with Message | ||
|
|
||
| public enum Origin : byte { ServerWeb = 1, CloudWeb = 2, Pun = 3, Playmaker = 4 }; | ||
|
|
||
| /// <summary> | ||
| /// Creates a instance of the Account Service to register Photon Cloud accounts. | ||
| /// </summary> | ||
| public AccountService() | ||
| { | ||
| WebRequest.DefaultWebProxy = null; | ||
| ServicePointManager.ServerCertificateValidationCallback = Validator; | ||
| } | ||
|
|
||
| public static bool Validator(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors policyErrors) | ||
| { | ||
| return true; // any certificate is ok in this case | ||
| } | ||
|
|
||
| /// <summary> | ||
| /// Attempts to create a Photon Cloud Account. | ||
| /// Check ReturnCode, Message and AppId to get the result of this attempt. | ||
| /// </summary> | ||
| /// <param name="email">Email of the account.</param> | ||
| /// <param name="origin">Marks which channel created the new account (if it's new).</param> | ||
| public void RegisterByEmail(string email, Origin origin) | ||
| { | ||
| this.registrationCallback = null; | ||
| this.AppId = string.Empty; | ||
| this.Message = string.Empty; | ||
| this.ReturnCode = -1; | ||
|
|
||
| string result; | ||
| try | ||
| { | ||
| WebRequest req = HttpWebRequest.Create(this.RegistrationUri(email, (byte)origin)); | ||
| HttpWebResponse resp = req.GetResponse() as HttpWebResponse; | ||
|
|
||
| // now read result | ||
| StreamReader reader = new StreamReader(resp.GetResponseStream()); | ||
| result = reader.ReadToEnd(); | ||
| } | ||
| catch (Exception ex) | ||
| { | ||
| this.Message = "Failed to connect to Cloud Account Service. Please register via account website."; | ||
| this.Exception = ex; | ||
| return; | ||
| } | ||
|
|
||
| this.ParseResult(result); | ||
| } | ||
|
|
||
| /// <summary> | ||
| /// Attempts to create a Photon Cloud Account asynchronously. | ||
| /// Once your callback is called, check ReturnCode, Message and AppId to get the result of this attempt. | ||
| /// </summary> | ||
| /// <param name="email">Email of the account.</param> | ||
| /// <param name="origin">Marks which channel created the new account (if it's new).</param> | ||
| /// <param name="callback">Called when the result is available.</param> | ||
| public void RegisterByEmailAsync(string email, Origin origin, Action<AccountService> callback = null) | ||
| { | ||
| this.registrationCallback = callback; | ||
| this.AppId = string.Empty; | ||
| this.Message = string.Empty; | ||
| this.ReturnCode = -1; | ||
|
|
||
| try | ||
| { | ||
| HttpWebRequest req = (HttpWebRequest)HttpWebRequest.Create(this.RegistrationUri(email, (byte)origin)); | ||
| req.Timeout = 5000; | ||
| req.BeginGetResponse(this.OnRegisterByEmailCompleted, req); | ||
| } | ||
| catch (Exception ex) | ||
| { | ||
| this.Message = "Failed to connect to Cloud Account Service. Please register via account website."; | ||
| this.Exception = ex; | ||
| if (this.registrationCallback != null) | ||
| { | ||
| this.registrationCallback(this); | ||
| } | ||
| } | ||
| } | ||
|
|
||
| /// <summary> | ||
| /// Internal callback with result of async HttpWebRequest (in RegisterByEmailAsync). | ||
| /// </summary> | ||
| /// <param name="ar"></param> | ||
| private void OnRegisterByEmailCompleted(IAsyncResult ar) | ||
| { | ||
| try | ||
| { | ||
| HttpWebRequest request = (HttpWebRequest)ar.AsyncState; | ||
| HttpWebResponse response = request.EndGetResponse(ar) as HttpWebResponse; | ||
|
|
||
| if (response != null && response.StatusCode == HttpStatusCode.OK) | ||
| { | ||
| // no error. use the result | ||
| StreamReader reader = new StreamReader(response.GetResponseStream()); | ||
| string result = reader.ReadToEnd(); | ||
|
|
||
| this.ParseResult(result); | ||
| } | ||
| else | ||
| { | ||
| // a response but some error on server. show message | ||
| this.Message = "Failed to connect to Cloud Account Service. Please register via account website."; | ||
| } | ||
| } | ||
| catch (Exception ex) | ||
| { | ||
| // not even a response. show message | ||
| this.Message = "Failed to connect to Cloud Account Service. Please register via account website."; | ||
| this.Exception = ex; | ||
| } | ||
|
|
||
| if (this.registrationCallback != null) | ||
| { | ||
| this.registrationCallback(this); | ||
| } | ||
| } | ||
|
|
||
| /// <summary> | ||
| /// Creates the service-call Uri, escaping the email for security reasons. | ||
| /// </summary> | ||
| /// <param name="email">Email of the account.</param> | ||
| /// <param name="origin">1 = server-web, 2 = cloud-web, 3 = PUN, 4 = playmaker</param> | ||
| /// <returns>Uri to call.</returns> | ||
| private Uri RegistrationUri(string email, byte origin) | ||
| { | ||
| string emailEncoded = Uri.EscapeDataString(email); | ||
| string uriString = string.Format("{0}?email={1}&origin={2}", ServiceUrl, emailEncoded, origin); | ||
|
|
||
| return new Uri(uriString); | ||
| } | ||
|
|
||
| /// <summary> | ||
| /// Reads the Json response and applies it to local properties. | ||
| /// </summary> | ||
| /// <param name="result"></param> | ||
| private void ParseResult(string result) | ||
| { | ||
| if (string.IsNullOrEmpty(result)) | ||
| { | ||
| this.Message = "Server's response was empty. Please register through account website during this service interruption."; | ||
| return; | ||
| } | ||
|
|
||
| Dictionary<string, string> values = JsonConvert.DeserializeObject<Dictionary<string, string>>(result); | ||
| if (values == null) | ||
| { | ||
| this.Message = "Service temporarily unavailable. Please register through account website."; | ||
| return; | ||
| } | ||
|
|
||
| int returnCodeInt = -1; | ||
| string returnCodeString = string.Empty; | ||
| string message; | ||
|
|
||
| values.TryGetValue("ReturnCode", out returnCodeString); | ||
| values.TryGetValue("Message", out message); | ||
| int.TryParse(returnCodeString, out returnCodeInt); | ||
|
|
||
| this.ReturnCode = returnCodeInt; | ||
| if (returnCodeInt == 0) | ||
| { | ||
| // returnCode == 0 means: all ok. message is new AppId | ||
| this.AppId = message; | ||
| } | ||
| else | ||
| { | ||
| // any error gives returnCode != 0 | ||
| this.AppId = string.Empty; | ||
| this.Message = message; | ||
| } | ||
| } | ||
| } |