Beispiel #1
0
 private void DrawPoseMenu()
 {
     foreach (PoseObject pose in _poseObjects)
     {
         PoseButton poseButton = Instantiate(_template, transform);
         poseButton.SetBackgroundSprite(_inactive);
         poseButton.SetIconImageSprite(pose.Icon);
         poseButton.ButtonClicked += OnPoseButtonClick;
     }
 }
Beispiel #2
0
    private void OnPoseButtonClick(PoseButton poseButton)
    {
        poseButton.SetBackgroundSprite(_active);

        if ((++_chosenPosesCount) == 3)
        {
            _title.DOAnchorPosX(530, 0.3f).SetEase(Ease.InBack).SetDelay(.5f);
            _rectTransform.DOAnchorPosY(-760, 0.3f).SetEase(Ease.InBack).SetDelay(.5f).OnComplete(() =>
            {
                _startJump.Raise();
            });
        }
    }