public void Initialise(IPoison target) { this.target = target; timers = new float[maxStacks]; initialColor = target.renderer.color; }
public void Interchangable_For_System_Exception_class_Registered() { Person person = new Person(); Poison poison = new Poison(); IPoison poisonTarget = poison.As <IPoison>(); IPerson personTarget = person.As <IPerson>( GooseTypePair.Create <Poison, IPoison>(), GooseTypePair.Create <Exception, IException>()); var ex = Assert.Throws <WrappedException <IException> >(() => personTarget.Drink(poisonTarget)); Assert.NotNull(ex.Exception); Assert.Equal(typeof(Exception), ex.Exception.GetSource <Exception>().GetType()); }
public void Drink(IPoison sadness) { Debug.Write(", I drink my sadness"); A_Moment_Passes(); }