Пример #1
0
 private void btnGo_Click(object sender, EventArgs e)
 {
     if (RotationTimer.Enabled)
     {
         pictureBox1.Hide();
         RotationTimer.Stop();
         btnGo.Text = "Show";
     }
     else
     {
         RotationTimer.Start();
         pictureBox1.Show();
         btnGo.Text = "Hide";
     }
 }
Пример #2
0
        private void InitializeComponent()
        {
            Health        = GetComponent <Health>();
            mover         = GetComponent <RootMover>();
            destroyer     = GetComponent <RootDestroyer>();
            transformer   = transform.root;
            rotationTimer = GetComponent <RotationTimer>();

            var rootTransform = transform.root;

            hitSensor        = rootTransform.GetComponentInChildren <HitSensor>();
            pickableSensor   = rootTransform.GetComponentInChildren <PickableSensor>();
            hand             = handPrefab.GetComponent <Hand>();
            sight            = sightPrefab.GetComponent <Sight>();
            cameraController = GameObject.FindWithTag(Tags.MainCamera).GetComponent <CameraController>();

            originalMoveSpeed = mover.MoveSpeed;
        }