Beispiel #1
0
 // unity functions
 void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     else if (instance != this)
     {
         Destroy(this.gameObject);
     }
 }
Beispiel #2
0
 public FinishControllerTests()
 {
     _logger = Substitute.For<ILogger<FinishController>>();
     _apiServices = Substitute.For<IApiServices>();
     _session = Substitute.For<ISession>();
 
     _controller = new FinishController(_logger, _apiServices)
     {
         ControllerContext = new ControllerContext { HttpContext = new DefaultHttpContext { Session = _session } }
     };
 }
Beispiel #3
0
    void OnTriggerEnter2D(Collider2D other)
    {
        if (other.tag == "Monster")
        {
            DestroyFireBall();
        }

        if (other.tag == "Girl")
        {
            DialogueController.DialogueShow("OH, NOOOOO!!", null);
            GameObject.FindGameObjectWithTag("4").GetComponent <RoomController>().DoSomothing1();
            Destroy(other.gameObject);
            DestroyFireBall();
            FinishController.Show();
        }
    }
        private FinishController CreateController(IDataProtectionProvider dataProtectionProvider = null, string cookie = null)
        {
            var _dataProtectionProvider = dataProtectionProvider ?? new EphemeralDataProtectionProvider();
            var controller = new FinishController(_logger, _apiServices, _dataProtectionProvider)
            {
                ControllerContext = new ControllerContext {
                    HttpContext = new DefaultHttpContext()
                }
            };

            if (!String.IsNullOrEmpty(cookie))
            {
                controller.Request.Cookies = new RequestCookieCollection(new Dictionary <string, string>
                {
                    { ".dysac-session", _dataProtectionProvider.CreateProtector("BaseController").Protect(cookie) }
                });
            }

            return(controller);
        }
Beispiel #5
0
 private void Start()
 {
     inst = this;
 }