예제 #1
0
        private void SetUpEventTrigering()
        {
            float speed = width / 1.75f;

            genmtt              = SetMoveToTarget(Gen, genTarget, speed);
            wallymtt            = SetMoveToTarget(Wally, wallyTarget, speed);
            wallymtt.OnFinished = (sender, args) =>
            {
                ExclamationMark.GetComponent <ZoomShowAnimation>().SetUpSpeed(2.5f);
                ExclamationMark.GetComponent <ZoomShowAnimation>().StartZoomIn();
            };
            laurencemtt            = SetMoveToTarget(Laurence, laurenceTarget, speed);
            laurencemtt.OnFinished = (sender, args) =>
            {
                LaurenceMark.GetComponent <ZoomShowAnimation>().SetUpSpeed(2f);
                LaurenceMark.GetComponent <ZoomShowAnimation>().StartZoomIn();
            };
            wenmtt           = SetMoveToTarget(Wen, wenTarget, speed);
            yumtt            = SetMoveToTarget(Yu, yuTarget, speed);
            yumtt.OnFinished = (sender, args) =>
            {
                QuestionMark.GetComponent <ZoomShowAnimation>().SetUpSpeed(1.5f);
                QuestionMark.GetComponent <ZoomShowAnimation>().StartZoomIn();
            };

            wenmtt.OnFinished = (o, e) => { yumtt.StartMoving(); };
        }
예제 #2
0
        private MoveInAnimation SetMoveToTarget(GameObject go, Vector3 target, float speed = 1f)
        {
            MoveInAnimation mtt = go.GetComponent <MoveInAnimation>();

            mtt.SetTargetAndSpeed(target, speed);
            return(mtt);
        }