コード例 #1
0
ファイル: Overview.cs プロジェクト: LightTrails/ProjectZ
    public void ChangeWorld(SOverviewWorld world)
    {
        var newWorld = world.Number;
        var oldWorld = SelectedWorld.Number;

        FindObjectOfType <Background>().FadeToLevel(newWorld, oldWorld);

        AnimationQueue.Enqueue(AnimationWithCallback.Create(Animation.Create(SetRelativeYPosition, Easings.Functions.ExponentialEaseIn, 0.5f, 0, -1000), null, () => SetLevelNumbers(world)));
        AnimationQueue.Enqueue(Animation.Create(SetRelativeXPosition, Easings.Functions.ExponentialEaseOut, 0.5f, 1000, 0));
    }
コード例 #2
0
    internal void OpenWorld()
    {
        World.IsOpen = true;

        var materialAnimation = Animation.Create(UpdateMaterialAnimation, Easings.Functions.Linear, 0.6f);
        var callBack          = AnimationWithCallback.Create(materialAnimation, () =>
        {
            DisableChildren();
        });

        var fullAnimation = new CompositeAnimation(callBack);

        AnimationQueue.Enqueue(fullAnimation);
    }
コード例 #3
0
ファイル: Tile.cs プロジェクト: LightTrails/ProjectY
    void Start()
    {
        levelConstraints = FindObjectOfType(typeof(LevelConstraints)) as LevelConstraints;
        visual           = gameObject.GetComponentInChildren <TileVisuals>();
        // ShowFront(0.1f);

        AnimationQueue.Enqueue(Animation.Delay(X * 0.1f));
        AnimationQueue.Enqueue(AnimationWithCallback.Create(
                                   Animation.Create(UpdateRotation, Easings.Functions.QuadraticEaseInOut, 1.0f, 0, 180.0f),
                                   null,
                                   () => {
            visual.backColor = colorSchema[0];
            visual.backIcon  = TileIcon.Blank;
        }
                                   ));
    }
コード例 #4
0
ファイル: ColorAction.cs プロジェクト: LightTrails/ProjectY
    public IAnimation CreateTurnColorAnimation(Tile tile, int newState)
    {
        tile.State = newState;

        return
            (AnimationWithCallback.Create(
                 Animation.Create(value => UpdateRotation(tile, value), Easings.Functions.QuadraticEaseInOut, AnimationConstants.TurnAnimationSpeed * 2, 0.0f, 180.0f),
                 () =>
        {
            tile.visual.frontColor = tile.colorSchema[newState];
            tile.visual.UpdateVisuals();
        },
                 () =>
        {
            tile.visual.backColor = Color.white;
            tile.visual.backIcon = TileIcon.Blank;
        }));
    }
コード例 #5
0
ファイル: WinOverlay.cs プロジェクト: LightTrails/ProjectZ
    internal void FadeInFromTop()
    {
        gameObject.SetActive(true);
        Delay(0.3f);
        UpdateYPostion(1000);

        var stars = GetComponentsInChildren <OverviewStar>();

        foreach (var star in stars)
        {
            star.Initialize(false);
        }

        Animate(AnimationWithCallback.Create(Animation.Create(UpdateYPostion, Easings.Functions.QuadraticEaseOut, 0.6f, 1000, 0), null, () =>
        {
            foreach (var star in stars)
            {
                star.FillStarByAnimation(0);
            }
        }
                                             ));
    }
コード例 #6
0
 public void FadeOut()
 {
     AnimationQueue.Enqueue(AnimationWithCallback.Create(Animation.Create(SetRelativeXPosition, Easings.Functions.ExponentialEaseIn, 0.5f, 0, 1000), null, () => gameObject.SetActive(false)));
 }
コード例 #7
0
ファイル: WinOverlay.cs プロジェクト: LightTrails/ProjectZ
 internal void FadeOutToLeft()
 {
     Animate(AnimationWithCallback.Create(Animation.Create(UpdateXPostion, Easings.Functions.QuadraticEaseIn, 0.6f, 0, -1000), null, ResetAndHide));
 }