private void Start()
    {
        activeColor = list.ReturnActiveColor();

        rope.positionCount = 0;
        hookScale          = hook.transform.localScale;

        ChangeWeaponColor();
    }
示例#2
0
    void Start()
    {
        groundMask = LayerMask.GetMask("Floor");
        playerRB   = GetComponent <Rigidbody>();
        gunColor   = GetComponentInChildren <GunColor>();

        vertical   = Camera.main.transform.forward;
        vertical.y = 0.0f;
        vertical.Normalize();
        horizontal = Quaternion.Euler(new Vector3(0, 90, 0)) * vertical;

        playerMaterial = GetComponent <Renderer>().material;
    }
 // Update is called once per frame
 void Update()
 {
     if (!gameOver)
     {
         time      += Time.deltaTime;
         timer.text = "Tiempo " + time.ToString("f2");
     }
     if (activeColorGun != ggun.activeColor)
     {
         ChangeColor();
         activeColorGun = ggun.activeColor;
     }
 }
    public void InsertarUltimo(GunColor x)
    {
        Nodo nuevo = new Nodo();

        nuevo.color = x;
        if (raiz == null)
        {
            nuevo.sig = nuevo;
            nuevo.ant = nuevo;
            raiz      = nuevo;
        }
        else
        {
            Nodo ultimo = raiz.ant;
            nuevo.sig  = raiz;
            nuevo.ant  = ultimo;
            raiz.ant   = nuevo;
            ultimo.sig = nuevo;
        }
    }
    void ChangeWeaponColor()
    {
        switch (list.ReturnActiveColor())
        {
        case GunColor.Yellow:
            rope.material = colorYellow;
            break;

        case GunColor.Red:
            rope.material = colorRed;
            break;

        case GunColor.Blue:
            rope.material = colorBlue;
            break;

        default:
            rope.material = colorTest;
            break;
        }
        activeColor = list.ReturnActiveColor();
        list.DebugLogs();
    }
    Color AssignColor(GunColor color)
    {
        Color aux;

        switch (color)
        {
        case GunColor.Blue:
            aux = Color.blue;
            break;

        case GunColor.Red:
            aux = Color.red;
            break;

        case GunColor.Yellow:
            aux = Color.yellow;
            break;

        default:
            aux = Color.gray;
            break;
        }
        return(aux);
    }
示例#7
0
 void Start()
 {
     fireRate       = 0.65f;
     timer          = 0.65f;
     gunColorScript = GetComponent <GunColor>();
 }
 // Start is called before the first frame update
 void Start()
 {
     timer.text     = "Tiempo: " + time.ToString("f2");
     activeColorGun = ggun.activeColor;
     ChangeColor();
 }