Ejemplo n.º 1
0
 // this is the function that levers use to let the LeverScript know they exist
 // only the first lever can register itself, all subsequent levers are rejected
 public bool RegisterLever(LeverVariant lever)
 {
     if (this.lever == null)
     {
         this.lever = lever;
         return(true);
     }
     else
     {
         return(false);
     }
 }
Ejemplo n.º 2
0
    private LeverVariant lever;          //reference to the active lever

    private LeverScript()
    {
        lever = null;
    }