protected override void Start()
        {
            base.Start();
            Holding         = false;
            YValue          = StartValueY * 100f;
            YValueUnclamped = YValue;
            holdStartValueY = YValue;

            XValue          = StartValueX * 100f;
            XValueUnclamped = XValue;
            holdStartValueX = XValue;

            EventOnInteraction.AddListener(StartHolding);
        }
Beispiel #2
0
        protected override void Start()
        {
            Holding = false;
            EventOnInteraction.AddListener(StartHolding);

            fixedDelay = new WaitForFixedUpdate();

            if (!TargetRigidbody)
            {
                TargetRigidbody = GetComponentInChildren <Rigidbody>();
                if (!TargetRigidbody)
                {
                    Debug.Log("There is no Rigidbody in " + name + " destroying 'FBasic_Draggable' component!");
                    Destroy(this);
                    return;
                }
            }

            refCamera = Camera.main;

            rigColl = TargetRigidbody.GetComponent <Collider>();

            base.Start();
        }