// 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); } }
private LeverVariant lever; //reference to the active lever private LeverScript() { lever = null; }