Пример #1
0
    internal void StartCompletingAnimation(TileController objective)
    {
        Vector3 target   = objective.transform.localPosition - Vector3.up * 2;
        float   duration = PlayBoard.TURN_DURATION * 3;

        completingAnimation = gameObject.AddComponent <AnimationGroup>();
        completingAnimation.AddAnimation(ColorAnimation.CreateColorAnimation(Mesh, Color.clear, duration));
        completingAnimation.AddAnimation(objective.GetFillingAnimation(duration));
        completingAnimation.AddAnimation(MovementAnimation.CreateMovementAnimation(gameObject, target, duration));
        completingAnimation.StartAnimating();
    }
Пример #2
0
    // Use this for initialization
    void Start()
    {
        duration    = 1.0f;
        targetScale = transform.localScale * 4;
        Vector3           target           = Camera.main.ScreenToWorldPoint(new Vector3(Screen.width / 2, Screen.height / 2, 10));
        MovementAnimation currentAnimation = MovementAnimation.CreateMovementAnimation(gameObject, target, duration);

        currentAnimation.StartAnimating();
        StartAnimating();
        //transform.LookAt(Camera.main.transform);
    }