Advertisement
Bolito2

Armas

May 5th, 2015
238
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.78 KB | None | 0 0
  1. using UnityEngine;
  2. using System.Collections;
  3. using System.Collections.Generic;
  4.  
  5. public class Armas : MonoBehaviour {
  6.  
  7.     public Arma Trabuco, Pistola, Metralleta, Escopeta, Ametralladora, Bazooka, Lanzamisiles;
  8.  
  9.     public Dictionary<int, Arma> ListaArmas = new Dictionary<int, Arma> ();
  10.  
  11.     public Arma SeleccionarArma(int idarma){
  12.         Arma ArmaSeleccionada = ListaArmas[idarma];
  13.         return ArmaSeleccionada;
  14.     }
  15.  
  16.     void Start () {
  17.         ListaArmas.Add(1,Trabuco);
  18.         ListaArmas.Add(2, Pistola);
  19.         ListaArmas.Add(3, Metralleta);
  20.         ListaArmas.Add(4, Escopeta);
  21.         ListaArmas.Add(5, Ametralladora);
  22.         ListaArmas.Add(6, Bazooka);
  23.         ListaArmas.Add(7, Lanzamisiles);
  24.  
  25.     }
  26.    
  27.     // Update is called once per frame
  28.     void Update () {
  29.    
  30.     }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement