mirror of
https://github.com/nothke/quality-control.git
synced 2024-12-22 15:57:28 +00:00
Fixing small bugs.
This commit is contained in:
parent
9b4726113a
commit
3036732a0d
22
Assets/Data/Objectives/Level 2.asset
Normal file
22
Assets/Data/Objectives/Level 2.asset
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!114 &11400000
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 0}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 65221132d7bd4e79856cce65eeb5ce58, type: 3}
|
||||||
|
m_Name: Level 2
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
Stage: 2
|
||||||
|
Quotas:
|
||||||
|
- Type: {fileID: 11400000, guid: 42240b227563f074aa0dd8fee3c0cb35, type: 2}
|
||||||
|
Quantity: 20
|
||||||
|
TimeLimit: 60
|
||||||
|
MaxDefectivePercentage: 80
|
||||||
|
SuccessMessage: Great job!
|
||||||
|
FailureMessage: Try again!
|
8
Assets/Data/Objectives/Level 2.asset.meta
Normal file
8
Assets/Data/Objectives/Level 2.asset.meta
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 51ab4948e88c6c241aac9c58fbf85aa7
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 11400000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
File diff suppressed because it is too large
Load Diff
@ -52,7 +52,12 @@ public class CranePickDrop : MonoBehaviour
|
|||||||
if (state == State.Catching)
|
if (state == State.Catching)
|
||||||
{
|
{
|
||||||
Debug.Assert(handlingBody, this);
|
Debug.Assert(handlingBody, this);
|
||||||
Debug.Assert(magnet, this);
|
|
||||||
|
if (handlingBody == null)
|
||||||
|
{
|
||||||
|
state = State.Idle;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
magnet.strength = magnetStrength;
|
magnet.strength = magnetStrength;
|
||||||
|
|
||||||
|
@ -6,6 +6,8 @@ public class HammerableRigidbody: RigidbodyInteractable
|
|||||||
{
|
{
|
||||||
public override void Use(InteractionController im)
|
public override void Use(InteractionController im)
|
||||||
{
|
{
|
||||||
|
manager = im;
|
||||||
|
|
||||||
if (im.hands.item == null)
|
if (im.hands.item == null)
|
||||||
{
|
{
|
||||||
base.Use(im);
|
base.Use(im);
|
||||||
|
@ -15,6 +15,11 @@ public class Magnet : MonoBehaviour
|
|||||||
|
|
||||||
if (otherRb && otherRb.isKinematic == false)
|
if (otherRb && otherRb.isKinematic == false)
|
||||||
{
|
{
|
||||||
|
if (!otherRb.GetComponent<Product>())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Vector3 dir = otherRb.position - transform.position;
|
Vector3 dir = otherRb.position - transform.position;
|
||||||
float dirSq = Vector3.SqrMagnitude(dir);
|
float dirSq = Vector3.SqrMagnitude(dir);
|
||||||
float forceMagnitude = strength * (1.0f / dirSq);
|
float forceMagnitude = strength * (1.0f / dirSq);
|
||||||
|
Loading…
Reference in New Issue
Block a user