Skip to content

Instantly share code, notes, and snippets.

Sean Duffy Shogan

Block or report user

Report or block Shogan

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Shogan
Shogan / gist:853ee54b3ec0a405ef0e
Last active Aug 29, 2015
FetchAllCharactersFromAWS
View gist:853ee54b3ec0a405ef0e
private void FetchAllCharactersFromAWS()
{
resultText.text = "\n***LoadTable***";
Table.LoadTableAsync(_client, "CharacterCreator", (loadTableResult) =>
{
if (loadTableResult.Exception != null)
{
resultText.text += "\n failed to load characters table";
}
else
@Shogan
Shogan / gist:aae54252966804fba1a4
Created May 25, 2015
character-creator-button-operation-listeners
View gist:aae54252966804fba1a4
createOperation.onClick.AddListener(CreateCharacterInTable);
refreshOperation.onClick.AddListener(FetchAllCharactersFromAWS);
NextCharacterButton.onClick.AddListener(CycleNextCharacter);
PrevCharacterButton.onClick.AddListener(CyclePrevCharacter);
@Shogan
Shogan / gist:e22d2336248af28aa465
Last active Aug 29, 2015
CharacterOperations-for-UI
View gist:e22d2336248af28aa465
private void LoadCharacter(CharacterEntity characterEntity)
{
// Update the selected body component values stored as field values
selectedBody = characterEntity.BodySpriteName;
selectedFace = characterEntity.FaceSpriteName;
selectedHair = characterEntity.HairSpriteName;
selectedShirt = characterEntity.ShirtSpriteName;
selectedPants = characterEntity.PantsSpriteName;
selectedShoes = characterEntity.ShoesSpriteName;
View gist:ff42193696541e8ec646
private DynamoDBContext Context
{
get
{
if (_context == null)
_context = new DynamoDBContext(_client);
return _context;
}
}
@Shogan
Shogan / gist:be44b29f7b8e18832bc8
Last active Aug 29, 2015
character-creator-fields
View gist:be44b29f7b8e18832bc8
public string cognitoIdentityPoolString;
private CognitoAWSCredentials credentials;
private IAmazonDynamoDB _client;
private DynamoDBContext _context;
private List<CharacterEntity> characterEntities = new List<CharacterEntity>();
private int currentCharacterIndex;
@Shogan
Shogan / gist:9f075f43ac789d8520c3
Last active Aug 29, 2015
CharacterEntityClass
View gist:9f075f43ac789d8520c3
using System.Collections.Generic;
using Amazon.DynamoDBv2.DataModel;
namespace Assets.CharacterCreatorAWSDynamoDB.Scripts
{
[DynamoDBTable("CharacterCreator")]
public class CharacterEntity
{
[DynamoDBHashKey] // Hash key.
public string CharacterID { get; set; }
View gist:d1d6d52a9b2a8f435b2f
using Amazon;
using Amazon.CognitoIdentity;
using Amazon.DynamoDBv2;
using Amazon.DynamoDBv2.DataModel;
using Amazon.DynamoDBv2.DocumentModel;
using Amazon.DynamoDBv2.Model;
@Shogan
Shogan / gist:e6eb8222859ccbff9769
Created May 25, 2015
CharacterCreatorAWSRolePolicy
View gist:e6eb8222859ccbff9769
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Stmt1432372934255",
"Action": [
"dynamodb:DeleteItem",
"dynamodb:GetItem",
"dynamodb:PutItem",
"dynamodb:Scan",
You can’t perform that action at this time.