Exemplo n.º 1
0
        public Animotion CombineMoveAnimotion(Vector3 actualPosition, Vector3 endPosition, GameObject[] enemies)
        {
            UnitMovePositioner movePositioner = new UnitMovePositioner(4f);
            Dictionary <GameObject, Vector3[]> enmiesAndPathToMove = movePositioner.GetRoutePositions(enemies, movePositioner.GetPositionType(enemies.Length), endPosition, actualPosition);
            List <Animotion> motionsCombineMove = new List <Animotion>();

            if (GameSoundManager.Instance != null && GameSoundManager.Instance.audioSource != null)
            {
                AudioSourceParameter audioParemater  = new AudioSourceParameter(false, true);
                Animotion            motionMoveSound = new SoundAnimotion(this, 1, GameSoundManager.Instance.audioSource, GameSoundManager.Instance.audioClips[4], audioParemater);
                motionsCombineMove.Add(motionMoveSound);
            }

            int index = 0;

            foreach (KeyValuePair <GameObject, Vector3[]> entry in enmiesAndPathToMove)
            {
                Animotion motionMove = new MoveAnimatedAnimotion(this, 1, entry.Key.GetComponent <Animator>());
                motionsCombineMove.Add(motionMove);

                List <Animotion> extraMotionsCombineStopMove = new List <Animotion>();
                Animotion        motionTweenMove             = new MovePathTweenAnimotion(this, 1, entry.Key.transform, entry.Value);
                Animotion        motionIdlle = new IdlleAnimatedAnimotion(this, 2, entry.Key.GetComponent <Animator>());
                extraMotionsCombineStopMove.Add(motionTweenMove);
                extraMotionsCombineStopMove.Add(motionIdlle);

                // esto solo lo hago para detener el sonido de los pasos
                if (enmiesAndPathToMove.Count - 1 == index)
                {
                    List <ConfigurableMotion> configurables = new List <ConfigurableMotion>();

                    if (GameSoundManager.Instance != null && GameSoundManager.Instance.audioSource != null)
                    {
                        StopSoundConfigureContainer stopSoundContainer = new StopSoundConfigureContainer(GameSoundManager.Instance.audioSource);
                        ConfigureAnimotion          stopSoundConfigure = new ConfigureAnimotion(stopSoundContainer, 2, true);
                        configurables.Add(stopSoundConfigure);
                    }
                    CombineAnimotion extraCombineMoveStopMotion = new CombineAnimotion(this, 1, extraMotionsCombineStopMove, configurables);
                    motionsCombineMove.Add(extraCombineMoveStopMotion);
                }
                else
                {
                    CombineAnimotion extraCombineMoveStopMotion = new CombineAnimotion(this, 1, extraMotionsCombineStopMove);
                    motionsCombineMove.Add(extraCombineMoveStopMotion);
                }

                index++;
            }

            CombineAnimotion combinMoveMotion = new CombineAnimotion(this, 1, motionsCombineMove);

            return(combinMoveMotion);
        }
        public Animotion OnCardSendToGraveyardAnimotion(RectTransform cardRect, int PlayerID)
        {
            Vector3 finalScale = new Vector3(0.2f, 0.2f, 1);

            List <Animotion> motionsWaitToGraveyard = new List <Animotion>();
            Animotion        motionTweenScaleUp     = new ScaleRectTweenAnimotion(this, 1, cardRect, finalScale, 1);

            motionsWaitToGraveyard.Add(motionTweenScaleUp);

            Vector3 finalCardPosition = playerOneGraveyardLogo.position;

            if (PlayerID == 0)
            {
                finalCardPosition = playerOneGraveyardLogo.position;
            }
            else
            {
                finalCardPosition = playerTwoGraveyardLogo.position;
            }

            Animotion motionTweenSpawn = new SpawnCardTweenAnimotion(this, 1, cardRect, finalCardPosition, 2);

            motionsWaitToGraveyard.Add(motionTweenSpawn);

            // tengo que setear el parent
            List <ConfigurableMotion> configurables   = new List <ConfigurableMotion>();
            RectTransform             parentTransform = null;

            if (PlayerID == 0)
            {
                parentTransform = playerOneGraveyard;
            }
            else
            {
                parentTransform = playerTwoGraveyard;
            }

            ChildParentConfigureContainer parentContainer            = new ChildParentConfigureContainer(parentTransform, cardRect);
            ConfigureAnimotion            parentChildConfigAnimotion = new ConfigureAnimotion(parentContainer, 3);

            configurables.Add(parentChildConfigAnimotion);

            //SetCanvasGroupBlockRaycastConfigureAnimotion<MikzeerGame.CardUI, Transform> blockRayCastConfigAnimotion
            //    = new SetCanvasGroupBlockRaycastConfigureAnimotion<MikzeerGame.CardUI, Transform>(cardUI, GameCreator.Instance.playerOneGraveyard, 4);
            //configurables.Add(blockRayCastConfigAnimotion);
            CombineAnimotion combineSendToGraveyardMotion = new CombineAnimotion(this, 1, motionsWaitToGraveyard, configurables);

            return(combineSendToGraveyardMotion);
        }
        private Animotion SimpleAttackToCombineWithShieldAnimotion(Animator attackerAnimator, List <Animator> damagedAnimator)
        {
            List <Animotion>          motions            = new List <Animotion>();
            List <ConfigurableMotion> configureAnimotion = new List <ConfigurableMotion>();
            // PLAY ATTACK ANIMATION
            Animotion motionAttack = new AttackAnimatedAnimotion(this, 1, attackerAnimator);

            motions.Add(motionAttack);
            if (GameSoundManager.Instance != null && GameSoundManager.Instance.audioSource != null)
            {
                AudioSourceParameter audioParameter = new AudioSourceParameter(true);
                // ATTACK SOUND
                Animotion motionAttackSound = new SoundAnimotion(this, 1, GameSoundManager.Instance.audioSource, GameSoundManager.Instance.audioClips[0], audioParameter);
                motions.Add(motionAttackSound);
                // DAMAGE SOUND
                Animotion motionDamageSound = new SoundAnimotion(this, 1, GameSoundManager.Instance.audioSource, GameSoundManager.Instance.audioClips[2], audioParameter);
                motions.Add(motionDamageSound);
            }

            // PLAY DAMAGE ANIMATION FOR ALL THE ENEMIES
            for (int i = 0; i < damagedAnimator.Count; i++)
            {
                // PLAY DAMAGE ANIMATION
                Animotion motionDamage = new DamageAnimatedAnimotion(this, 1, damagedAnimator[i]);
                motions.Add(motionDamage);

                // CREAMOS EL SHIELD
                GameObject shield = Instantiate(shieldPrefab, damagedAnimator[i].transform.position, Quaternion.identity);
                shield.SetActive(true);

                List <Animotion> shieldMotions      = new List <Animotion>();
                Animotion        motionShieldDamage = new ShieldAnimatedAnimotion(this, 1, shield.GetComponent <Animator>());
                shieldMotions.Add(motionShieldDamage);

                GameObjectDestroyConfigureContainer goDestroyContainer = new GameObjectDestroyConfigureContainer(shield);
                ConfigureAnimotion destroyGOConfigAnimotion            = new ConfigureAnimotion(goDestroyContainer, 2);
                configureAnimotion.Add(destroyGOConfigAnimotion);

                CombineAnimotion combineShieldMotion = new CombineAnimotion(this, 1, shieldMotions, configureAnimotion);
                motions.Add(combineShieldMotion);
            }

            CombineAnimotion combineAttackMotion = new CombineAnimotion(this, 1, motions);

            return(combineAttackMotion);
        }
Exemplo n.º 4
0
        public Animotion MoveAnimotion(GameObject goKimbok, Vector3 endPosition)
        {
            List <Animotion> motionsMove = new List <Animotion>();
            Animator         animator    = goKimbok.GetComponent <Animator>();
            Animotion        motionMove  = new MoveAnimatedAnimotion(this, 1, animator);

            motionsMove.Add(motionMove);

            List <ConfigurableMotion> configurables = new List <ConfigurableMotion>();

            if (GameSoundManager.Instance != null && GameSoundManager.Instance.audioSource != null)
            {
                AudioSourceParameter audioParemater  = new AudioSourceParameter(false, true);
                Animotion            motionMoveSound = new SoundAnimotion(this, 1, GameSoundManager.Instance.audioSource, GameSoundManager.Instance.audioClips[4], audioParemater);
                motionsMove.Add(motionMoveSound);

                StopSoundConfigureContainer stopSoundContainer = new StopSoundConfigureContainer(GameSoundManager.Instance.audioSource);
                ConfigureAnimotion          stopSoundConfigure = new ConfigureAnimotion(stopSoundContainer, 2, true);
                configurables.Add(stopSoundConfigure);
            }

            List <Animotion> motionsStopMove = new List <Animotion>();

            Animotion motionTweenMove = new MoveTweenAnimotion(this, 1, goKimbok.transform, endPosition, 1);
            Animotion motionIdlle     = new IdlleAnimatedAnimotion(this, 2, animator);

            motionsStopMove.Add(motionTweenMove);
            motionsStopMove.Add(motionIdlle);

            CombineAnimotion combineStopMotion = new CombineAnimotion(this, 1, motionsStopMove, configurables);

            motionsMove.Add(combineStopMotion);

            CombineAnimotion combinMoveMotion = new CombineAnimotion(this, 1, motionsMove);

            return(combinMoveMotion);
        }
        public Animotion RearangePositionAfterCombineAnimotion(List <GameObject> kimbokos, Vector3 actualPosition, int reproductionOrder = 1)
        {
            List <Animotion>   motionsSpawnCombine = new List <Animotion>();
            UnitMovePositioner movePositioner      = new UnitMovePositioner(4f);

            //  - DESPUES ME DEBERIA FIJAR SI TENGO ENEMIGOS EN LA QUE SELECCIONE, Y SI TENGO DEBERIA AGREGAR EL COMANDO DE REPOSICIONARLOS
            if (kimbokos.Count > 1)
            {
                POSITIONTYPE positionTypeToRearrange = movePositioner.GetPositionType(kimbokos.Count);
                Vector3[]    finalRearrangePositions = movePositioner.GetPositions(actualPosition, positionTypeToRearrange);

                // SONIDO DE CUANDO SE MUEVEN PARA REPOSICIONARSE
                if (GameSoundManager.Instance != null && GameSoundManager.Instance.audioSource != null)
                {
                    AudioSourceParameter audioParameter  = new AudioSourceParameter(false, true);
                    Animotion            motionMoveSound = new SoundAnimotion(this, 1, GameSoundManager.Instance.audioSource, GameSoundManager.Instance.audioClips[4], audioParameter);
                    motionsSpawnCombine.Add(motionMoveSound);
                }


                // deberia recorrer la lista de unidades, y generar una move comand para posicionarse en el lugar que tiene cada una del cuadrado
                for (int i = 0; i < kimbokos.Count; i++)
                {
                    List <Animotion> motionsCombineSpawnMoveSquare = new List <Animotion>();
                    Animator         animatorAux = kimbokos[i].GetComponent <Animator>();
                    // LOS PONGO EN ESTADO MOVE PARA LA ANIMACION
                    Animotion motionMove = new MoveAnimatedAnimotion(this, 1, animatorAux);
                    motionsSpawnCombine.Add(motionMove);

                    List <Animotion> motionsCombineSpawnStopMoveSquare = new List <Animotion>();
                    // LOS MUEVO DESDE DONDE ESTAN HASTA LA POSICION FINAL
                    Animotion motionTwMove = new MoveTweenAnimotion(this, 1, kimbokos[i].transform, finalRearrangePositions[i], 1);
                    motionsCombineSpawnStopMoveSquare.Add(motionTwMove);
                    // LOS PONGO EN ESTADO IDLLE
                    Animotion motionIdlle = new IdlleAnimatedAnimotion(this, 2, animatorAux);
                    motionsCombineSpawnStopMoveSquare.Add(motionIdlle);

                    // esto solo lo hago para detener el sonido de los pasos
                    if (kimbokos.Count - 1 == i)
                    {
                        List <ConfigurableMotion> configurables = new List <ConfigurableMotion>();

                        if (GameSoundManager.Instance != null && GameSoundManager.Instance.audioSource != null)
                        {
                            StopSoundConfigureContainer stopSoundContainer = new StopSoundConfigureContainer(GameSoundManager.Instance.audioSource);
                            ConfigureAnimotion          stopSoundConfigure = new ConfigureAnimotion(stopSoundContainer, 2, true);
                            configurables.Add(stopSoundConfigure);
                        }
                        CombineAnimotion combineStopMotion = new CombineAnimotion(this, 1, motionsCombineSpawnStopMoveSquare, configurables);
                        motionsCombineSpawnMoveSquare.Add(combineStopMotion);
                    }
                    else
                    {
                        CombineAnimotion combineStopMotion = new CombineAnimotion(this, 1, motionsCombineSpawnStopMoveSquare);
                        motionsCombineSpawnMoveSquare.Add(combineStopMotion);
                    }
                    CombineAnimotion combinSquarePositionMotion = new CombineAnimotion(this, 1, motionsCombineSpawnMoveSquare);
                    motionsSpawnCombine.Add(combinSquarePositionMotion);
                }
            }
            CombineAnimotion combinMoveMotion = new CombineAnimotion(this, reproductionOrder, motionsSpawnCombine);

            return(combinMoveMotion);
        }
        public Animotion MoveToSquarePositionAnimotion(List <GameObject> kimbokos, Vector3 actualPosition)
        {
            List <Animotion>   motionsSpawnCombine = new List <Animotion>();
            UnitMovePositioner movePositioner      = new UnitMovePositioner(4f);

            // 2 - DESPUES ME DEBERIA FIJAR SI TENGO ENEMIGOS EN LA QUE SELECCIONE, Y SI TENGO DEBERIA AGREGAR EL COMANDO DE REPOSICIONARLOS
            if (kimbokos.Count > 0)
            {
                // AHORA TENGO QUE GENERAR EL CUADRADO DE POSICIONES PARA CADA UNA
                Vector3[] squarePositions = movePositioner.GetPositions(actualPosition, POSITIONTYPE.SQUARE);

                // SONIDO DE CUANDO SE MUEVEN PARA REPOSICIONARSE
                if (GameSoundManager.Instance != null && GameSoundManager.Instance.audioSource != null)
                {
                    AudioSourceParameter audioParameter  = new AudioSourceParameter(false, true);
                    Animotion            motionMoveSound = new SoundAnimotion(this, 1, GameSoundManager.Instance.audioSource, GameSoundManager.Instance.audioClips[4], audioParameter);
                    motionsSpawnCombine.Add(motionMoveSound);
                }

                // deberia recorrer la lista de unidades, y generar una move comand para posicionarse en el lugar que tiene cada una del cuadrado
                for (int i = 0; i < kimbokos.Count; i++)
                {
                    Animator animatorAux = kimbokos[i].GetComponent <Animator>();


                    List <Animotion> motionsCombineSpawnMoveSquare = new List <Animotion>();
                    Animotion        motionMove = new MoveAnimatedAnimotion(this, 1, animatorAux);
                    motionsCombineSpawnMoveSquare.Add(motionMove);

                    List <Animotion> motionsCombineSpawnStopMoveSquare = new List <Animotion>();
                    Animotion        motionTwMove = new MoveTweenAnimotion(this, 1, kimbokos[i].transform, squarePositions[i], 1);
                    Animotion        motionIdlle  = new IdlleAnimatedAnimotion(this, 2, animatorAux);
                    motionsCombineSpawnStopMoveSquare.Add(motionTwMove);
                    motionsCombineSpawnStopMoveSquare.Add(motionIdlle);

                    // esto solo lo hago para detener el sonido de los pasos
                    if (kimbokos.Count - 1 == i)
                    {
                        List <ConfigurableMotion> configurables = new List <ConfigurableMotion>();

                        if (GameSoundManager.Instance != null && GameSoundManager.Instance.audioSource != null)
                        {
                            StopSoundConfigureContainer stopSoundContainer = new StopSoundConfigureContainer(GameSoundManager.Instance.audioSource);
                            ConfigureAnimotion          stopSoundConfigure = new ConfigureAnimotion(stopSoundContainer, 2, true);
                            configurables.Add(stopSoundConfigure);
                        }
                        CombineAnimotion combineStopMotion = new CombineAnimotion(this, 1, motionsCombineSpawnStopMoveSquare, configurables);
                        motionsCombineSpawnMoveSquare.Add(combineStopMotion);
                    }
                    else
                    {
                        CombineAnimotion combineStopMotion = new CombineAnimotion(this, 1, motionsCombineSpawnStopMoveSquare);
                        motionsCombineSpawnMoveSquare.Add(combineStopMotion);
                    }
                    CombineAnimotion combinSquarePositionMotion = new CombineAnimotion(this, 1, motionsCombineSpawnMoveSquare);
                    motionsSpawnCombine.Add(combinSquarePositionMotion);
                }
            }
            CombineAnimotion repositionInSquareMotion = new CombineAnimotion(this, 1, motionsSpawnCombine);

            return(repositionInSquareMotion);
        }
        public Animotion CreateNewBoardAnimotion(Board2DManager board2D, Action OnBoardLoadComplete)
        {
            GameObject[,] tiles = new GameObject[board2D.columnsWidht, board2D.rowsHeight];
            int        index      = 1;
            GameObject tileParent = new GameObject("TileParent");

            List <Animotion> motionsCreateBoard = new List <Animotion>();

            for (int x = 0; x < board2D.columnsWidht; x++)
            {
                for (int y = 0; y < board2D.rowsHeight; y++)
                {
                    if (x == 0 || x == 1)
                    {
                        tiles[x, y] = board2D.GridArray[x, y].goAnimContainer.GetTransform().gameObject;
                        tiles[x, y].transform.SetParent(tileParent.transform);
                        continue;
                    }
                    if (x == 9 || x == 10)
                    {
                        tiles[x, y] = board2D.GridArray[x, y].goAnimContainer.GetTransform().gameObject;
                        tiles[x, y].transform.SetParent(tileParent.transform);
                        continue;
                    }

                    Vector3 thisTileFinalPosition = board2D.GetGridObject(x, y).GetRealWorldLocation();

                    tiles[x, y] = board2D.GridArray[x, y].goAnimContainer.GetTransform().gameObject;
                    tiles[x, y].transform.position = new Vector3(thisTileFinalPosition.x, Helper.GetCameraTopBorderYWorldPostion().y, 0);
                    tiles[x, y].transform.SetParent(tileParent.transform);

                    // TWEEN DE LA CRANE A LA POSICION DE SPAWNEO
                    Animotion motionTweenMove = new MoveTweenAnimotion(this, index, tiles[x, y].transform, thisTileFinalPosition, 1);
                    motionsCreateBoard.Add(motionTweenMove);
                }
                index++;
            }

            // para las spawn tiles
            Vector2 yOffset = new Vector2(0, 10);
            Vector3 pOneNexusFinalPosition = board2D.GetPlayerNexusWorldPosition(true);

            tiles[0, 0].transform.position = new Vector3(pOneNexusFinalPosition.x, Helper.GetCameraTopBorderYWorldPostion().y + yOffset.y, 0);
            Animotion motionTweenNexusP1Move = new MoveTweenAnimotion(this, index, tiles[0, 0].transform, pOneNexusFinalPosition, 1);

            motionsCreateBoard.Add(motionTweenNexusP1Move);

            Vector3 pTwoNexusFinalPosition = board2D.GetPlayerNexusWorldPosition(false);

            tiles[9, 0].transform.position = new Vector3(pTwoNexusFinalPosition.x, Helper.GetCameraTopBorderYWorldPostion().y + yOffset.y, 0);
            Animotion motionTweenNexusP2Move = new MoveTweenAnimotion(this, index, tiles[9, 0].transform, pTwoNexusFinalPosition, 1);

            motionsCreateBoard.Add(motionTweenNexusP2Move);

            index++;

            List <ConfigurableMotion>      configurables        = new List <ConfigurableMotion>();
            EventInvokerConfigureContainer eventContainer       = new EventInvokerConfigureContainer(OnBoardLoadComplete);
            ConfigureAnimotion             eventConfigAnimotion = new ConfigureAnimotion(eventContainer, index, true);

            configurables.Add(eventConfigAnimotion);


            //EventInvokerGenericContainer evenToInvoke = new EventInvokerGenericContainer(OnBoardLoadComplete);
            //InvokeEventConfigureAnimotion<EventInvokerGenericContainer, Transform> onBoardCompleteInvokeEvent =
            //    new InvokeEventConfigureAnimotion<EventInvokerGenericContainer, Transform>(evenToInvoke, index);

            CombineAnimotion combinMoveMotion = new CombineAnimotion(this, 1, motionsCreateBoard, configurables);

            return(combinMoveMotion);
        }
        public Animotion AddCardAnimotion(GameObject createdCardGameObject, int PlayerID)
        {
            Vector3 normalScale = createdCardGameObject.transform.localScale;
            Vector3 startScale  = new Vector3(0.2f, 0.2f, 1);

            createdCardGameObject.transform.localScale = startScale;

            // hacerla animacion de instanciamiento a la mano y saliendo un poco de la pantalla
            List <Animotion> motionsSpawn       = new List <Animotion>();
            RectTransform    cardRect           = createdCardGameObject.GetComponent <RectTransform>();
            Animotion        motionTweenScaleUp = new ScaleRectTweenAnimotion(this, 1, cardRect, normalScale, 1);

            motionsSpawn.Add(motionTweenScaleUp);

            Vector3 finalCardPosition = Vector3.zero;

            if (PlayerID == 0)
            {
                if (cardHolderPlayerLeft.transform.childCount > 0)
                {
                    finalCardPosition = cardHolderPlayerLeft.GetChild(cardHolderPlayerLeft.childCount - 1).position;
                }
                else
                {
                    finalCardPosition = cardHolderPlayerLeft.position;
                }
            }
            else
            {
                if (cardHolderPlayerRight.transform.childCount > 0)
                {
                    finalCardPosition = cardHolderPlayerRight.GetChild(cardHolderPlayerRight.childCount - 1).position;
                }
                else
                {
                    finalCardPosition = cardHolderPlayerRight.position;
                }
            }

            Animotion motionTweenSpawn = new SpawnCardTweenAnimotion(this, 1, createdCardGameObject.transform, finalCardPosition, 2);

            motionsSpawn.Add(motionTweenSpawn);

            // tengo que setear el parent
            List <ConfigurableMotion> configurables = new List <ConfigurableMotion>();

            ChildParentConfigureContainer parentContainer = null;

            if (PlayerID == 0)
            {
                parentContainer = new ChildParentConfigureContainer(cardHolderPlayerLeft, createdCardGameObject.transform);
            }
            else
            {
                parentContainer = new ChildParentConfigureContainer(cardHolderPlayerRight, createdCardGameObject.transform);
            }
            ConfigureAnimotion parentChildConfigAnimotion = new ConfigureAnimotion(parentContainer, 3, true);

            configurables.Add(parentChildConfigAnimotion);

            CardInGameUINEW cardInGameUI = createdCardGameObject.GetComponent <CardInGameUINEW>();

            // activamos el canvas group para que pueda recibir raycast otra vez
            SetCanvasGroupBlockRaycastConfigureContainer canvasBlockRayContainer = new SetCanvasGroupBlockRaycastConfigureContainer(cardInGameUI, true);
            ConfigureAnimotion blackRayCastConfigAnimotion = new ConfigureAnimotion(canvasBlockRayContainer, 4, true);

            configurables.Add(blackRayCastConfigAnimotion);

            CombineAnimotion combineMoveMotion = new CombineAnimotion(this, 1, motionsSpawn, configurables);

            return(combineMoveMotion);
        }
Exemplo n.º 9
0
        public Animotion NormalSpawnAnimotion(Vector3 tileObjectRealWorldLocation, GameObject goKimbok)
        {
            List <Animotion>          motionsSpawn       = new List <Animotion>();
            List <ConfigurableMotion> configureAnimotion = new List <ConfigurableMotion>();

            //A CRANE//GRUA SET ACTIVE = TRUE
            Crane.SetActive(true);

            // POSICION INICIAL Y FINAL DE LA GRUA PARA TWEENEAR
            Vector3 craneStartPosition;
            Vector3 craneEndPostion;

            //B TWEEN DESDE UNA POSICION ELEVADA SOBRE LA TILE DONDE SE INDICO SPAWNEAR HASTA MAS ABAJO ASI SE VE DESDE ARRIBA EN EL TABLERO SOBRE LA TILE
            craneStartPosition = new Vector3(tileObjectRealWorldLocation.x, craneStartPositionY, 0);
            PositionVector3ConfigureContainer posVectContainer = new PositionVector3ConfigureContainer(craneStartPosition, Crane.transform);
            ConfigureAnimotion posVectConfigure = new ConfigureAnimotion(posVectContainer, 1);

            configureAnimotion.Add(posVectConfigure);

            craneEndPostion = new Vector3(tileObjectRealWorldLocation.x, Helper.GetCameraTopBorderYWorldPostion().y);

            Vector3 craneSpawnPosition = CraneEnd.position;

            // ACTIVAMOS AL KIMBOKO SINO NO PUEDE OBTENER EL CURRENT ANIMATOR STATE INFO
            goKimbok.SetActive(true);

            goKimbok.transform.position = craneSpawnPosition;

            // TWEEN DE LA CRANE A LA POSICION DE SPAWNEO
            Animotion motionTweenMove = new MoveTweenAnimotion(this, 2, Crane.transform, craneEndPostion, craneTweenSpeedVelocity);

            motionsSpawn.Add(motionTweenMove);

            ////C ANIMATION CRANESPAWNING
            Animotion motionCraneSpawn = new SpawnAnimatedAnimotion(this, 3, craneAnimator);

            motionsSpawn.Add(motionCraneSpawn);

            if (GameSoundManager.Instance != null && GameSoundManager.Instance.audioSource != null)
            {
                AudioSourceParameter audioParameter   = new AudioSourceParameter(true); // false
                Animotion            motionSpawnSound = new SoundAnimotion(this, 3, GameSoundManager.Instance.audioSource, GameSoundManager.Instance.audioClips[3], audioParameter);
                motionsSpawn.Add(motionSpawnSound);
            }

            PositionTransformConfigureContainer posTransformContainer = new PositionTransformConfigureContainer(goKimbok.transform, CraneEnd);
            ConfigureAnimotion posTransformConfigure = new ConfigureAnimotion(posTransformContainer, 4);

            configureAnimotion.Add(posTransformConfigure);

            GameObjectSetActiveConfigureContainer setActiveContainer = new GameObjectSetActiveConfigureContainer(goKimbok, true);
            ConfigureAnimotion setActiveConfigure = new ConfigureAnimotion(setActiveContainer, 4, true);

            configureAnimotion.Add(setActiveConfigure);


            ////E TWEEN DESDE LA PUNTA DEL CRANE HASTA EL PISO, DE LA MISMA DURACION QUE LA ANIMACION DE SPAWN
            Animotion motionKimbokoTweenMove = new MoveTweenAnimotion(this, 5, goKimbok.transform, tileObjectRealWorldLocation, kimbokoTweenSpeedVelocity);

            motionsSpawn.Add(motionKimbokoTweenMove);
            //G TWEEN DE LA CRANE PARA QUE SALGA DEL MAPA
            Animotion motionTweenBackCraneMove = new MoveTweenAnimotion(this, 6, Crane.transform, craneStartPosition, craneTweenSpeedVelocity);

            motionsSpawn.Add(motionTweenBackCraneMove);

            // FINISH //



            SetTriggerAnimationCongifureContainer setIdlleKimbokoContainer = new SetTriggerAnimationCongifureContainer(goKimbok.GetComponent <Animator>(), "Idlle");
            ConfigureAnimotion idlleKimbokoConfigure = new ConfigureAnimotion(setIdlleKimbokoContainer, 7, true);

            configureAnimotion.Add(idlleKimbokoConfigure);
            SetTriggerAnimationCongifureContainer setIdlleCraneContainer = new SetTriggerAnimationCongifureContainer(craneAnimator, "Idlle");
            ConfigureAnimotion idlleCraneConfigure = new ConfigureAnimotion(setIdlleCraneContainer, 7, true);

            configureAnimotion.Add(idlleCraneConfigure);
            //Animotion motionIdlleKimboko = new IdlleAnimatedAnimotion(this, 7, goKimbok.GetComponent<Animator>());
            //motionsSpawn.Add(motionIdlleKimboko);

            //Animotion motionIdlleCrane = new IdlleAnimatedAnimotion(this, 7, craneAnimator);
            //motionsSpawn.Add(motionIdlleCrane);

            CombineAnimotion spawnMotion = new CombineAnimotion(this, 1, motionsSpawn, configureAnimotion);

            // LO DESACTIVO PARA QUE NO MOLESTE EN ESCENA ANTES DE "SPAWNEARSE"
            goKimbok.SetActive(false);

            return(spawnMotion);
        }