Exemple #1
0
        public void LinkToPlaceholder(PlaceholderBehaviour behaviour)
        {
            linkedBehaviour = behaviour;
            if (behaviour.LinkedDroppable != null)
            {
                behaviour.LinkedDroppable.Detach();
            }

            // Link this answer to placeholder
            transform.localPosition   = behaviour.transform.localPosition;
            linkedBehaviour           = behaviour;
            behaviour.LinkedDroppable = this;
        }
Exemple #2
0
        public void Detach(bool jumpBack = true)
        {
            if (jumpBack)
            {
                transform.DOLocalMove(origin, 0.5f).SetEase(Ease.OutBounce);
            }

            if (linkedBehaviour != null)
            {
                var quest = linkedBehaviour.Placeholder.GetQuestion();
                quest.GetAnswerSet().OnRemovedAnswer(GetAnswer());
                linkedBehaviour.LinkedDroppable = null;
            }

            linkedBehaviour = null;
        }
 public void LinkToPlaceholder(PlaceholderBehaviour behaviour)
 {
 }