protected override GameObject CreateObject(Vector3 position, Quaternion rotation) { GameObject go = GameObject.CreatePrimitive(PrimitiveType.Cube); go.transform.position = position; go.transform.rotation = rotation; VRInteractiveItem vrii = go.AddComponent <VRInteractiveItem>(); go.AddComponent <InitialCollisionCheck>(); InteractiveColorInterpolator ici = go.AddComponent <InteractiveColorInterpolator>(); InteractiveShakeAndFire isaf = go.AddComponent <InteractiveShakeAndFire>(); Rigidbody rb = go.AddComponent <Rigidbody>(); ici.InteractiveItem = vrii; ici.Initialize(); isaf.InteractiveItem = vrii; isaf.Selection = _SelectionRadialEyeTribe; isaf.ReticleTransform = _ReticleTransform; isaf.RigidBody = rb; isaf.Initialize(); return(go); }
protected override GameObject CreateObject(Vector3 position) { GameObject go = GameObject.CreatePrimitive(PrimitiveType.Cube); go.transform.position = position; VRInteractiveItem vrii = go.AddComponent <VRInteractiveItem>(); InteractiveColorInterpolator ici = go.AddComponent <InteractiveColorInterpolator>(); ici.InteractiveItem = vrii; ici.Initialize(); return(go); }