public BusinessGraphicsController(Source source, IPlayerCommand playerProvider) { _source = source; interactive = ((BusinessGraphicsSourceDesign)source).AllowUserInteraction; _playerProvider = playerProvider; UpdateControlState(); }
public AudioMixerPlayerOperativeControl(Device device, IPlayerCommand playerProvider, IEventLogging logging) : this() { _countSwitch = 0; InitializeController(new AudioMixerPlayerController(device, playerProvider, this, logging)); SetControlPlayerTimerEnable(true, 3000); }
// Randomizes right, left, jump controls - guarantees at least one key will be different public void randomizeControls() { // while (keyRight == KeyCode.D && keyLeft == KeyCode.A && keyJump == KeyCode.W) // { // float rand = Random.value; // if (rand < 0.5f) // { // temp = keyLeft; // keyLeft = keyJump; // keyJump = temp; // } // rand = Random.value; // if (rand < 0.5f) // { // temp = keyRight; // keyRight = keyJump; // keyJump = temp; // } // } // Shuffles commands and then assigns them. FisherYatesShuffle(Commands); this.Right = Commands[0]; this.Left = Commands[1]; this.Jump = Commands[2]; }
public override System.Windows.Forms.Control CreateControlForSource(IEventLogging logging, Source source, Control parent, IPlayerCommand playerCommand, IPresentationClient client) { DVDPlayerControl2 control = new DVDPlayerControl2(source, playerCommand, logging, client); control.Parent = parent; parent.Controls.Add(control); control.CreateControl(); return control; }
public override Control CreateControlForDevice(IEventLogging logging, Device device, Control parent, IPlayerCommand playerProvider, IPresentationClient client) { LightPlayerControl control = new LightPlayerControl(device, playerProvider, logging); control.Parent = parent; parent.Controls.Add(control); control.CreateControl(); return control; }
public override Control CreateControlForSource(IEventLogging logging, Source source, Control parent, IPlayerCommand playerCommand, IPresentationClient client) { VDCTerminalControl control = new VDCTerminalControl(source, playerCommand, logging, client); control.Parent = parent; parent.Controls.Add(control); control.CreateControl(); return control; }
public LightPlayerControl(Device device, IPlayerCommand playerProvider, IEventLogging logging) : this() { _countSwitch = 0; _lightGroups = new Dictionary<string, int>(); InitializeController(new LightPlayerController(device, playerProvider, this, logging)); SetControlPlayerTimerEnable(true, 3000); }
public override System.Windows.Forms.Control CreateControlForSource(IEventLogging logging, TechnicalServices.Persistence.SystemPersistence.Presentation.Source source, System.Windows.Forms.Control parent, IPlayerCommand playerCommand, IPresentationClient client) { PlayerController controller = new PlayerController(source, playerCommand); VNCPlayerControl control = new VNCPlayerControl(controller); control.Parent = parent; parent.Controls.Add(control); control.CreateControl(); return control; }
void Start() { instance = GameManager.Instance; this.Clockwise = ScriptableObject.CreateInstance <MovePlayerClockwise>(); this.CounterClockwise = ScriptableObject.CreateInstance <MovePlayerCounterClockwise>(); this.Shoot = ScriptableObject.CreateInstance <PlayerShoot>(); this.Jump = ScriptableObject.CreateInstance <PlayerJump>(); Animation = gameObject.GetComponentInChildren <Animator>(); }
public override Control CreateControlForSource(IEventLogging logging, Source source, Control parent, IPlayerCommand playerProvider, IPresentationClient client) { PlayerController controller = new PlayerController(source, playerProvider); PlayerControl control = new PlayerControl(controller); control.Parent = parent; parent.Controls.Add(control); control.CreateControl(); return control; }
public PlayerController(Source source, IPlayerCommand playerCommand) { _source = source; _playerProvider = playerCommand; PowerPointPresentationSourceDesign pptSource = source as PowerPointPresentationSourceDesign; if (pptSource != null) { NumberOfSlides = pptSource.NumberOfSlides; } }
public void resetControls() { // keyShoot = KeyCode.Space; // keyRight = KeyCode.D; // keyLeft = KeyCode.A; // keyJump = KeyCode.W; this.Right = ScriptableObject.CreateInstance <MovePlayerRight>(); this.Left = ScriptableObject.CreateInstance <MovePlayerLeft>(); this.Jump = ScriptableObject.CreateInstance <PlayerJump>(); }
private void Update() { HundleInput(); if (commandQueue.Count == 0) { return; } IPlayerCommand command = commandQueue.Dequeue(); command.Execute(this); }
public PlayerController(Source source, IPlayerCommand playerCommand) { _source = source; _playerProvider = playerCommand; WordDocumentSourceDesign docSource = source as WordDocumentSourceDesign; if (docSource != null) { NumberOfPages = docSource.NumberOfPages; StartZoom = docSource.StartZoom; } }
internal PlayerController(Source source, IPlayerCommand playerProvider) { _source = source; _playerProvider = playerProvider; VideoSourceDesign videoSourceDesign = source as VideoSourceDesign; if (videoSourceDesign != null) { _duration = videoSourceDesign.Duration; } GetStatus(); }
public PlayerController(Source source, IPlayerCommand playerCommand) { _source = source; _playerProvider = playerCommand; IEDocumentSourceDesign ieSource = source as IEDocumentSourceDesign; //if (ieSource != null) //{ // //NumberOfSlides = ieSource.NumberOfSlides; // ZoomProperty = ieSource.Zoom; //} }
public VDCTerminalControl(Source source, IPlayerCommand playerCommand, IEventLogging logging, IPresentationClient client) : this() { CollapsedRGBOption = true; cbaAbonents.DisplayMember = "Name"; cbaAbonents.ValueMember = "Number1"; _controller = new PlayerController(client, source, this, playerCommand, logging); InitializeController(_controller); SetControlPlayerTimerEnable(true, 1000); }
public override Control CreateControlForSource(IEventLogging logging, Source source, Control parent, IPlayerCommand playerProvider, IPresentationClient client) { ArcGISMapController controller = new ArcGISMapController(source, playerProvider); //ChartManageControl control = new ChartManageControl(controller); //control.Parent = parent; //parent.Controls.Add(control); //control.CreateControl(); MapManageControl control = new MapManageControl(controller); control.Parent = parent; parent.Controls.Add(control); control.CreateControl(); return control; }
// Start is called before the first frame update void Start() { this.healthBar = GameObject.FindGameObjectWithTag("Manager").GetComponent <HUDManager>(); this.healthManager = GameObject.FindGameObjectWithTag("Manager").GetComponent <HealthManager>(); key = this.healthManager.Add(Health); this.Right = ScriptableObject.CreateInstance <MovePlayerRightMovement>(); this.Left = ScriptableObject.CreateInstance <MovePlayerLeftMovement>(); this.Jump = ScriptableObject.CreateInstance <MovePlayerJumpMovement>(); this.KnockbackRight = ScriptableObject.CreateInstance <MovePlayerKnockbackRight>(); this.KnockbackLeft = ScriptableObject.CreateInstance <MovePlayerKnockbackLeft>(); this.playerAnimator = GetComponent <Animator>(); this.currentState = State.Grounded; this.currentDirection = Direction.Right; }
public DVDPlayerControl2(Source source, IPlayerCommand playerCommand, IEventLogging logging, IPresentationClient client) : this() { InitializeController(new PlayerController(client, source, this, playerCommand, logging)); switch (_DVDType) { case InterfaceTypeEnum.IR: SetControlPlayerTimerEnable(false, 1); break; case InterfaceTypeEnum.RS232: SetControlPlayerTimerEnable(true, 1000); break; } }
// Start is called before the first frame update void Start() { //this.Shoot = this.gameObject.AddComponent<PlayerShootCommand>(); this.Right = ScriptableObject.CreateInstance <MovePlayerRight>(); this.Left = ScriptableObject.CreateInstance <MovePlayerLeft>(); this.Jump = ScriptableObject.CreateInstance <PlayerJump>(); // Array that will hold commands. this.Commands = new IPlayerCommand[3]; this.Commands[0] = this.Right; this.Commands[1] = this.Left; this.Commands[2] = this.Jump; animator = gameObject.GetComponent <PlayerAnimation>(); resetControls(); }
public void Execute(IPlayerCommand command) { if (command == null) throw new ArgumentNullException(nameof(command)); if (currentTurn == null) throw new InvalidOperationException("Game not started"); if (command.Player != currentTurn.Player && command.Type != GameCommand.Trade) throw new InvalidOperationException("This player can't execute a command at the moment"); if (!currentTurn.CanExecute(command.Type)) throw new ArgumentException("Can't execute this command in current state"); command.Execute(); bank.UpdateAchievements(currentTurn.Player); if (bank.VerifyWinCondition(currentTurn.Player)) SetGameFinished(); else currentTurn.AfterExecute(command.Type); }
public VDCServerPlayerControl(IEventLogging logging, Device device, IPlayerCommand playerProvider) : this() { InitializeController(new VDCServerPlayerController(device, playerProvider, this, logging)); SetControlPlayerTimerEnable(true, 1000); }
public void EnqueueCommand(IPlayerCommand command) { commandQueue.Enqueue(command); }
void Start() { this.idle = ScriptableObject.CreateInstance <PlayerIdle>(); speedMultiplier = 1; }
internal PlayerController(Source source, IPlayerCommand playerProvider) { _source = source; _playerProvider = playerProvider; GetStatus(); }
private void Start() { commandKeyZ = GenerateCommand(actionKeyZ); commandKeyX = GenerateCommand(actionKeyX); }
public static void Register() { Data = new CommandData("/help", "This will display information about the currently registered commands."); IPlayerCommand.Create(Data, PlayerCommandInvoked, null); }
public VideoCameraPlayerCommonControl(Source source, IPlayerCommand playerCommand, IEventLogging logging, IPresentationClient client) : this() { InitializeController(new VideoCameraPlayerCommonController(client, source, this, playerCommand, logging)); SetControlPlayerTimerEnable(true, 1000); }
public virtual Control CreateControlForDisplay(IEventLogging logging, Display display, Control parent, IPlayerCommand playerProvider, IPresentationClient client) { return null; }
private static bool CommandTextEqual(IPlayerCommand playerCommand, string inputCommand) { return(string.Equals(playerCommand.CommandText, inputCommand, StringComparison.InvariantCultureIgnoreCase)); }
public JupiterPlayerControl(Device device, IPlayerCommand playerProvider, IEventLogging logging) : this() { InitializeController(new JupiterPlayerController(device, playerProvider, this, logging)); SetControlPlayerTimerEnable(true, 3000); }
public virtual Control CreateControlForSource(IEventLogging logging, Source source, Control parent, IPlayerCommand playerProvider, IPresentationClient client) { return null; }
public ArcGISMapController(Source source, IPlayerCommand playerProvider) { _source = source; _playerProvider = playerProvider; }