This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//<summary> | |
//Check for user input and switch weapons accordingly | |
//</summary> | |
private void CheckIfSwitchingWeapon() | |
{ | |
if (Input.GetButtonDown("SwitchWeapon")) | |
{ | |
NextWeapon(); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This code came from: http://hobbyistcoder.com/product/2d-shooter-bullet-weapon-system-asset-unity3d/ | |
private void BulletPresetChangedHandler() | |
{ | |
switch (BulletPreset) | |
{ | |
case BulletPresetType.Simple: | |
bulletCount = 1; | |
weaponFireRate = 0.15f; | |
bulletSpacing = 1f; | |
bulletSpread = 0.05f; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// Check for pickup type and set powerup effect on the player | |
/// Play a particle effect when touching a player, and despawn afterwards | |
/// </summary> | |
/// <param name="other">What are we colliding with? Should only check for player</param> | |
private void OnTriggerEnter(Collider other) | |
{ | |
if (!other.gameObject.CompareTag("Player")) return; | |
SpawnTextWhenTouched(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// Switch to the next weapon in our inventory | |
/// </summary> | |
private void NextWeapon() | |
{ | |
// Store the value of the next weapon | |
currentWeaponIndex ++; | |
// Reached the end of the array, start from the beginning | |
if (currentWeaponIndex >= weaponInventory.Length) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Declare a Prepose program named “soccer” | |
APP soccer: | |
// We are building the “ola” or “wave” gesture | |
// An app can have multiple gestures |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<button id="btn_submit" data-win-control="WinJS.UI.Tooltip" data-win-options="{innerHTML: 'Submit your Order'}"> | |
{{HomePage.GitHubID}} | |
</button> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
(function () { | |
console.log("HomePageController loaded"); | |
angular.module('app') | |
.controller('HomePageController', thingsandstuff); | |
function thingsandstuff() { | |
var vm = this; | |
vm.Title = "FSharp Web Kit"; | |
vm.GitHubID = "GitHubID"; //TODO: set this w/ a Get call to retrieve GitHub ID from user |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link rel="import" href="../paper-radio-group/paper-radio-group.html"> | |
<link rel="import" href="../paper-radio-button/paper-radio-button.html"> | |
<polymer-element name="x-radial-buttons"> | |
<template> | |
<style> | |
#paper_radio_group { | |
left: 690px; | |
top: 380px; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link href="bower_components/polymer/polymer.html" rel="import"> | |
<link rel="import" href="../paper-radio-group/paper-radio-group.html"> | |
<link rel="import" href="../paper-radio-button/paper-radio-button.html"> | |
<polymer-element name="x-radial-buttons"> | |
<!-- Shadow DOM --> | |
<template> | |
<style> | |
#paper_radio_group { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function (pokemonApp) { | |
// Grab inputs and button for speech-to-text | |
var form = document.querySelector('#player-form'), | |
input = document.querySelector('#player-input'), | |
playerElement = document.querySelector('#player-element'), | |
xPokemon = document.querySelector('#x-pokemon'), | |
btnChangeAccent = document.querySelector('#btn-change-accent'), | |
radialButtonTemplate = document.querySelector("#radial-button-template"), | |
playerAccent = playerElement.getAttribute("accent"); |
OlderNewer