public void StartNight_Gameroom() { IHotelTamagotchiContext c = new FakeHotelTamagotchiContext(); IHotelRoomRepository hR = new HotelRoomRepository(c); ITamagotchiRepository tR = new TamagotchiRepository(c); HotelRoomViewModel h = new HotelRoomViewModel() { Size = 5, Type = HotelRoomType.Gameroom, }; hR.Add(h); TamagotchiViewModel t = new TamagotchiViewModel() { Name = "Test", Alive = true, HotelRoom = h, HotelRoomId = h.Id, Boredom = 50 }; tR.Add(t); NightController nC = new NightController(tR, hR); nC.StartNight(); Assert.IsTrue(tR.Find(t.Id).Boredom == 0); Assert.IsTrue(tR.Find(t.Id).Pennies == 80); }
private void Start() { destroyPoint = GameObject.Find("DestroyPoint").GetComponent <Transform>(); nightController = GameObject.Find("TimeController").GetComponent <NightController>(); image = GetComponent <Image>(); color.a = 1f; }
public void StartNight_Homeless() { IHotelTamagotchiContext c = new FakeHotelTamagotchiContext(); IHotelRoomRepository hR = new HotelRoomRepository(c); ITamagotchiRepository tR = new TamagotchiRepository(c); TamagotchiViewModel t = new TamagotchiViewModel() { Name = "Test", Alive = true }; TamagotchiViewModel t2 = new TamagotchiViewModel() { Name = "Test2", Alive = true, Health = 10, }; tR.Add(t); tR.Add(t2); NightController nC = new NightController(tR, hR); nC.StartNight(); Assert.IsTrue(tR.Find(t.Id).Boredom == 20); Assert.IsTrue(tR.Find(t.Id).Health == 80); Assert.IsTrue(tR.Find(t2.Id).Health == 0); Assert.IsTrue(tR.Find(t2.Id).Alive == false); }
void Start() { allpoints = GameObject.Find("PointsController").GetComponent <AllPoints>(); if (allpoints == null) { Debug.Log("The game object -PointsController- not find in scene"); } moneyCollect = GameObject.Find("PointsController").GetComponent <MoneyCollect>(); if (moneyCollect == null) { Debug.Log("The game object -PointsController- not find in scene"); } pointsCollect = GameObject.Find("PointsController").GetComponent <PointsCollect>(); if (pointsCollect == null) { Debug.Log("The game object -PointsController- not find in scene"); } nightController = GetComponent <NightController>(); storageTime = Time.time + waitTime; storageTimeDay = Time.time + dayChange; }
private void Awake() { if (Instance == null) { Instance = this; } textMesh = gameObject.GetComponentInChildren <TextMeshProUGUI>(); animator = gameObject.GetComponentInChildren <Animator>(); gameObject.SetActive(false); }
public void NightControllerIndex() { // Arrange NightController controller = new NightController(); // Act ViewResult result = controller.Index() as ViewResult; // Assert Assert.IsNotNull(result); }
void Start() { nightController = NightControllerObj.GetComponent <NightController>(); audioSource = GetComponent <AudioSource>(); spriteRenderer = PlayerSpriteObj.GetComponent <SpriteRenderer>(); animator = GetComponent <Animator>(); meleeController = MeleeColliderObj.GetComponent <MeleeController>(); buffBarController = BuffBarObj.GetComponent <BuffBarController>(); buffBarController.buffDuration = buffDuration; meleeController.Damage = MeleeDamage; movespeed = 1.2f + (1.2f * (GlobalDataScript.SpeedBonus / 100f)); }
private void Start() { coinTextBox.SetActive(false); mainCharInv = MainCharInventory.Instance; hotbarCont = HotbarController.Instance; dialogCont = DialogController.Instance; storeCont = WebStoreController.Instance; mainCharCont = MainCharacterController.Instance; settingsCont = SettingsController.Instance; nightCont = NightController.Instance; forestCanvasCont = ForestCanvasController.Instance; timeSystem = TimeSystem.Instance; endGameCont = EndGameController.Instance; }
// Use this for initialization void Start() { //hide the cursor Cursor.visible = false; canMove = true; health = 2 + healthBonus; equippedItem = 0; beans = 0; isFloating = false; bubble = null; lastSwitchedItem = Time.time; canBubblewand = true; controller = GetComponent <CharacterController>(); coll = GetComponent <Collider>(); spriteRenderer = GetComponent <SpriteRenderer>(); animator = GetComponent <Animator>(); audioSource = GetComponent <AudioSource>(); inTornado = false; night = GameObject.FindWithTag("Night").GetComponent <NightController>(); }
void Start() { allPoints = GameObject.Find("PointsController").GetComponent <AllPoints>(); nightController = GameObject.Find("TimeController").GetComponent <NightController>(); }
// Use this for initialization void Start() { timeText = GetComponent <Text>(); night = GameObject.FindWithTag("Night").GetComponent <NightController>(); group = transform.parent.gameObject.GetComponent <CanvasGroup>(); }
// Start is called before the first frame update public void BreakThatEgg() { NightController nightController = FindObjectOfType <NightController>(); DestroyObject(nightController.Egg); }