Exemplo n.º 1
0
        public void StartTracking(SlotBase slot)
        {
            spriteRenderer.color = slot.GetGear().gearColor;

            slotOriginal = slot;
            slotOriginal.RemoveGear();
            slotCurrent = null;

            isTracking = true;
        }
Exemplo n.º 2
0
        void FinishTracking()
        {
            if (slotCurrent)
            {
                if (slotCurrent.IsGearActive())
                {
                    Debug.Log("Current slot already has a gear, cant move to there");
                }

                else
                {
                    slotCurrent.AssignGear(slotOriginal.GetGear());
                    slotOriginal.RemoveGear();
                }
            }
            else
            {
                slotOriginal.AssignGear(slotOriginal.GetGear());
            }

            isTracking         = false;
            transform.position = initialPosition;
        }