// Use this for initialization
 void Start()
 {
     tb          = this;
     textMesh    = transform.Find("content").GetComponent <TextMesh>();
     warningMesh = transform.Find("warning").GetComponent <TextMesh>();
     sn          = startStepNumber;
     UpdateText();
 }
示例#2
0
 public void SetFire()
 {
     GetComponent <Fire>().SetFire();
     transform.Find("Flames").GetComponent <UCE_Heatable>().SetFire();
     onFire = true;
     TipBoard.Progress(0, 1);
     TipBoard.Progress(5, 1);
 }
示例#3
0
        public override void OnObjectSnappedToDropZone(SnapDropZoneEventArgs e)
        {
            base.OnObjectSnappedToDropZone(e);
            AirTransmit air = transform.parent.GetComponent <AirTransmit>();

            AirTransmit.Connect(air, e.snappedObject.GetComponent <AirTransmit>());
            TipBoard.Progress(0, 0);
            TipBoard.Progress(1, 5);
        }
        IEnumerator StayAWhile()
        {
            yield return(new WaitForSeconds(1.0f));

            if (isTouching && Time.time - lasttime > 0.999f && !hasTouched)
            {
                hasTouched = true;
                TipBoard.Progress(2, cnt++);
                Debug.Log("Heating Checkpoint cnt = " + cnt.ToString());
            }
        }
示例#5
0
 // ideal input: 0.3/s
 public void AddAir(float amount)
 {
     height -= amount * collectVelocity;
     if (height < 0f)
     {
         emitter.speed = 0.5f * collectVelocity;
         height        = 0f;
         isCollecting  = false;
         transform.Find("bottleWaterUp").gameObject.SetActive(false);
         TipBoard.Progress(4, 1);
     }
     transform.Find("bottleWaterUp").localScale = new Vector3(1f, height, 1f);
     TipBoard.Progress(4, 0);
 }
示例#6
0
        // ideal input: 0.3/s
        public void GenerateAir(float amount)
        {
            //Debug.Log("Generate from [" + name + "] to [" + end.gameObject.name + "] with " + amount.ToString());
            Bottle bottle = end.gameObject.GetComponent <Bottle>();

            if (bottle)
            {
                bottle.AddAir(amount);
                return;
            }
            PipeTrigger pipe = end.gameObject.GetComponent <PipeTrigger>();

            if (pipe && pipe.isGood)
            {
                // TODO: animation
                TipBoard.Progress(0, 2);
            }
        }
示例#7
0
 public override void StartUsing(VRTK_InteractUse usingObject = null)
 {
     base.StartUsing(usingObject);
     if (inPowder)
     {
         myPowder.SetActive(true);
         hasPowder = true;
         TipBoard.Progress(1, 2);
     }
     else if (inTube && hasPowder)
     {
         myPowder.SetActive(false);
         tubePowder.SetActive(true);
         faker.SetActive(false);
         hasPowder = false;
         TipBoard.Progress(1, 3);
     }
 }
 public override void OnObjectSnappedToDropZone(SnapDropZoneEventArgs e)
 {
     base.OnObjectSnappedToDropZone(e);
     TipBoard.Progress(4, 3);
 }
 public override void OnObjectSnappedToDropZone(SnapDropZoneEventArgs e)
 {
     TipBoard.Progress(1, 4);
 }
示例#10
0
 public override void StartTouching(VRTK_InteractTouch currentTouchingObject = null)
 {
     base.StartTouching(currentTouchingObject);
     TipBoard.Progress(1, 1);
 }