Пример #1
0
    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
    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
    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
    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
	void Start ()
	{
		field_animation = GetComponent<Animation>();
		field_animationWithCallback = GetComponent<AnimationWithCallback>();// GetComponent<AnimationCallback>();
	}
Пример #7
0
 public void FadeOut()
 {
     AnimationQueue.Enqueue(AnimationWithCallback.Create(Animation.Create(SetRelativeXPosition, Easings.Functions.ExponentialEaseIn, 0.5f, 0, 1000), null, () => gameObject.SetActive(false)));
 }
Пример #8
0
 internal void FadeOutToLeft()
 {
     Animate(AnimationWithCallback.Create(Animation.Create(UpdateXPostion, Easings.Functions.QuadraticEaseIn, 0.6f, 0, -1000), null, ResetAndHide));
 }
Пример #9
0
 void Start()
 {
     field_animation             = GetComponent <Animation>();
     field_animationWithCallback = GetComponent <AnimationWithCallback>();       // GetComponent<AnimationCallback>();
 }