コード例 #1
0
 public static CGameMgr GetInstance()
 {
     if (m_instance == null)
     {
         m_instance = new CGameMgr();
     }
     return(m_instance);
 }
コード例 #2
0
ファイル: FPSLabel.cs プロジェクト: KiraMaple/SGNewGame
    // Use this for initialization
    void Start()
    {
        CInputMgr.GetInstance();

        int UIWidth, UIHeight;

        CGameMgr.GetInstance().GetUISize(out UIWidth, out UIHeight);
        int labelWidth, labelHeight;

        m_label     = transform.GetComponent <UILabel>();
        labelWidth  = Convert.ToInt32(m_label.localSize.x);
        labelHeight = Convert.ToInt32(m_label.localSize.y);
        this.transform.localPosition = new Vector3(-UIWidth * 0.5f + labelWidth * 0.5f + width, UIHeight * 0.5f - labelHeight * 0.5f - height, 0);
    }