Beispiel #1
0
        public override void FireEvent()
        {
            if (!AffectedObject)
            {
                return;
            }

            if (bIsFireEvent == true)
            {
                return;
            }

            bIsFireEvent = true;

            if (!Application.isPlaying && Application.isEditor)
            {
                //previousColor = AffectedObject.GetComponent<Renderer>().sharedMaterial.color;
                //AffectedObject.GetComponent<Renderer>().sharedMaterial.color = newColor;

                AffectedObject.SetActive(active);
            }
            else
            {
                //previousColor = AffectedObject.GetComponent<Renderer>().material.color;
                //AffectedObject.GetComponent<Renderer>().material.color = newColor;
                AffectedObject.SetActive(active);
            }
        }
Beispiel #2
0
        public override void UndoEvent()
        {
            if (!AffectedObject)
            {
                return;
            }

            AffectedObject.SetActive(prevEnable);
        }
Beispiel #3
0
    public override void UndoEvent()
    {
        if (!AffectedObject)
        {
            return;
        }

#if (UNITY_3_5)
        if (enableRecursively)
        {
            AffectedObject.SetActiveRecursively(prevEnable);
        }
        else
        {
            AffectedObject.active = prevEnable;
        }
#else
        AffectedObject.SetActive(prevEnable);
#endif
    }
Beispiel #4
0
    public override void FireEvent()
    {
#if (UNITY_3_5)
        prevEnable = AffectedObject.active;
#else
        prevEnable = AffectedObject.activeSelf;
#endif

#if (UNITY_3_5)
        if (enableRecursively)
        {
            AffectedObject.SetActiveRecursively(enable);
        }
        else
        {
            AffectedObject.active = enable;
        }
#else
        AffectedObject.SetActive(enable);
#endif
    }
Beispiel #5
0
 public override void FireEvent()
 {
     prevEnable = AffectedObject.activeSelf;
     AffectedObject.SetActive(enable);
 }