Esempio n. 1
0
        void DisableGlow()
        {
            if (glowAnim != null)
            {
                myAnim.RemoveAnimOverrides(glowAnim);
            }

            glowingEnabled = false;
        }
Esempio n. 2
0
	public void OnStore(object data)
	{
		storage = (data as Storage);
		bool flag = data is Storage || (data != null && (bool)data);
		SaveLoadRoot component = GetComponent<SaveLoadRoot>();
		if ((UnityEngine.Object)carryAnimOverride != (UnityEngine.Object)null && (UnityEngine.Object)lastCarrier != (UnityEngine.Object)null)
		{
			lastCarrier.RemoveAnimOverrides(carryAnimOverride);
			lastCarrier = null;
		}
		KSelectable component2 = GetComponent<KSelectable>();
		if ((bool)component2)
		{
			component2.IsSelectable = !flag;
		}
		if (flag)
		{
			int cachedCell = this.cachedCell;
			RefreshStorageTags(data);
			if ((object)storage != null)
			{
				if ((UnityEngine.Object)carryAnimOverride != (UnityEngine.Object)null && (UnityEngine.Object)storage.GetComponent<Navigator>() != (UnityEngine.Object)null)
				{
					lastCarrier = storage.GetComponent<KBatchedAnimController>();
					if ((UnityEngine.Object)lastCarrier != (UnityEngine.Object)null)
					{
						lastCarrier.AddAnimOverrides(carryAnimOverride, 0f);
					}
				}
				UpdateCachedCell(Grid.PosToCell(storage));
			}
			NotifyChanged(cachedCell);
			if ((UnityEngine.Object)component != (UnityEngine.Object)null)
			{
				component.SetRegistered(false);
			}
		}
		else
		{
			if ((UnityEngine.Object)component != (UnityEngine.Object)null)
			{
				component.SetRegistered(true);
			}
			RemovedFromStorage();
		}
	}
Esempio n. 3
0
 protected override void InternalEnd()
 {
     if ((UnityEngine.Object)kbac != (UnityEngine.Object)null)
     {
         if (currentStep >= 0 && currentStep < emoteSteps.Count && emoteSteps[currentStep].timeout <= 0f)
         {
             kbac.onAnimComplete -= NextStep;
         }
         kbac.RemoveAnimOverrides(animset);
         kbac = null;
     }
     if ((UnityEngine.Object)reactor != (UnityEngine.Object)null)
     {
         if (expression != null)
         {
             reactor.GetComponent <FaceGraph>().RemoveExpression(expression);
         }
         if (thought != null)
         {
             reactor.GetSMI <ThoughtGraph.Instance>().RemoveThought(thought);
         }
     }
     currentStep = -1;
 }