public void ApplyPanelEffectToAll(PanelEffect effect) { foreach (PanelController panel in panels) { ApplyPanelEffectTo(panel, effect); } }
public void ApplyPanelEffectTo(PanelController panel, PanelEffect effect) { panel.effect = effect; if (effect == null) { Debug.LogWarning("Applied a null PanelEffect to " + panel.name + ", thus making it have no effect."); } }
void RegisterEffect() { if (effectContainer != null) { effect = effectContainer.effect; effect.Init(rep); // we won't need this prefab taking up space anymore MonoBehaviour.Destroy(effectContainer.gameObject); } }
public bool SpawnPanelEffect(Vector2Int coordinate, PanelEffect panelEffect) { var panel = GetPanel(coordinate); if (panel == null) { Debug.Log(coordinate); return(false); } panel.PanelEffect = panelEffect; Debug.Log("lala"); return(true); }
// Update is called once per frame public void Update() { if (panelObject != null) { panelObject.UpdateObject(); } if (panelEffect != null) { panelEffect.Update(); if (panelEffect.Duration > panelEffect.BaseDuration) { panelEffect.End(); panelEffect = null; } } }
public bool SpawnPanelEffect(Panel panel, PanelEffect panelEffect) { panel.PanelEffect = panelEffect; return(true); }
protected override void Awake() { this.m_PanelEffect = this.GetComponent<PanelEffect>(); base.Awake(); }