Esempio n. 1
0
        //--------------------------------------------------------------------------------------------------------------

        #region Unity Callbacks

        private void Awake()
        {
            //components
            MyTransform = transform;
            MyCollider  = GetComponent <Collider>();
            MyRigidbody = GetComponent <Rigidbody>();
            MyInput     = GetComponent <IMouseInput>();
            Hand        = transform.parent.GetComponentInChildren <IUiCardHand>();
            MyRenderers = GetComponentsInChildren <SpriteRenderer>();
            MyRenderer  = GetComponent <SpriteRenderer>();

            //transform
            UiCardScale    = new UiCardScale(this);
            UiCardMovement = new UiCardMovement(this);
            UiCardRotation = new UiCardRotation(this);


            //fsm
            Fsm = new UiCardHandFsm(MainCamera, CardConfigsParameters, this);
        }
Esempio n. 2
0
        //--------------------------------------------------------------------------------------------------------------

        #region Unitycallbacks

        protected override void Awake()
        {
            base.Awake();
            CardHand = transform.parent.GetComponentInChildren <UiCardHand>();
            CardHand.OnCardPlayed += AddCard;
        }