Ejemplo n.º 1
0
 private void OnWorkCompleted(MechanicInfo otherMechanic, int circles)
 {
     if (isInitialized)
     {
         if (otherMechanic.Id == Mechanic.Id)
         {
             StartCoroutine(CreateEffectImpl(circles));
         }
     }
 }
Ejemplo n.º 2
0
        private void OnMechanicAdded(MechanicInfo mechanic)
        {
            if (manager != null)
            {
                if (mechanic.Id == manager.Id)
                {
                    UpdateMechanicPriceText();
                    UpdateMechanicCountText();

                    CreateConstMechanicAnimObject();
                }
            }
        }
Ejemplo n.º 3
0
        public void Setup(MechanicInfo mechanic)
        {
            rectTransform = GetComponent <RectTransform>();
            animator      = GetComponent <Animator>();
            rectTransform.anchoredPosition = leftPosition;
            countText.text = string.Empty;
            Mechanic       = mechanic;
            isInitialized  = true;
            UpdateState(Mechanic.State);
            var mechanicAnimObj = GetComponent <MechanicAnimObject>();

            if (mechanicAnimObj != null)
            {
                Destroy(mechanicAnimObj);
            }
        }
Ejemplo n.º 4
0
 private void OnMechanicStateChanged(MechanicState oldState, MechanicState newState, MechanicInfo mechanic)
 {
     if (isInitialized)
     {
         if (Mechanic != null && (Mechanic.Id == mechanic.Id))
         {
             UpdateState(newState);
             //Debug.Log($"new mechanic  => {newState}");
         }
     }
 }