Esempio n. 1
0
 public void OnPointerClick(PointerEventData eventData)
 {
     if (RectTransformUtility.RectangleContainsScreenPoint(emotionShapeRect, eventData.position))
     {
         EmotionVectorHandle handle = InstantiateHandle();
         handle.RectTransform.position = new Vector3(eventData.position.x, eventData.position.y, 0f);
     }
 }
Esempio n. 2
0
    private EmotionVectorHandle InstantiateHandle()
    {
        EmotionVectorHandle handle = GameObject.Instantiate <EmotionVectorHandle>(emotionHandlePrefab);

        handle.RectTransform.SetParent(rect, true);
        handle.Initialize(this, emotionShapeRect);
        handles.Add(handle);
        return(handle);
    }
Esempio n. 3
0
    protected override void OnInitialize()
    {
        variantToggle.isOn             = Chunk.IsVariation;
        harmonySequenceInputField.text = Chunk.HarmonySequenceNumber.ToString();
        curveDropdown.value            = (int)Chunk.IntensityCurveType;
        intensityInputField.text       = Chunk.Data.intensityMultiplier.ToString();

        ClearAllHandles();

        foreach (EmotionVector v in Chunk.Data.vectors)
        {
            EmotionVectorHandle handle = InstantiateHandle();
            handle.SetPositionFromEmotion(v);
        }
    }
Esempio n. 4
0
 public void RemoveHandle(EmotionVectorHandle h)
 {
     GameObject.Destroy(h.gameObject);
     handles.Remove(h);
 }