Beispiel #1
0
        public override void OnInspectorGUI()
        {
            base.OnInspectorGUI();
            HandPile  _pile = target as HandPile;
            GetInCard getIn = EditorGUILayout.ObjectField(new GUIContent("新获得的手牌所在:"), _pile.NewCard, typeof(GetInCard), false) as GetInCard;

            if (getIn != null && !getIn.Equals(_pile.NewCard))
            {
                _pile.NewCard = getIn;
            }
            serializedObject.ApplyModifiedProperties();
        }
Beispiel #2
0
        public override void OnInspectorGUI()
        {
            base.OnInspectorGUI();
            HandPile  _pile = target as HandPile;
            GetInCard getIn = EditorGUILayout.ObjectField(new GUIContent("新获得的手牌所在:"), _pile.NewCard, typeof(GetInCard), false) as GetInCard;

            if (!getIn.Equals(_pile.NewCard))
            {
                _pile.NewCard = getIn;
            }
            MahjongItem getCard = EditorGUILayout.ObjectField(new GUIContent("新获得的那张牌:"), _pile.NewCard.GetIn, typeof(MahjongItem), true) as MahjongItem;

            if (getCard == null)
            {
                _pile.NewCard.GetIn = null;
            }
            else
            if (!getCard.Equals(_pile.NewCard.GetIn))
            {
                _pile.NewCard.GetIn = getCard;
            }
            serializedObject.ApplyModifiedProperties();
        }