public void OnCraftCancelled(CraftingProgressContainer.CraftInfo craftInfo, float progress)
 {
     if (eventHandler != null)
     {
         eventHandler.OnCraftCanceled(craftInfo, progress);
     }
 }
 public void OnCraftFailed(CraftingProgressContainer.CraftInfo craftInfo)
 {
     if (eventHandler != null)
     {
         eventHandler.OnCraftFailed(craftInfo);
     }
 }
Esempio n. 3
0
        protected virtual void CraftingWindowOnCraftProgress(CraftingProgressContainer.CraftInfo craftInfo, float progress)
        {
            int index = Mathf.CeilToInt(progress * images.Length);

            for (int i = 0; i < index; i++)
            {
                images[i].color = activeColor;
            }
        }
 public void OnCraftSuccess(CraftingProgressContainer.CraftInfo craftInfo)
 {
     if (onCraftingSuccess.Count > 0)
     {
         RunEvents(onCraftingSuccess,
                   new plyEventArg("category", craftInfo.category),
                   new plyEventArg("categoryID", (int)craftInfo.category.ID),
                   new plyEventArg("blueprint", craftInfo.blueprint),
                   new plyEventArg("blueprintID", (int)craftInfo.blueprint.ID));
     }
 }
 public void OnCraftFailed(CraftingProgressContainer.CraftInfo craftInfo)
 {
     if (onCraftingFailed.Count > 0)
     {
         RunEvents(onCraftingFailed,
                   new plyEventArg("itemID", (int)craftInfo.blueprint.resultItems.First().item.ID),
                   new plyEventArg("category", craftInfo.category),
                   new plyEventArg("categoryID", (int)craftInfo.category.ID),
                   new plyEventArg("blueprint", craftInfo.blueprint),
                   new plyEventArg("blueprintID", (int)craftInfo.blueprint.ID));
     }
 }
 public void OnCraftProgress(CraftingProgressContainer.CraftInfo craftInfo, float progress)
 {
     if (onCraftingProgress.Count > 0)
     {
         RunEvents(onCraftingProgress,
                   new plyEventArg("itemID", (int)craftInfo.blueprint.resultItems.First().item.ID),
                   new plyEventArg("category", craftInfo.category),
                   new plyEventArg("categoryID", (int)craftInfo.category.ID),
                   new plyEventArg("blueprint", craftInfo.blueprint),
                   new plyEventArg("blueprintID", (int)craftInfo.blueprint.ID),
                   new plyEventArg("progress", progress));
     }
 }
Esempio n. 7
0
 private void CraftEnded(CraftingProgressContainer.CraftInfo craftinfo)
 {
     Reset();
 }
Esempio n. 8
0
 private void CraftEndedProgress(CraftingProgressContainer.CraftInfo craftinfo, float progress)
 {
     Reset();
 }
Esempio n. 9
0
 private void OnCraftSuccess(CraftingProgressContainer.CraftInfo craftinfo)
 {
     GetComponent <Animator>().Play(animationClip.name);
 }
Esempio n. 10
0
 private void CraftStart(CraftingProgressContainer.CraftInfo craftInfo)
 {
     ShowParticles();
 }
Esempio n. 11
0
 private void CraftSuccess(CraftingProgressContainer.CraftInfo craftInfo)
 {
     HideParticles();
 }
Esempio n. 12
0
 private void CraftCancelled(CraftingProgressContainer.CraftInfo craftInfo, float progress)
 {
     HideParticles();
 }