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 Equations{ | |
//t:currenttime, b:Start value, c:end value, d:duration | |
// ----------------------------------------------------------------------------------------------- | |
public static float Linear(float t, float b, float c, float d){ | |
return c * t / d + b; | |
} | |
// ----------------------------------------------------------------------------------------------- | |
public static float BackEaseIn(float t, float b, float c, float d){ | |
return c * ( t /= d ) * t * ( ( 1.70158f + 1f ) * t - 1.70158f ) + b; |
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 System; | |
using System.Runtime.Serialization.Formatters.Binary; | |
using System.IO; | |
public class Program | |
{ | |
[Serializable] | |
class MyObj{ | |
public string name = "hello world"; | |
public int id = 1; |
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 System; | |
using System.Collections.Generic; | |
using System.Text; | |
public class Program | |
{ | |
class BinaryDataConverter{ | |
private bool _isSerializing; | |
private List<byte> _bytesList; | |
protected byte[] _bytes; |