void OnCollisionEnter(Collision other) { if (other.gameObject.tag == "Transmitter") { block = other.transform.GetComponent <LightUpBlock>(); if (block.blockActivatable()) { gc.AddScore(); } block.Activate(); } }
public override void OnInspectorGUI() { base.OnInspectorGUI(); if (GUILayout.Button("Activate!")) { LightUpBlock lightUpBlock = (LightUpBlock)target; if (lightUpBlock != null) { lightUpBlock.Activate(); } } }