Ejemplo n.º 1
0
    public void NextLevel()
    {
        currentPatternContainer = (currentPatternContainer + 1) % 2;
        CreateFloor();
        interFloorTransition = true;

        SetupCamera();
        //Camera.main.transform.position = new Vector3(0,18,0);

        floor++;
        StopAudioWhileLevelTransition();

        TweenZ.Add(patternContainers[(currentPatternContainer + 1) % 2].gameObject, interFloorTransitionDuration, -patternTransitionAmount * PatternSettings.tiledSize).EaseInOutBackWith(1f);
        TweenZ.Add(patternContainers[currentPatternContainer].gameObject, interFloorTransitionDuration, 0).EaseInOutBackWith(1f).Then(ClearPrevPattern);
        Invoke("MoveCharacter", interFloorTransitionDuration * 0.5f);
    }
Ejemplo n.º 2
0
    public void Move()
    {
        if (moved)
        {
            return;
        }

        WorkOutDirAndSpeed();
        switch (axis)
        {
        case MoveAxis.X:
            TweenX.Add(gameObject, speed, endPosition.x);
            break;

        case MoveAxis.Y:
            TweenZ.Add(gameObject, speed, endPosition.y);
            break;
        }

        moved = true;
    }