Ejemplo n.º 1
0
    public void Initialise(IPoison target)
    {
        this.target = target;
        timers      = new float[maxStacks];

        initialColor = target.renderer.color;
    }
Ejemplo n.º 2
0
        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());
        }
Ejemplo n.º 3
0
 public void Drink(IPoison sadness)
 {
     Debug.Write(", I drink my sadness");
     A_Moment_Passes();
 }