private void Start() { DraggableHolder dh = GetComponentInParent <DraggableHolder>(); if (dh) { myDraggableType = GetComponentInParent <DraggableHolder>().myType; } else { myDraggableType = DraggableHolder.DraggableType.NoDragging; } rt = GetComponent <RectTransform>(); gr = GetComponentInParent <GraphicRaycaster>(); es = GetComponentInParent <EventSystem>(); StartCoroutine(calcVel()); if (false && myDraggableType != DraggableHolder.DraggableType.RedundantParens) { onApply.AddRemovableListener(_ => { enabled = false; }, this); onUnapply.AddRemovableListener(_ => { enabled = true; }, this); } }
// ===== Functions ===== // Init private void Awake() { onLevelLoadArity.AddRemovableListener(onLevelWasLoaded, this); if (OnCastSpell) { OnCastSpell.AddRemovableListener(_ => CastSpell(), this); } }
// ===== Functions ===== // Init private void Awake() { onLevelLoad.AddRemovableListener(onLevelWasLoaded, this); }
// Init private void Awake() { layoutElement = GetComponent <LayoutElement>(); ignoreLayoutEvent.AddRemovableListener(ignoreLayout, this); stopIgnoringLayoutEvent.AddRemovableListener(stopIgnoringLayout, this); }
void Start() { //Initiate the Listener to create screen complete.AddRemovableListener(_ => StartCoroutine(createLevelCompleteScreen()), this); }