コード例 #1
0
 public TexturedGun GetTexturedGun(TLMSType type)
 {
     if (type.Equals(TLMSType.MACHINEGUN))
     {
         return(CreateMachineGun());
     }
     else if (type.Equals(TLMSType.MAGMAGUN))
     {
         return(CreateMagmaGun());
     }
     else if (type.Equals(TLMSType.BERETTA92))
     {
         return(CreateBeretta92());
     }
     else
     {
         throw new ArgumentException();
     }
 }
コード例 #2
0
 /// <summary>
 /// this method is usefull to add a texture to our dictionary
 /// </summary>
 /// <param name="type"></param>
 /// <param name="path"></param>
 public void AddTexture(TLMSType type, string path) => TextureMap.Add(type, path);