public void Splash_ReturnsCorrectView_True() { SplashController controller = new SplashController(); ActionResult indexView = controller.Index(); Assert.IsInstanceOfType(indexView, typeof(ViewResult)); }
public MainWindowViewModel() { DARPResults = null; ILSEvolution = null; AlgorithmSummary = null; ChartsViewModel = null; VNSOperators = null; ProblemsInput = null; SolutionsData = null; DARPProblems = new List <string>(); DARPSelected = null; HeuristicExecuted = false; TabSelected = 0; //Inicializate Commands LoadInput = commands.AddAsyncCommand(ExecuteLoadProblems, CanExecuteLoadProblems); SettingsCommand = commands.AddCommand(ExecuteOpenSettings, CanExecuteOpenSettings); RunHeuristic = commands.AddAsyncCommand(ExecuteRunHeuristic, CanExecuteRunHeuristic); ExportCSV = commands.AddAsyncCommand(ExecuteExportCSV, CanExecuteExportCSV); //Load Settings Context.Instance.Settings = DARP.Settings.CheckDeserializeSettings(LoadLasSettings()); //Inicializate controllers. var controllers = ViewModelControllers.Instance; windowController = controllers.WindowController; processController = ProcessController.Instance; splashController = controllers.SplashController; }
void Water_OnTriggerExit2DEvent(Collider2D collider) { // Create a splash where we exit the water SplashController.InstantiateSplash(this.transform.position); // Gravity has full effect now outside water this.gravityModifier = 1.0f; }
void Start() { instance = this; // main splash mainSplashStyle.normal.background = mainSplashTexture; Texture2D texture = new Texture2D(1, 1); texture.SetPixel(0,0,Color.black); texture.Apply(); mainBackgroundStyle.normal.background = texture; }
void Water_OnTriggerEnter2DEvent(Collider2D collider) { // Create a splash where we enter the water SplashController.InstantiateSplash(this.transform.position); // When we hit the water, we interrupt our fall this.gravityModifier = GravityModifierInWater; // Slow us down initially as we enter water this.Controller2d.velocity.y *= 0.25f; this.Controller2d.velocity.x *= 0.25f; }
protected override void Start() { base.Start(); SplashController.HideSplash(); dailyBtn.transform.DOScale(1.05f, 0.8f).SetLoops(-1, LoopType.Yoyo); playBtn.transform.DOScale(1.05f, 0.8f).SetLoops(-1, LoopType.Yoyo); if (!FB.IsLoggedIn) { if (Prefs.FirstLoginFacebook == 1) { facebookReward.transform.GetChild(0).gameObject.SetActive(false); } facebookReward.transform.DOScale(1.05f, 0.8f).SetLoops(-1, LoopType.Yoyo); facebookReward.SetActive(true); } else { facebookReward.transform.DOKill(); facebookReward.SetActive(false); } }
/// <summary> /// Constructor /// </summary> public frmSplash() { // Initialization InitializeComponent(); // Create Instance of Controller Class controller = new SplashController(pbLoading, this); // Setup the button events btnEasy.Click += new EventHandler(controller.Difficulty_Click); btnMedium.Click += new EventHandler(controller.Difficulty_Click); btnHard.Click += new EventHandler(controller.Difficulty_Click); btnNightmare.Click += new EventHandler(controller.Difficulty_Click); // Accurately Center Form on Screen this.StartPosition = FormStartPosition.Manual; this.Location = new System.Drawing.Point( (Screen.FromControl(this).Bounds.Width / 2) - (this.Width / 2), (Screen.FromControl(this).Bounds.Height / 2) - (this.Height / 2)); }
// Use this for initialization void Start() { lcState = defaultState; if (lcState == LCState.Nothing) { gameRunning = false; } fader = GameObject.FindObjectOfType <FadeController>(); SplashController splash = FindObjectOfType <SplashController>(); if (defaultState != LCState.Nothing) { splashAnim = splash.GetComponent <Animator>(); SpawnPoints = new List <GameObject>(); NPCs = new List <Character>(); attributes = Resources.LoadAll <Sprite>("Sprites/CoMA People"); player = GameObject.Find("Player"); player.GetComponent <PlayerMovement>().canMove = false; A_star = GetComponent <NavGrid>(); cubicle = Resources.Load <GameObject>("Prefabs/Cubicle"); SpawnCubicles(); if (A_star != null) { A_star.GenerateMap(); } bible = Resources.Load <GameObject>("Prefabs/Bible").GetComponent <Character>(); reference = Resources.Load <GameObject>("Prefabs/NPC").GetComponent <Character>(); if (reference != null) { SpawnPeople(); } gameTimer = LevelTime; } }
void Update() { waitTime += Time.deltaTime; switch (type) { case BoxManager.MessageType.WaitingBox: if (waitHide && waitTime >= waiMaxTime) { waitHide = false; boxPanel.SetActive(true); return; } if (myAnimation != null) { myAnimation.transform.Rotate(-1 * Vector3.forward * Time.deltaTime * 500); } if (GameManager.Instance.globalTimeCount - this.startBoxTime > timeoutSec) { //首次登陆账号连接超时: if (GameManager.Instance.sceneName.Equals(Utils.UI_NAME_Login) && AccountManager.Instance.IsAccountLogin()) { Destroy(gameObject); //BoxManager.showMessage("连接超时,请重试"); BoxManager.showMessageByID((int)MessageIdEnum.Msg19); NetworkSender.Instance().sendFinish(false); //服务器轮询 GameObject sc = GameObject.FindWithTag("MainCamera").transform.FindChild("Anchor/Panel/SplashController(Clone)").gameObject; SplashController scScript = sc.GetComponent <SplashController>(); scScript.SelectAnotherServer(); break; } //普通连接超时 else { Destroy(gameObject); //BoxManager.showMessage("连接超时,请重试"); BoxManager.showMessageByID((int)MessageIdEnum.Msg19); NetworkSender.Instance().sendFinish(false); if (Application.loadedLevelName == Utils.UI_NAME_Battle || !GuideManager.Instance.isEnd()) { UIEventListener.Get(BoxManager.getYesButton()).onClick += NetManager.ReLink; } } } break; case BoxManager.MessageType.ProcessBox: if (waitHide && waitTime > waiMaxTime) { waitHide = false; boxPanel.SetActive(true); return; } if (myAnimation != null) { myAnimation.transform.Rotate(-1 * Vector3.forward * Time.deltaTime * 500); } break; // case BoxManager.MessageType.PROCESS: //FIXME: process can not work right // Debug.Log("progress:"+GameManager.Instance.async.progress); // break; #if UNITY_ANDROID case BoxManager.MessageType.MessageBox: if (myAnimation != null) { myAnimation.transform.Rotate(-1 * Vector3.forward * Time.deltaTime * 500); } break; #endif } }
protected virtual void Start() { currentHealth = MaxHealth; splashController = GetComponent <SplashController>(); }
// Start contains code initializing the script variables, and is called before the first frame void Start() { // Default speed is 10. speedDelta is 0 to ensure start speed is 0 speed = 10; speedDelta = 0; speedLimit = 146; PlayerPrefs.SetInt("Score", 0); // Initialize tail with reference to Tail GameObject, then get components with this reference tail = GameObject.Find("Tail"); tailController = tail.GetComponent <TailController>(); playerAnim = tail.GetComponent <Animator>(); // Get SplashController components of both splash objects, to use their methods to set splash positions splash1 = GameObject.Find("Splash1"); splash2 = GameObject.Find("Splash2"); splashController1 = splash1.GetComponent <SplashController>(); splashController2 = splash2.GetComponent <SplashController>(); // Again, get object reference followed by object component scoreDetails = GameObject.Find("ScoreDetails"); trickTrackController = scoreDetails.GetComponent <TrickTrackController>(); degrees = 0; degInc = 6; // Set acceleration and lenience based on difficulty difficulty = PlayerPrefs.GetInt("Difficulty"); switch (difficulty) { case 0: speedInc = 12; entryAngleLenience = 15; PlayerPrefs.SetFloat("end_multiplier", 1); break; case 1: speedInc = 10; entryAngleLenience = 35; break; case 2: speedInc = 8; entryAngleLenience = 25; break; case 3: speedInc = 6; entryAngleLenience = 15; break; case 4: speedInc = 5; entryAngleLenience = 10; break; } spaceObjects = new bool[10]; // Values for sea and sand boundary, and gravity gravConst = 0.3f; seaLevel = 20.5f; sandLevel = -44f; // Timer set to 25 so acceleration occurs at beginning timer = 25; maxTimer = 75; enterTimerSet1 = 5; enterTimerSet2 = 10; leftTouched = false; rightTouched = false; // Set all audio source variables to AudioSource components of respective GameObjects splash_source = GameObject.Find("Inside_Splash").GetComponent <AudioSource>(); outside_splash_source = GameObject.Find("Outside_Splash").GetComponent <AudioSource>(); underwater_ambience = GameObject.Find("Underwater_Ambience").GetComponent <AudioSource>(); outside_ambience = GameObject.Find("Outside_Ambience").GetComponent <AudioSource>(); space_ambience = GameObject.Find("Space_Ambience").GetComponent <AudioSource>(); outside_ambience.Play(); outside_ambience.volume = 0; }