// unity functions void Awake() { if (instance == null) { instance = this; } else if (instance != this) { Destroy(this.gameObject); } }
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 } } }; }
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); }
private void Start() { inst = this; }