Exemple #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);
 }
Exemple #2
0
        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;
        }