Exemple #1
0
 private void setReferences()
 {
     output       = this.GetComponent <ShowOutput> ();
     scroll       = this.GetComponent <TerminalScrollLogic> ();
     checkInput   = GameObject.FindGameObjectWithTag(Tags.terminal).GetComponent <CheckTerminalInput>();
     autocomplete = new AutoComplete();
 }
 protected virtual void Start()
 {
     output = FindObjectOfType <ShowOutput> ();
     users  = GameObject.FindGameObjectWithTag(Tags.gameController).GetComponent <CurrentUsers> ();
     if (loadTime == 0)
     {
         loadTime = 3;
     }
 }
Exemple #3
0
 /// <summary>
 /// 将操作信息显示在richtextbox控件上
 /// </summary>
 /// <param name="msg"></param>
 private void SetOutput(string msg)
 {
     if (this.rtbMsg.InvokeRequired == false)
     {
         rtbMsg.AppendText(msg);
         rtbMsg.AppendText(Environment.NewLine);
         this.statusBarLucene.Text = msg;
     }
     else
     {
         ShowOutput action = new ShowOutput(SetOutput);
         this.BeginInvoke(action, new object[] { msg });
     }
 }
Exemple #4
0
    private void Start()
    {
        wallPiece = Resources.Load <GameObject> (Paths.firewallPrefab);
        if (wallPiece == null)
        {
            throw new System.Exception("Failed to load wall resource!");
        }
        spriteRenderer = wallPiece.GetComponent <SpriteRenderer> ();
        pixelsPerUnit  = spriteRenderer.sprite.pixelsPerUnit;
        fireWidth      = spriteRenderer.sprite.texture.width;
        parent         = null;

        output    = FindObjectOfType <ShowOutput>();
        input     = GetComponent <FetchTerminalInput> ();
        wallTiles = new List <GameObject> ();
    }
Exemple #5
0
 private void Start()
 {
     commands = GetComponent <CommandHandler> ();
     output   = GameObject.FindGameObjectWithTag(Tags.gameController).GetComponent <ShowOutput> ();
     CreateCommands();
 }