public override void OnInspectorGUI() { DrawDefaultInspector(); treads = target as TentacleTreads; if (GUILayout.Button("Sever")) { treads.SeverTentacle(); } if (GUILayout.Button("Attach to player")) { treads.AttachToPlayer(); } }
// Use this for initialization void Awake() { myBody = GetComponent <Rigidbody2D>(); treads = GetComponentInChildren <TentacleTreads>(); }