Example #1
0
 protected void btnGuardarPatologiaFamiliar_Click(object sender, EventArgs e)
 {
     if (Session["Paciente"] != null && txtPatologiasFamiliares.Text != "")
     {
         Paciente P = Session["Paciente"] as Paciente;
         APF      A = new APF(P.ID, txtPatologiasFamiliares.Text);
         A.Guardar();
         txtPatologiasFamiliares.Text = "";
     }
 }
Example #2
0
    private void OnEnable()
    {
        //register for direction/speed updates
        DroneDataWriter.TargetUpdated.Add(OnTargetUpdate);
        DroneDataWriter.DirectionUpdated.Add(OnDirectionUpdate);

        //get latest component values
        target    = DroneDataWriter.Data.target.ToVector3();
        speed     = DroneDataWriter.Data.speed;
        radius    = speed * SimulationSettings.DroneUpdateInterval;
        direction = DroneDataWriter.Data.direction.ToUnityVector();

        energyUsed = DroneDataWriter.Data.energyUsed;

        apf = gameObject.GetComponent <APF>();

        simulate = true;

        UnityEngine.Random.InitState((int)gameObject.EntityId().Id);
        InvokeRepeating("DroneTick", Random.Range(0, SimulationSettings.DroneUpdateInterval), SimulationSettings.DroneUpdateInterval);
        InvokeRepeating("MoveDrone", Random.Range(0, SimulationSettings.DroneMoveInterval), SimulationSettings.DroneMoveInterval);
    }