Exemple #1
0
    public void OnFrozenWellShatterTimelineDone(Script_CrackableStats ice)
    {
        Script_InteractableObjectEventsManager.IceCrackingTimelineDone(this);

        // Hide Ice Remains.
        HideIce();
    }
    // When an ice block shatters, check which one it is, hide all the rest of them.
    public void OnShatter(Script_CrackableStats crackableStats)
    {
        wellsWorldBehaviors.ForEach(behavior => {
            if (behavior.SpeedSealIceBlock == crackableStats)
            {
                wellsWorldBehaviors.ForEach(_behavior => {
                    if (_behavior.SpeedSealIceBlock != crackableStats)
                    {
                        _behavior.SpeedSealIceBlock.gameObject.SetActive(false);
                    }
                });
            }
        });

        wellsWorldBehaviors.ForEach(behavior => {
            if (behavior.LastWellMapIceBlock == crackableStats)
            {
                wellsWorldBehaviors.ForEach(_behavior => {
                    if (_behavior.LastWellMapIceBlock != crackableStats)
                    {
                        _behavior.LastWellMapIceBlock.gameObject.SetActive(false);
                    }
                });
            }
        });
    }
Exemple #3
0
 public static void DiagonalCut(Script_CrackableStats iceStats)
 {
     if (OnDiagonalCut != null)
     {
         OnDiagonalCut(iceStats);
     }
 }
Exemple #4
0
 public static void UnfreezeEffect(Script_CrackableStats iceStats)
 {
     if (OnUnfreezeEffect != null)
     {
         OnUnfreezeEffect(iceStats);
     }
 }
Exemple #5
0
 public static void Shatter(Script_CrackableStats iceStats)
 {
     if (OnShatter != null)
     {
         OnShatter(iceStats);
     }
 }
Exemple #6
0
 public static void IceCrackingTimelineDone(Script_CrackableStats iceStats)
 {
     if (OnIceCrackingTimelineDone != null)
     {
         OnIceCrackingTimelineDone(iceStats);
     }
 }
        public override void OnInspectorGUI()
        {
            DrawDefaultInspector();

            Script_CrackableStats t = (Script_CrackableStats)target;

            if (GUILayout.Button("Shatter"))
            {
                t.Shatter();
            }
        }