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