public Player(EventBus eventBus, GameVariable <bool> varCanOpenBox) { this.eventBus = eventBus; this.canOpenBox = varCanOpenBox; DrawOrder = DrawOrderPosition.Foreground; // Physical properties Props.TopSpeed = 150f; Props.PhysicalRect = new Rectangle(0, 0, 15, 20); Props.Weight = 1f; Props.HasGravity = true; fireListener = new KeyPressListener(Keys.Space, () => fireProjectile(), 0100); }
public Player(EventBus eventBus, ICamera camera) { this.eventBus = eventBus; this.camera = camera; DrawOrder = DrawOrderPosition.Foreground; // Physical properties Props.TopSpeed = 150f; Props.PhysicalRect = new Rectangle(0, 0, 15, 20); Props.Weight = 1f; Props.HasGravity = true; fireListener = new KeyPressListener(Keys.E, () => fireProjectile(), 0100); }
public UrielForm(UrielConfiguration configuration) { this.configuration = configuration; if (configuration.WorkflowMode != UrielWorkflowMode.MovieMode) { this.watcher = new ShaderFileWatcher(configuration.WatchDirectory); watcher.Run(); } this.renderLoop = new RenderLoop(); this.builder = new ShaderBuilder(ShaderZoo.BadShaderArguments()); this.FrameTracker = new FrameTracker(); this.ShaderBlobs = new BindingList <ShaderBlob>(); this.listener = new KeyPressListener(); this.tks = new TotalKeyState(); this.ki = new KeyInterpreter(); InitializeComponent(); }