public void Delete_NullEntity_ThrowsException() { // Arrange var wai = new WhatAmI(); // Act // Assert Assert.Throws( Is.InstanceOf<ArgumentNullException>().And.Message.StringMatching( "Precondition failed: entity != null entity\r\nParameter name: entity"), () => wai.Delete(null)); }
private GameObject tempCastingAbilityHold; // Stores the Gameobject that is going to be casted. void Start() { //Intials myGameObject = gameObject; myTransform = gameObject.transform; abilityManager = GameObject.Find("AbilityManager").GetComponent <AbilityManager>(); // Gets the ability name of each ability and sets the timers according to their cooldown Variable for (int i = 0; i < myAbilityNames.Count; i++) { abilityManager.SetTimers(myAbilityNames[i], myAbilityTimerList[i]); myAbilityStats.Add(abilityManager.getAbilityObject(myAbilityNames[i]).GetComponent <AbilityStats>()); } for (int i = 0; i < myActiveAbilitySlots.Count; i++) { myActiveAbilitySlots[i] = abilityManager.SetActiveSlots(i); } // Check if the Object of this script is an enemy, player or Item // This will help with setting up certain abilities. // Enemy kinda works like players with abilities, where they will cast as will // Items will be set to use abilities based on interactions and triggers. if (myGameObject.tag == "Enemy") { whatAmI = WhatAmI.Enemy; } else if (myGameObject.tag == "Player") { whatAmI = WhatAmI.Player; } else if (myGameObject.tag == "Item") { whatAmI = WhatAmI.Item; } }