void OnTriggerEnter(Collider collectableObject)
    {
        if (collectableObject.gameObject.CompareTag("pickUp"))
        {
            collectableObject.gameObject.SetActive(false);
            Vector3 scaleDecseaser = rb.transform.localScale;
            scaleDecseaser.x       += 0.1f;
            scaleDecseaser.y       += 0.1f;
            scaleDecseaser.z       += 0.1f;
            rb.transform.localScale = scaleDecseaser;
            changeHealth(20);
        }
        if (collectableObject.gameObject.CompareTag("gravityChanger"))
        {
            cc.timer         = 100;
            cc.gravityChange = true;

            playerControl1.frozenControl = true;

            DirectionValues dv = collectableObject.gameObject.GetComponent <DirectionValues> ();

            vectorGoUp      = dv.getFirstVectorChange(rb.transform.localScale.x, sky);
            vectorGoForward = dv.getSecondVectorChange(rb.transform.localScale.x, sky);


            rb.velocity        = Vector3.zero;
            rb.angularVelocity = Vector3.zero;



            GetComponent <ConstantForce> ().force = new Vector3(0, 0, 0);


            sky = dv.getNewSky(sky);

            tempSky           = dv.getCameraDir(sky);
            changingGravityUp = true;
        }
        if (collectableObject.gameObject.CompareTag("fireParticleShot"))
        {
            Debug.Log("Shot found");
            collectableObject.gameObject.SetActive(false);
            Vector3 scaleDecseaser = rb.transform.localScale;
            scaleDecseaser.x       -= 0.1f;
            scaleDecseaser.y       -= 0.1f;
            scaleDecseaser.z       -= 0.1f;
            rb.transform.localScale = scaleDecseaser;
            changeHealth(-20);
        }
    }
Beispiel #2
0
 /// <summary>
 ///     Constructor de la clase
 /// </summary>
 /// <param name="parameterName">Nombre del Parametro del SP</param>
 /// <param name="parameterValue">Valor a enviarse en el parametro</param>
 /// <param name="parameterDirection">Direccion puede ser Input, Output y InputOutput</param>
 public ParameterSp(string parameterName, object parameterValue, DirectionValues parameterDirection)
 {
     Name      = parameterName;
     Value     = parameterValue;
     Direction = parameterDirection;
 }
Beispiel #3
0
 /// <summary>
 ///     Metodo para agregar los parametros a enviar al Store Procedure
 /// </summary>
 public void AddParameter(string parameterName, object parameterValue, DirectionValues parameterDirection)
 {
     listParameters.Add(new ParameterSp(parameterName, parameterValue, parameterDirection));
 }