Exemplo n.º 1
0
        public override void OnInspectorGUI()
        {
            base.OnInspectorGUI();
            //DrawDefaultInspector();
            PlatoBehaviour mytarget = (PlatoBehaviour)target;

            if (GUILayout.Button("walk"))
            {
                mytarget.ChangeState(mytarget.gameObject.GetComponent <WalkState>());
            }
        }
Exemplo n.º 2
0
 // Start is called before the first frame update
 void Start()
 {
     reference = gameObject.GetComponent <PlatoBehaviour>();
 }