This file contains hidden or 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
using UnityEngine; | |
public class UIRandomSpriteSeeder : MonoBehaviour | |
{ | |
private Vector3 TopRightPoint; | |
private Vector3 BottomLeftPoint; | |
void Start() | |
{ | |
BottomLeftPoint = Camera.main.ScreenToWorldPoint( Vector3.zero ); |
This file contains hidden or 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
using UnityEngine; | |
public class MoveSprite : MonoBehaviour | |
{ | |
public tk2dSprite sprite; | |
float Speed = 50f; // 50 meters per second | |
Vector3 TopRightPoint; | |
Vector3 BottomLeftPoint; | |
This file contains hidden or 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
public static class DictionaryUtils | |
{ | |
public static string FindKey(this IDictionary<string, string> lookup, string value) | |
{ | |
foreach (var pair in lookup) | |
{ | |
if (pair.Value == value) | |
return pair.Key; | |
} | |
return ""; |
This file contains hidden or 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
public class EnumExtension | |
{ | |
enum Test { | |
[Description("This is a foo")] | |
Foo, | |
[Description("This is a bar")] | |
Bar | |
} |
NewerOlder