Ejemplo n.º 1
0
 // Update is called once per frame
 public void OnPickingObject(float deltaPosition = 0.0f)
 {
     foreach (SpriteRenderer sRend in targetRenderObjects)
     {
         sRend.sortingOrder = LayerMaskList[sRend] + (int)(transform.position.y);
     }
     if (Mathf.Abs(deltaPosition) > 0.0f)
     {
         OnObjectMovement(Mathf.Abs(deltaPosition));
         if (actionObject != null)
         {
             SpriteObject Action = actionObject.GetComponent <SpriteObject>();
             Action.OnOtherObjectStayMovement(Mathf.Abs(deltaPosition), gameObject.GetComponentInChildren <SpriteObject>());
         }
     }
 }