Exemplo n.º 1
0
        private void SetUpChildSatellites(BoundingBox bound, KeyCode code, VisualPayload payload)
        {
            var newSatellite = bound.gameObject.AddComponent <KeyPressSatellite>();

            newSatellite.KeyCode    = code;
            newSatellite.OnKeyDown += () => JobManager.Instance.StartJob(
                OnKeyDown.Transmit(payload), jobName: "Key Down", startImmediately: true,
                maxExecutionsPerFrame: 1);
            newSatellite.OnKeyHeld += () => JobManager.Instance.StartJob(
                OnKeyHeld.Transmit(payload), jobName: "Key Held", startImmediately: true,
                maxExecutionsPerFrame: 1);
            newSatellite.OnKeyUp += () => JobManager.Instance.StartJob(
                OnKeyUp.Transmit(payload), jobName: "Key Up", startImmediately: true,
                maxExecutionsPerFrame: 1);
        }