protected virtual void Awake() { mover = GetComponent <Movement>(); spaceShip = GetComponent <SpaceShip>(); visibilityChecker = GetComponentInChildren <VisibilityChecker>(); weaponGroups = GetComponentsInChildren <WeaponGroup>(); }
public VisibilityControl(Control control, System.Timers.Timer timer) { targetControl = control; VisibleViaFocus = false; Visible = true; OverlayVisible = true; // Glue to avoid interop exceptions from calling Show/Hide directly VisibilityChecker myChecker = CheckVisibility; var currentDispatcher = System.Windows.Threading.Dispatcher.CurrentDispatcher; // Let the polling begin timer.Elapsed += (o, e) => { currentDispatcher.Invoke(myChecker); }; }
public PostExtractorChecker( ContractNodes usedToExtract, Action<System.CodeDom.Compiler.CompilerError> errorHandler, bool allowPreconditionsInOverrides, bool fSharp, bool explicitUserValidations, bool addInterfaceWrappersWhenNeeded, int runtimeCheckingLevel) { Contract.Requires(errorHandler != null); Contract.Requires(usedToExtract != null); this.m_errorHandler = errorHandler; this.allowPreconditionsInOverrides = allowPreconditionsInOverrides; this.explicitUserValidations = explicitUserValidations; this.addInterfaceWrappersWhenNeeded = addInterfaceWrappersWhenNeeded; this.runtimeCheckingLevel = runtimeCheckingLevel; this.purityChecker = new PurityChecker(this.HandleError, fSharp, usedToExtract); this.preconditionChecker = new PreconditionChecker(this.HandleError, usedToExtract); this.postconditionChecker = new PostconditionChecker(this.HandleError, fSharp); this.invariantCallChecker = new CheckForCallsToInvariantMethods(this); this.methodBodyChecker = new MethodBodyChecker(this.HandleError, usedToExtract); this.invariantChecker = new InvariantChecker(this.HandleError, usedToExtract); this.contractNodes = usedToExtract; this.visibilityChecker = new VisibilityChecker(this.HandleError, usedToExtract); this.invariantMethods = new TrivialHashtable(0); }
// private methods private void Awake() { Mover = gameObject.GetComponent <Movement>(); visibilityChecker = GetComponentInChildren <VisibilityChecker>(); }