void Start() { //hide marks under table _mark = InitSpriteObject(_mark, "bluearrow", new Vector3(0.5f,0.2f,0.2f),new Vector3(0f,-5f,0f)); _markPass = InitSpriteObject(_mark, "pass", new Vector3(1f,1f,1f),new Vector3(0f,-5f,0f)); timeController = new TimeController(); }
void Awake() { if (GameObject.Find("Terrain")) terrainUtils = GameObject.Find ("Terrain").GetComponent<TerrainUtils>(); selector = gameObject.AddComponent<Selector>(); input = gameObject.AddComponent<InputController>(); time = gameObject.AddComponent<TimeController>(); commanderSkin = Resources.Load("CommanderGUI") as GUISkin; }
void Start() { var singletons = GameObject.FindWithTag("Singletons"); _timeController = singletons.GetComponent <TimeController>(); if (_timeController == null) { throw new System.ArgumentNullException("Could not find a TimeController on the Singletons object"); } }
public void Init(ObjectSpritesDatabase _objectSpritesDatabase, TimeController _timeController, EnergyController _energyController, HintsController _hintsController) { timeController = _timeController; objectSpritesDatabase = _objectSpritesDatabase; energyController = _energyController; hintsController = _hintsController; timeController.onTimeOver += Defeat; timeController.onTimeUpdate += TimeUpdate; }
public void TestGet_AssertDayOfYearMatch() { var controller = new TimeController { Request = new HttpRequestMessage(), Configuration = new HttpConfiguration() }; Assert.AreEqual(DateTime.UtcNow.DayOfYear, controller.Get().DayOfYear); }
public void Delete() { // Arrange TimeController controller = new TimeController(); // Act controller.Delete(5); // Assert }
public void Put() { // Arrange TimeController controller = new TimeController(); // Act controller.Put(5, "value"); // Assert }
void Awake() { DontDestroyOnLoad(gameObject); DontDestroyOnLoad(SettingCanvas); soundC = GetComponent <SoundController>(); timeC = GetComponent <TimeController>(); LoadingPanel = SettingCanvas.transform.GetChild(0).gameObject; timeCounting = false; isTimeAttack = false; }
// Start is called before the first frame update void Start() { GameObject daySystem = GameObject.Find("DayNight"); dayContoller = daySystem.GetComponent <TimeController>(); carLights = GameObject.FindGameObjectsWithTag("CarLights"); isLightsOn = false; materials = GetComponent <Renderer>().materials; lights_matererial = materials[1]; }
void Update() { //Get current gamespeed from the timecontroller set in maincontroller and calculate bird avatar's movement speed //TODO: Null checks TimeController tc = GameObject.Find("MainController").GetComponent <TimeController>(); float timeSpeed = tc.getTimeSpeed(); calculatedMoveSpeed = moveSpeed * (int)timeSpeed; if (nextWaypoint) { Debug.DrawLine(transform.position, nextWaypoint.position, Color.green); } if (lastWaypoint) { Debug.DrawLine(transform.position, lastWaypoint.position, Color.black); } WaypointScript nextWp = nextWaypoint.GetComponent <WaypointScript> (); if (nextWp.stopPoint && currentState == MovementStates.MOVING) { this.currentState = MovementStates.STOPPED; this.stoppedAtTime = tc.getCurrentDateTime(); this.leaveTime = stoppedAtTime.AddMinutes(nextWp.stopTimeInMinutes); nextWp.stopPoint = false; if (nextWp.gameObject.GetComponent <PointOfInterest>() != null) { nextWp.gameObject.GetComponent <PointOfInterest>().show(); } } if (currentState == MovementStates.STOPPED) { if (tc.getCurrentDateTime() >= leaveTime) { currentState = MovementStates.MOVING; if (nextWp.gameObject.GetComponent <PointOfInterest>() != null) { nextWp.gameObject.GetComponent <PointOfInterest>().hide(); } } } // move if (movingTowardsObject && currentState == MovementStates.MOVING) { MoveTowardsObject(); } // Rotate towards object if (rotatingTowardsObject) { RotateTowardsObject(); } }
void Awake() { input = GameObject.Find("InputController").GetComponent <InputController>(); world = GameObject.Find("WorldGeneration").GetComponent <WorldGeneration>(); items = GameObject.Find("ItemController").GetComponent <ItemController>(); mapController = GameObject.Find("WorldGeneration").GetComponent <DrawMap>(); uiController = GameObject.Find("UIController").GetComponent <UIController>(); gameController = GameObject.Find("GameController").GetComponent <GameController>(); timeController = GameObject.Find("TimeController").GetComponent <TimeController>(); spriteAnimator = GetComponent <SpriteAnimator>(); }
public void GetById() { // Arrange TimeController controller = new TimeController(); // Act string result = controller.Get(5); // Assert Assert.AreEqual("value", result); }
private void Start() { effectsManager = GetComponent <EffectsManager>(); spawnController = GetComponent <SpawnController>(); droppableController = GetComponent <DroppableController>(); timeController = new TimeController(gameData, DateTime.Now); timeController.TogglePause(); StartCoroutine(LoadDataFromFile()); }
void Start() { _timeController = EventController.Instance.GetComponent <TimeController>(); _timeController.StartTime(); _uiController = GameObject.Find("Canvas").GetComponent <UIController>(); rb = GetComponent <Rigidbody2D>(); Cameras = GameObject.FindGameObjectsWithTag("Camera"); Microphones = GameObject.FindGameObjectsWithTag("Microphone"); animator = GetComponent <Animator>(); _dashTrail = GetComponentInChildren <DashTrail>(); }
public void Test_Add() { var mockContext = new Mock <ApplicationDbContext>(); var unitOfWork = new EventUnitOfWork(mockContext.Object); var log = new NullLogger <TimeController>(); var output = new TimeController(unitOfWork, log); var result = output.AddEvent(); Assert.IsType <ViewResult>(result); }
public static void InitStage(Animal script, TimeController timeController) { switch (script.lifeStage) { case adult: script.StartCoroutine(script.AdultStage.Live(script, timeController, script.AdultPreps, script.AdultEvents)); break; case child: script.StartCoroutine(script.ChildStage.Live(script, timeController, script.ChildPreps, script.ChildEvents)); break; default: script.StartCoroutine(script.TeenStage.Live(script, timeController, script.TeenPreps, script.TeenEvents)); break; } }
public void Test_filter() { var mockContext = new Mock <ApplicationDbContext>(); var unitOfWork = new EventUnitOfWork(mockContext.Object); var log = new NullLogger <TimeController>(); var output = new TimeController(unitOfWork, log); var result = output.filter(6, 2021); Assert.IsType <RedirectToActionResult>(result); }
/// <summary> /// Awake is called when the script instance is being loaded. /// </summary> void Awake() { if (Instance != null && Instance != this) { Destroy(gameObject); } else { Instance = this; } }
private void Awake() { if (_instance != null && _instance != this) { Destroy(this.gameObject); } else { _instance = this; } }
private async Task CreateTimeMVCAsync() { TimeModel timeModel = TimeFactory.Instance.CreateTimeModel(); TimeView timeView = await TimeFactory.Instance.CreateTimeView(_view.GameAreaView); _timeController = TimeFactory.Instance.CreateTimeController(timeModel, timeView); _timeController.TimeFinish += OnTimeFinish; TimeRestart += _timeController.OnTimeRestart; RoundFinish += _timeController.OnRoundFinish; }
private void Start() { if (Instance == null) { Instance = this; } else { Destroy(this); } }
private void TransformPlayer() { LevelController.Instance.Player = Instantiate(ShapeType, currentPlayer.transform.position, Quaternion.identity).GetComponent <RunnerController>(); if (LevelController.Instance.practiceMode) { TimeController.PlayerChanged(); } Destroy(currentPlayer.gameObject); particles.Stop(true, ParticleSystemStopBehavior.StopEmitting); }
// Use this for initialization void Start() { TimeController.timeController = this; _sw = false; _h = _m = _s = 0; _time = 0; //커서관련 _maxMoveTime = 210; // 3분30초 _distance = (_maxLine.transform.position.x - _minLine.transform.position.x) / _maxMoveTime; // 커서의 시간에 따른 이동 거리 }
private void Awake() { // if the singleton hasn't been initialized yet if (instance != null && instance != this) { Destroy(this.gameObject); } instance = this; DontDestroyOnLoad(this.gameObject); }
void Start() { prefabs = new List <GameObject>(); prefabs.Add(directionCellPrefab); prefabs.Add(RotatingCellPrefab); prefabs.Add(blockCellPrefab); prefabs.Add(OneDirCellPrefab); prefabs.Add(BoundryPrefab); timeController = TimeController.instance; moving = false; }
protected override void SetUpEvents() { TimeController.RegisterSubscription( new Func <bool>(() => TimeController.isTimeLaterThan(18, 0)), new Action(() => { audioSource.Stop(); audioSource.clip = nameToAudioClip["Creepy loop 1"]; audioSource.Play(); } )); }
void Awake() { if (instance == null) { instance = this; } else { Destroy(gameObject); } }
public FreeModeInterface( GameSettings settings, OutputController output, ContextController context, CountryController country, MapController map, TimeController time ) { _settings = settings; _out = output; _context = context; _country = country; _map = map; _time = time; }
private static void SalvarTime(int id, String pTime, int estId) { try { Time time = new Time(); time.Nome = pTime; time.EstadioId = estId; TimeController timeCont = new TimeController(); timeCont.AtualizarTime(id, time); } catch (Exception exp) { throw exp; } }
// Start is called before the first frame update void Start() { playerC = Player.GetComponent <PlayerController>(); cameraC = MainCamera.GetComponent <CameraController>(); waterC = WaterTower.GetComponent <WaterController>(); GameControllerObject = GameObject.Find("GameControllerObject"); gameC = GameControllerObject.GetComponent <GameController>(); soundC = GameControllerObject.GetComponent <SoundController>(); timeC = GameControllerObject.GetComponent <TimeController>(); playableD = GetComponent <PlayableDirector>(); StartCoroutine(waterC.StartEvelation(waterDuration)); }
// Use this for initialization void Start() { this.facingRight = true; this.doesMelee = false; this.cantMove = false; this.originalJumpPower = this.jumpPower; this.animator = this.GetComponent <Animator>(); this.rigiBody = this.GetComponent <Rigidbody2D>(); this.timeController = GameObjectBank.instance.gameController.GetComponent <TimeController>(); this.mainCamera = GameObjectBank.instance.mainCamera.GetComponent <Camera>(); this.playerCollider = this.GetComponent <BoxCollider2D>(); }
public void Create(DalTimeController e) { var TimeController = new TimeController() { TimeControllerID = e.Id, WorkStart = e.WorkStart, WorkEnd = e.WorkEnd, SellerID = e.SellerID }; Context.Set <TimeController>().Add(TimeController); }
// Use this for initialization void Awake() { scoreController = GameObject.FindWithTag("ScoreController"); GameObject timeController = GameObject.FindWithTag("TimeController"); //create reference for Player gameobject, and assign the variable via FindWithTag at start if (timeController != null) // if the playerObject gameObject-reference is not null - assigning the reference via FindWithTag at first frame - { tcScript = timeController.GetComponent<TimeController>();// - set the PlayerController-reference (called playerControllerScript) to the <script component> of the Player gameobject (via the gameObject-reference) to have access the instance of the PlayerController script } if (timeController == null) //for exception handling - to have the console debug the absense of a player controller script in order for this entire code, the code in the GameController to work { Debug.Log("Cannot find ScoreController script for final score referencing to GameOver - finalAcquired Label"); } }
void Start() { //Create and add a TimeController to the MainController component timeController = gameObject.AddComponent<TimeController> (); /* * Add functionality to the UI buttons in the scene. UICanvas prefab must exist in the scene. */ GameObject.Find ("PauseBtn").GetComponent<Button> ().onClick.AddListener(timeController.PauseTime); GameObject.Find ("PlayBtn").GetComponent<Button> ().onClick.AddListener(timeController.ResumeTime); GameObject.Find ("BackwardsBtn").GetComponent<Button> ().onClick.AddListener(timeController.DoubleReverseTime); GameObject.Find ("ForwardBtn").GetComponent<Button> ().onClick.AddListener(timeController.ForwardTime); GameObject.Find ("PlaybackBtn").GetComponent<Button> ().onClick.AddListener(timeController.ReverseTime); }
void Start() { //Debug.Log(Resources.Load<GameObject>("Sprite/" + "userImgUI").GetComponent<SpriteRenderer>().sprite); _playerPropertyUI = GameObject.FindGameObjectWithTag("PlayerPropertyUI"); LoadSpriteToImage(_playerPropertyUI, "userImgUI"); LoadSpriteToImage(_playerPropertyUI.transform.GetChild(0).gameObject, "border"); LoadSpriteToImage(_playerPropertyUI.transform.GetChild(1).gameObject, "border"); LoadSpriteToImage(_playerPropertyUI.transform.GetChild(2).gameObject, "border"); _remindText = GameObject.FindGameObjectWithTag("RemindText").GetComponent<Text>(); _gameOverDialog = transform.GetChild(transform.childCount-1).gameObject; _gameOverDialog.SetActive(false); //_remindText.color = new Color(0.2f,1f,0.3f); _remindText.text = "YOUR TURN"; _timeCtl = new TimeController(); RemindTextOff(); //_timeText = }
private void Awake() { _instance = this; }
void Awake() { randomWaypoints = new List<Transform>(); visitedWaypoints = new List<Transform>(); defaultMoveSpeed = moveSpeed; defaultTurningSpeed = turnSpeed; if (GameObject.Find ("MainController").GetComponent<TimeController> () != null) { tc = GameObject.Find ("MainController").GetComponent<TimeController> (); } }
void Start() { Physics.gravity = new Vector3(0, -jumpFactor, 0); joystick = GameObject.Find ("CNJoystick").GetComponent<CNJoystick> (); timeController = GameObject.Find("TimeController").GetComponent<TimeController>(); //subscribe to the recorder for recording movement recorder = GameObject.Find ("TimeController").GetComponent<Recorder> (); recorder.Subscribe (this); }
public void OnPointerClick(PointerEventData eventData) { this.tc = GameObject.Find("MainController").GetComponent<TimeController>(); EventAttributes eAtr = this.GetComponent<EventAttributes>(); tc.ChangeEventClick(eAtr.data); }
void Start() { instance = this; motionBlur = GetComponent<MotionBlur>(); }
void fetchComponents() { timeController = GameObject.FindGameObjectWithTag ("Time").GetComponent<TimeController>(); netPlay = GetComponentInParent<NetworkPlayer> (); cam = GetComponentInParent<NetworkPlayer> ().playerCam; sprites = GetComponentInParent<Sprites> (); FleetsList = GameObject.FindGameObjectWithTag ("Lists").GetComponent<Lists> ().FleetsList; }
// Use this for initialization void Start() { instance = this; t = this.GetComponent<TimeController> (); }
void Start () { Inst = this; PlayerPrefs.SetString("bestTime", "99 : 99"); }
// Use this for initialization void Start () { animator = GetComponent<Animator>(); treeController = FindObjectOfType<TreeController>(); scoreController = FindObjectOfType<ScoreController>(); timeController = FindObjectOfType<TimeController>(); }
void Awake() { if (Controller == null) { DontDestroyOnLoad(transform.root.gameObject); Controller = this; _timeController = new TimeController(); if (settings == null) { settings = new GameSettings(); } } else if (Controller != this) { Destroy(gameObject); } }
// Use this for initialization void Start() { GameObject scripts = GameObject.Find("Scripts"); timeController = (TimeController) scripts.GetComponent("TimeController"); }
private void Start() { _instance = this; _initialFixedDelta = Time.fixedDeltaTime; _currentState = TimeState.Regular; }
void Start() { gameControllerObj = GameObject.FindGameObjectWithTag("GameController"); shake = gameControllerObj.GetComponent<Shake>(); timeController = gameControllerObj.GetComponent<TimeController>(); }