コード例 #1
0
 void Start()
 {
     Instance = this;
 }
コード例 #2
0
 void Awake()
 {
     instance = this;
 }
コード例 #3
0
 private void Awake()
 {
     instance = this;
 }
コード例 #4
0
ファイル: DV_Form.cs プロジェクト: ITI-9-Month-Progrm/CSharp
 private void saveBtn_Click(object sender, EventArgs e)
 {
     TitleManager.UpdateTitleById(titleID.Text, title.Text, type.Text);
     titleBS.EndEdit();
 }
コード例 #5
0
 void Start()
 {
     master = this;
     TitleManager manager = new TitleManager();
 }
コード例 #6
0
ファイル: DV_Form.cs プロジェクト: ITI-9-Month-Progrm/CSharp
 private void insertBtn_Click(object sender, EventArgs e)
 {
     TitleManager.InsertNewTitle(titleID.Text, title.Text, type.Text);
     titleBS.EndEdit();
 }
コード例 #7
0
ファイル: DV_Form.cs プロジェクト: ITI-9-Month-Progrm/CSharp
 private void deleteBtn_Click(object sender, EventArgs e)
 {
     TitleManager.DeleteTitleById(titleID.Text);
     titleBS.EndEdit();
 }
コード例 #8
0
 public override Nothing Visit(ISubtotalTitle sub)
 {
     m_Title = sub.Title;
     ShowSubtotal(sub, $"{sub.Title.AsTitle()} {TitleManager.GetTitleName(sub.Title)}");
     return(Nothing.AtAll);
 }
コード例 #9
0
    private void Update()
    {
        if (canInput == false) //prevents input into the gm until we want them
        {
            playerNum = 2;
        }
        else
        {
            playerNum = 0;
        }

        if (sm == null)
        {
            sm = GameObject.FindGameObjectWithTag("SoundMan").GetComponent <soundManager>();
        }

        //controls title scene stuff
        if (SceneManager.GetActiveScene() == SceneManager.GetSceneByBuildIndex(titleScene))
        {
            //on title screen, starting
            if (started == false)
            {
                started = true;
            }

            //checking to see if players are ready to continue to the game
            if (player.GetButtonDown("KickForward") || player.GetButtonDown("KickBackward"))
            {
                hReady = true;
                //SM.READYSOUND
                tM.hRInd(); //sets active ready marker
            }
            if (player.GetButtonDown("Honk"))
            {
                gReady = true;
                //SM.READYSOUND
                tM.gRInd(); //sets active ready marker
            }

            if (tM == null)
            {
                if (GameObject.FindGameObjectWithTag("TitleMan") != null)
                {
                    tM = GameObject.FindGameObjectWithTag("TitleMan").GetComponent <TitleManager>();
                }
            }

            //switches from controller to keyboard preferred input and back
            if (player.GetButtonDown("ConSwitch"))
            {
                if (useCon == false)
                {
                    useCon = true;
                    tM.CSwitch();
                }
                else if (useCon == true)
                {
                    useCon = false;
                    tM.CSwitch();
                }
            }

            //if players are ready, run coroutine to load game scene (loadGS)
            if (hReady && gReady == true)
            {
                if (switching == false)
                {
                    switching = true;
                    StartCoroutine(loadGS());
                }
            }
        }

        if (SceneManager.GetActiveScene() == SceneManager.GetSceneByBuildIndex(gameScene))
        {
            if (tXM == null)
            {
                if (GameObject.FindGameObjectWithTag("TextMan") != null)
                {
                    tXM = GameObject.FindGameObjectWithTag("TextMan").GetComponent <TextManager>();
                }
            }

            if (tXM.started == true)
            {
                canInput = true;
            }

            //if any button is pressed and canReset is equal to true, it resets the game
            if (player.GetAnyButton() && canReset)
            {
                canReset = false;
                canInput = false;
                end      = false;
                SceneManager.LoadScene(gameScene);
                //check who won
                StartCoroutine(hat());
            }
            if (Input.anyKey && canReset)
            {
                canReset = false;
                canInput = false;
                end      = false;
                SceneManager.LoadScene(gameScene);
                StartCoroutine(hat());
            }
        }

        if (player.GetButtonDown("Restart"))
        {
            end     = false;
            started = false;
            SceneManager.LoadScene(titleScene);
        }
    }
コード例 #10
0
ファイル: OpenDoor.cs プロジェクト: you-ri/fgj2016okayamavr1
    float z = 0f; //z軸の回転

    #endregion Fields

    #region Methods

    // Use this for initialization
    void Start()
    {
        title = FindObjectOfType<TitleManager> ();
    }
コード例 #11
0
ファイル: ContinueButton.cs プロジェクト: renios/Shelter
 void OnMouseDown()
 {
     TitleManager.GetTitleManagerInstance().ContinueGame();
 }
コード例 #12
0
        /// <summary>
        ///     将带记账凭证的细目转换为Csv表示
        /// </summary>
        /// <param name="details">细目</param>
        /// <param name="spec">列</param>
        /// <returns>Csv表示</returns>
        private string Present(IEnumerable <VoucherDetailR> details, IList <ColumnSpec> spec)
        {
            var sb = new StringBuilder();

            for (var i = 0; i < spec.Count; i++)
            {
                var s = spec[i];
                if (i > 0)
                {
                    sb.Append(m_Sep);
                }
                sb.Append(s);
            }

            sb.AppendLine();

            foreach (var d in details)
            {
                for (var i = 0; i < spec.Count; i++)
                {
                    if (i > 0)
                    {
                        sb.Append(m_Sep);
                    }

                    var s = spec[i];
                    switch (s)
                    {
                    case ColumnSpec.VoucherID:
                        sb.Append(d.Voucher.ID);
                        break;

                    case ColumnSpec.VoucherDate:
                        sb.Append(d.Voucher.Date.AsDate());
                        break;

                    case ColumnSpec.VoucherType:
                        sb.Append(d.Voucher.Type);
                        break;

                    case ColumnSpec.User:
                        sb.Append(d.User);
                        break;

                    case ColumnSpec.Currency:
                        sb.Append(d.Currency);
                        break;

                    case ColumnSpec.Title:
                        sb.Append(d.Title.AsTitle());
                        break;

                    case ColumnSpec.TitleComment:
                        sb.Append(TitleManager.GetTitleName(d.Title));
                        break;

                    case ColumnSpec.SubTitle:
                        sb.Append(d.SubTitle.AsSubTitle());
                        break;

                    case ColumnSpec.SubTitleComment:
                        sb.Append(TitleManager.GetTitleName(d.Title, d.SubTitle));
                        break;

                    case ColumnSpec.Content:
                        sb.Append(d.Content.Quotation('\''));
                        break;

                    case ColumnSpec.Remark:
                        sb.Append(d.Remark.Quotation('"'));
                        break;

                    case ColumnSpec.Fund:
                        sb.Append($"{d.Fund:R}");
                        break;

                    default:
                        throw new ArgumentOutOfRangeException();
                    }
                }

                sb.AppendLine();
            }

            return(sb.ToString());
        }