//-------------------------------------------------------------------------------------------------------------- #region Unity Callbacks void Awake() { //components MyTransform = transform; MyCollider = GetComponent <Collider>(); MyRigidbody = GetComponent <Rigidbody>(); MyInput = GetComponent <IMouseInput>(); Hand = transform.parent.GetComponentInChildren <IUiPlayerHand>(); MyRenderers = GetComponentsInChildren <SpriteRenderer>(); MyRenderer = GetComponent <SpriteRenderer>(); //transform Scale = new UiMotionScaleCard(this); Movement = new UiMotionMovementCard(this); Rotation = new UiMotionRotationCard(this); //fsm Fsm = new UiCardHandFsm(MainCamera, cardConfigsParameters, this); }
//-------------------------------------------------------------------------------------------------------------- #region Unity Callbacks public void Initialize() { //components MyTransform = transform; MyCollider = GetComponent <Collider2D>(); MyRigidbody = GetComponent <Rigidbody2D>(); MyInput = GetComponent <IMouseInput>(); HandSelector = transform.GetComponentInParent <UiCardHandSelector>(); MyRenderers = GetComponentsInChildren <SpriteRenderer>(); MyRenderer = GetComponent <SpriteRenderer>(); //transform Scale = new UiMotionScaleCard(this); Movement = new UiMotionMovementCard(this); Rotation = new UiMotionRotationCard(this); (MyCollider as BoxCollider2D).size = cardConfigsParameters.CardSize.Value; //fsm Fsm = new UiCardHandFsm(MainCamera, CardConfigsParameters, this); }
//-------------------------------------------------------------------------------------------------------------- #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); }