Skip to content

Instantly share code, notes, and snippets.

@aprius
Last active June 23, 2019 04:38
Show Gist options
  • Save aprius/e4177c5b01c41f76a2c2f70d48dfcc8f to your computer and use it in GitHub Desktop.
Save aprius/e4177c5b01c41f76a2c2f70d48dfcc8f to your computer and use it in GitHub Desktop.
*NameSpace  : UpperCameICase
        
public namespace UnityModule.Sunflower
{
    
}
        
        
*Interface  : IUpperCameICase
    
public interface IStateCharacter
{
    
}
    

    
*Type parameter : TUpperCameICase;
    
public interface IButton<TValue>
{
    
}
    
    
*Method : UpperCameICase;
    
public void ExecuteProcess()
{
    
}
    
    
*Properties : UpperCameICase;
    
public int Damage {get; set;}
private int _health;
public int Health => _health;
public int Health
{
    get => _health;
    set => _health = value;
}

    
    
*local variables : lowerCameICase;
    
public void LocalVariable()
{
int moveSpeed = 0;
Action action;
float point;
}


*local constants : lowerCameICase
    
public void LocalConstant()
{
    const string nameFile = "name_file";
}
    
    
    
    
    
*parameter : lowerCameICase;
    
public void ParameterMethod(int id, int moveSpeed, int damage, int health, bool canMove, string name)
{
            
}

    
    
*Event 
    
public UnityEvent onDamage;
public Action onAction;
public delegate void ExampleDelegate ();

    
    
    
*field (not private) : lowerCameICase;
    
public string thisIsPublicField = "not private field";


    
    
*instance field (private) : _lowerCameICase;
    
private string _thisIsInstanceField = "private field";


    
    
    
*static field (private or public) : lowerCameICase;
    
public static int currentPoint = 0;
private static int currentCoin = 0;

    
    
    
* constant field (not private and private) : ALL_UPPER;
    
public const int DEFAULT_DAMAGE = 100;

    

* Static readonly field (not private and private) : UpperCameICase;
    
public static readonly float NumberDefault = 0.0f;

    
    
    
*Enum member : UpperCameICase;
    
public enum ETypeCharacter
{
    Paladin = 0,
    Magican = 1,
    Archer = 2,
    Thief = 3,
    DragonSlayer = 4
}


    
    
*Local function : UpperCameICase;
    
public void LocalMethod()
{
    void Execute()
    {
                    
    }
}
    
*All other enties : UpperCameICase

    
* Use explicit modifier not write method missing modifier
* Use if else statement have {}
* Remove unuse method empty
* Use if else with max 4 statement nested


*Commit syntax:
 "[emoji][space][name branch][space][mesage]"
 
 [emoji] : can be skip this.  ex: :tada: or :fire:
 [name branch] : branch write lowercase letters.  ex: [develop]
 [space] : one space
 [message] : always start with the verb in the present tense, concise. You can choose additional prefix if necessary
             ex: fix: missing object when attack 
             
  result => ":bug: [develop] fix: missing object when attack"         
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment