예제 #1
0
 void Start()
 {
     HighLighted = false;
     _mouseOver  = GetComponent <CanBeMousedOver>();
     _owned      = GetComponent <CanBeOwned>();
     _move       = GetComponent <CanBeMoved>();
     _hand       = GetComponent <CanBeInHand>();
     _interact   = GetComponent <CanBeInteractedWith>();
     _wrapper    = new VisualCardWrapper(gameObject);
 }
예제 #2
0
파일: HasCost.cs 프로젝트: W3SS/Carty
        void Start()
        {
            _owned   = GetComponent <CanBeOwned>();
            _outline = GetComponent <HasOutline>();
            _hand    = GetComponent <CanBeInHand>();

            var cardManagerInfo = GameManager.Instance.CardManager.FindCardInfo(gameObject);

            if (cardManagerInfo.CardType != null)
            {
                var info = cardManagerInfo.CardType.GetInfo();
                DefaultCost = CurrentCost = info.Cost;
            }
            else
            {
                Debug.Log("No card implementation found for a card in HasCost component. Either it is dummy card or something went wrong.");
                DefaultCost = CurrentCost = 0;
            }

            _previouslyCouldBePlayed = false;
            _canBePlayed             = false;
        }