Ejemplo n.º 1
0
 private void OnTriggerEnter(Collider other)
 {
     if (other.gameObject.layer == LayerMask.NameToLayer("Bean"))
     {
         BeanController.DestroyBean(other.transform.GetComponent <BeanObject>());
     }
 }
Ejemplo n.º 2
0
 public void AddBean(BeanObject beanObj)
 {
     DOTween.Init();
     beanObj.gameObject.transform.DOPunchScale(new Vector3(0.2f, 0.2f, 0.2f), 1.2f, 5);
     //beanObj.gameObject.transform.DOJump( uiManager.beanImage.transform.position, 0.1f, 1, 1.0f, false)
     beanObj.gameObject.transform.DOMove(uiManager.beanImage.transform.position, 1.0f, false)
     .SetEase(Ease.InQuint)
     .OnComplete(() => {
         uiManager.beanImage.transform.DOPunchScale(new Vector3(0.2f, 0.2f, 0.2f), 1.2f, 5);
         uiManager.totalScoreText.transform.DOPunchScale(new Vector3(0.2f, 0.2f, 0.2f), 0.2f, 2);
         AddScore(beanObj.script.score);
         BeanController.DestroyBean(beanObj);
     });
 }
        public void GetBeanshReturnsResultOfIBeanProvider()
        {
            var      beanMock = new Mock <IBeanProvider>();
            BeanData beanData = new BeanData();

            beanMock.Setup(x => x.GetBeanData()).Returns(beanData);

            var controller = new BeanController(beanMock.Object);

            var result     = controller.GetBeans();
            var resultData = result.Result.As <JsonResult>();

            resultData.StatusCode.Should().Equals(200);
            ((BeanData)resultData.Value).Should().Equals(beanData);
        }