void Awake() { scoreManager = GetComponent <ScoreManager>(); pinSet = GameObject.FindObjectOfType <PinSet>(); ball = GameObject.FindObjectOfType <BallControl>(); scoreUI = GameObject.FindObjectOfType <ScoreUI>(); }
/// <summary>Creates a new 8x8 dot matrix LED array</summary> /// <param name="input">The set of pins controlling the component</param> public DotMatrix(PinSet input) { Row = new[] { input.Pin9, input.Pin14, input.Pin8, input.Pin12, input.Pin1, input.Pin7, input.Pin2, input.Pin5 }; Column = new[] { input.Pin13, input.Pin3, input.Pin4, input.Pin10, input.Pin6, input.Pin11, input.Pin15, input.Pin16 }; foreach (var column in Column) { column.PowerMode = PowerMode.Differential; } }
void Start() { rb = GetComponent <Rigidbody>(); wpc = GameObject.FindObjectOfType <WaypointCollection>(); pinSet = GameObject.FindObjectOfType <PinSet>(); startPosition = GameObject.FindObjectOfType <StartPosition>(); bounds = GetComponent <SphereCollider>().bounds; arrowPointer = GetComponentInChildren <ArrowPointer>(); arrowOriginRotation = arrowPointer.transform.rotation; arrowPointer.gameObject.SetActive(false); }
public bool Save() { bool ret = true; try { Pin pn = new Pin(); pn.PinNumber = PinNumber; if (ExtensionNumber != null) { pn.Extension = Extension.Load(ExtensionNumber + "@" + ExtensionDomain); } pn.OwningSet = PinSet.Load(SetName + "@" + Context); pn.Save(); ID = pn.ID; ConfigurationController.RegisterChangeCall( typeof(PinnedRoutePlan), new ADialPlan.sUpdateConfigurationsCall( (ExtensionNumber != null ? "AddAdvancedPin" : "AddBasicPin"), new NameValuePair[] { new NameValuePair("context", Context), new NameValuePair("name", SetName), new NameValuePair("pin", (ExtensionNumber != null ? (object)new PinnedRoutePlan.sAdvancedPin(ExtensionNumber, ExtensionDomain, PinNumber) : (object)PinNumber)) } ), new IEvent[] { new GenericEvent("PinSetUpdated", new NameValuePair[] { new NameValuePair("Name", SetName), new NameValuePair("Context", Context), new NameValuePair("IsAdvanced", (ExtensionNumber != null)) }) } ); } catch (Exception e) { Log.Error(e); EventController.TriggerEvent(new ErrorOccuredEvent(e)); ret = false; } return(ret); }
private void OnPinSet(NamedPin pin, bool state) { Logger.Log("OnPinSet( Pin={0}, State={1} )", pin, state); PinSet?.Invoke(this, new PinSetEventArgs(pin, state)); }