Пример #1
0
    private static void PositionActor(string actorName, GameObject actorObject, object c)
    {
        actorObject.transform.localPosition = new Vector3(6f, 5f, 3f);
        Vector3 localScale = actorObject.transform.localScale;

        actorObject.transform.localScale = (Vector3)(0.01f * Vector3.one);
        actorObject.SetActive(true);
        iTween.ScaleTo(actorObject, localScale, 0.5f);
        QuestToast component = actorObject.GetComponent <QuestToast>();

        if (component == null)
        {
            Debug.LogWarning("QuestToast.PositionActor(): actor has no QuestToast component");
            m_questActive = false;
        }
        else
        {
            m_activeQuest = component;
            ToastCallbackData data = c as ToastCallbackData;
            component.m_onCloseCallback  = data.m_onCloseCallback;
            component.m_toastRewards     = data.m_toastRewards;
            component.m_toastName        = data.m_toastName;
            component.m_toastDescription = data.m_toastDescription;
            component.SetUpToast(data.m_updateCacheValues);
        }
    }
Пример #2
0
 public void OnDestroy()
 {
     if (this == m_activeQuest)
     {
         if (m_questActive)
         {
             this.FadeEffectsOut();
             m_questActive = false;
         }
         m_activeQuest = null;
     }
 }