Created
November 16, 2012 12:08
-
-
Save Eugeny/4086789 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using UnityEngine; | |
| using System.Collections; | |
| public class SlotMachineT_1 : MonoBehaviour | |
| { | |
| private bool looby=false; | |
| private bool r1=true,r2=true,r3=true,r4=true,r5=true; | |
| public AudioSource SoundSX; | |
| //public AudioClip Audio3; | |
| public static bool BUYmn=false; | |
| private bool sound=false; | |
| private int wv=0; | |
| public Texture2D[] PayTableWinLine=new Texture2D[9]; | |
| public GUIStyle PayTable; | |
| public GUIStyle PayTable3; | |
| private int LinieAfisare; | |
| private bool Tshowbool=false; | |
| public Texture2D[] Op; | |
| private bool op=false; | |
| private string PayTableText; | |
| private int BetK=0; | |
| private Texture2D TextPayT,botPaytable; | |
| public static bool Nuaibani=false; | |
| //flash | |
| private bool puff=false; | |
| private int nrflash=0; | |
| int t=0; | |
| public Texture2D[] Line=new Texture2D[10]; | |
| public Texture2D[] Cline=new Texture2D[10]; | |
| //sunt desenate liniile castigatoare | |
| private Texture2D[] Img=new Texture2D[5]; | |
| //pozitiile castigatoare | |
| int[] q=new int[5]; | |
| int temp=-1; | |
| private Vector2[] LineWin=new Vector2[9]; | |
| public Texture2D BkSlot,EXIT; | |
| public Texture2D BkCard; | |
| //start minigame | |
| public static double MiniGameTimer=-1; | |
| private bool minigamestart=false; | |
| //animatie maneta | |
| public static bool animatieM=false; | |
| private float p1x=99*Global.Size.x,p2x=255*Global.Size.x,p3x=411*Global.Size.x,p4x=567*Global.Size.x,p5x=723*Global.Size.x; | |
| private float p1y=-63*Global.Size.y,p2y=79*Global.Size.y,p3y=223*Global.Size.y,p4y=367*Global.Size.y; | |
| private float latimeCasuta=144*Global.Size.x,inaltimeCasuta=144*Global.Size.y; | |
| //cate linii se joaca | |
| public static int lineP=9; | |
| //viteza de miscare | |
| private int speedM=Mathf.CeilToInt(550*Global.Size.y); | |
| //texturi | |
| private Texture2D[] SimbolImg=new Texture2D[13]; | |
| // variabile | |
| private int var1=31; | |
| //ce simboluri sunt afisate+1 si random pentru fiecare coloana | |
| public int[,] b=new int[5,4]; | |
| public int[] r=new int[5]; | |
| public int X=0,Y=0; | |
| //RUN | |
| private bool SXrun=false; | |
| // Bet | |
| public static float Bet;//=Global.BetS[0]; | |
| //Betminigame | |
| public static float miniBet=10; | |
| //WinSpin | |
| public static float Win=0; | |
| //Win minigame | |
| public static float miniWin=0; | |
| //ratie de castig | |
| private float nr2=1,nr3=2,nr4=3,nr5=4; | |
| //runda minigame | |
| public int minigr=0; | |
| //ratie -castig-carti | |
| private float[] n=new float[5]; | |
| // Free Spin | |
| public static int Fspin=0; | |
| //Bonus Spin | |
| public static int Bspin=0; | |
| //run Minigame | |
| public static bool minigame=false; | |
| //card color | |
| private int ccolor=1;// 1 -red 2 -black | |
| //color selected | |
| private int scolor=0;// 0-neselectat 1 -red 2 -black | |
| // miscare imagini | |
| private float R1=0,R2=0,R3=0,R4=0,R5=0; | |
| //daca e initiat spin sau nu | |
| private int SSpin=0; | |
| // daca au fost calculate rezultatele | |
| private bool SDone=true; | |
| //timpul care la care a fost apasat butonul de spin | |
| private double SpinTime; | |
| //pachetele de carti | |
| public int[,] CText2D= new int[4,15]; | |
| public Texture2D cover; | |
| public Texture2D[] card=new Texture2D[5]; | |
| private int rc=-1; | |
| private double miniTimer=0; | |
| public static int manetaM=0; | |
| private Vector2 T1; | |
| private int AfisareWIn=0; | |
| private double TimeT1; | |
| private bool payTable=false; | |
| private int payTablePoz=1; | |
| public Rect SpinR,LineR,BetR,RedR,BlackR,PaytableR,LineMaxR,CashR; | |
| public static string StareCurenta="gata"; | |
| public double TimeWinLine=0,TimeWinLine2=0; | |
| public int FspinToken=0; | |
| private Texture2D Twin,Tlose,Twin2; | |
| public static bool ShowLVLTxt=false; | |
| public Texture2D LevelT,Ok; | |
| private bool freespinON=false; | |
| void Start () | |
| { | |
| #if UNITY_ANDROID | |
| #elif UNITY_IPHONE | |
| //StoreKitBinding.requestProductData("com.legendaryplay.slot"); | |
| #endif | |
| looby=false; | |
| SoundSX=gameObject.audio; | |
| SoundSX.clip=(AudioClip)Resources.Load("Sound/3"); | |
| if(Screen.width<=480) | |
| { | |
| PayTable.font=(Font)Resources.Load("BasicFont/F8"); | |
| PayTable3.font=(Font)Resources.Load("BasicFont/F12"); | |
| //Afisare.font=(Font)Resources.Load("BasicFont/F12"); | |
| //speedM=Mathf.CeilToInt(470*Global.Size.y); | |
| //print("F12"); | |
| } | |
| else | |
| { | |
| if(Screen.width<=800) | |
| { | |
| PayTable.font=(Font)Resources.Load("BasicFont/F12"); | |
| PayTable3.font=(Font)Resources.Load("BasicFont/F20"); | |
| //Afisare.font=(Font)Resources.Load("BasicFont/F20"); | |
| // speedM=500;//Mathf.CeilToInt(520*Global.Size.y); | |
| //print("F20"); | |
| } | |
| else | |
| { | |
| PayTable.font=(Font)Resources.Load("BasicFont/F16"); | |
| PayTable3.font=(Font)Resources.Load("BasicFont/F24"); | |
| //Afisare.font=(Font)Resources.Load("BasicFont/F24"); | |
| // speedM=560;//Mathf.CeilToInt(590*Global.Size.y); | |
| //print("F24"); | |
| } | |
| } | |
| #if UNITY_ANDROID | |
| speedM=Mathf.CeilToInt((500*Screen.height)/640);//500 | |
| #elif UNITY_IPHONE | |
| speedM=Mathf.CeilToInt((560*Screen.height)/640); | |
| //speedM=560; | |
| #endif | |
| // | |
| // Bul1=(Texture2D)Resources.Load("Buy/Bul1"); | |
| // Bul2=(Texture2D)Resources.Load("Buy/Bul2"); | |
| // buyBK=(Texture2D)Resources.Load("Buy/bk"); | |
| // BBUY=(Texture2D)Resources.Load("Buy/buy"); | |
| // BCANCEL=(Texture2D)Resources.Load("Buy/cancel"); | |
| // | |
| // if(Global.Size.y<0.6) | |
| // { | |
| // speedM=567; | |
| // } | |
| LineWin[0].x=LineWin[1].x=LineWin[2].x=LineWin[3].x=LineWin[4].x=LineWin[5].x=LineWin[6].x=LineWin[7].x=LineWin[8].x=0; | |
| Bet=Global.BetS[0]; | |
| PayTable.normal.textColor=Color.white; | |
| payTable=false; | |
| reset(); | |
| LinieAfisare=0; | |
| GameObject.Find("GlobalG(Clone)").GetComponent<Pozitii>().Marimi(); | |
| SpinR=GameObject.Find("GlobalG(Clone)").GetComponent<Pozitii>().Spin; | |
| LineR=GameObject.Find("GlobalG(Clone)").GetComponent<Pozitii>().Line; | |
| BetR=GameObject.Find("GlobalG(Clone)").GetComponent<Pozitii>().Bet; | |
| BlackR=GameObject.Find("GlobalG(Clone)").GetComponent<Pozitii>().Black; | |
| PaytableR=GameObject.Find("GlobalG(Clone)").GetComponent<Pozitii>().Paytable; | |
| LineMaxR=GameObject.Find("GlobalG(Clone)").GetComponent<Pozitii>().LineMax; | |
| RedR=GameObject.Find("GlobalG(Clone)").GetComponent<Pozitii>().Red; | |
| BlackR=GameObject.Find("GlobalG(Clone)").GetComponent<Pozitii>().Black; | |
| CashR=GameObject.Find("GlobalG(Clone)").GetComponent<Pozitii>().Cash; | |
| for(int i=0 ;i<5;i++) | |
| { | |
| b[i,3]=3; | |
| b[i,2]=2; | |
| b[i,1]=1; | |
| b[i,0]=0; | |
| } | |
| n[0]=0.1F; | |
| n[1]=0.2F; | |
| n[2]=0.3F; | |
| n[3]=0.4F; | |
| n[4]=0.5F; | |
| LoadRes(); | |
| StareCurenta="spin"; | |
| } | |
| Vector2 InV(int x,int y) | |
| { | |
| Vector2 T1; | |
| T1.x=x; | |
| T1.y=Screen.height-y; | |
| return T1; | |
| } | |
| void Update () | |
| { | |
| if(Global.r==0) | |
| { | |
| SoundSX.volume=0; | |
| } | |
| else | |
| { | |
| SoundSX.volume=1; | |
| } | |
| switch (StareCurenta) | |
| { | |
| case "spin": | |
| if(!r1) | |
| { | |
| r1=true;r2=true;r3=true;r4=true;r5=true; | |
| } | |
| if(!ShowLVLTxt) | |
| { | |
| if( Bspin >= 3) | |
| { | |
| if(TimeWinLine+1<Time.time) | |
| { | |
| miniBet=Bet*lineP; | |
| StareCurenta="minigame"; | |
| } | |
| } | |
| else | |
| { | |
| if(Global.FreeSpinGame[Global.tema-1]>=1 && TimeWinLine+1<Time.time) | |
| { | |
| Global.SoundStop(); | |
| Global.SpinNR++; | |
| Win=0; | |
| Global.FreeSpinGame[Global.tema-1]=Global.FreeSpinGame[Global.tema-1]-1; | |
| Global.NrLevel=Global.NrLevel+Bet*lineP; | |
| SpinTime=Time.time; | |
| RandRun(); | |
| StareCurenta="gamespin"; | |
| freespinON=true; | |
| // Global.Sound4(); | |
| } | |
| else | |
| { | |
| freespinON=false; | |
| } | |
| } | |
| } | |
| break; | |
| case "minigame": | |
| break; | |
| case "minigamestart": | |
| break; | |
| case "paytable": | |
| break; | |
| case "gamespin": | |
| LinieAfisare=0; | |
| Run(); | |
| break; | |
| case "option": | |
| break; | |
| default: | |
| break; | |
| } | |
| } | |
| void RandRun() | |
| { | |
| //scramble tokens | |
| RandVector1(); | |
| RandVector2(); | |
| RandVector3(); | |
| RandVector4(); | |
| RandVector5(); | |
| } | |
| void Run() | |
| { | |
| if(!Global.SoundS.isPlaying && !looby) | |
| { | |
| Global.Sound2(); | |
| } | |
| // spin the tokens | |
| if(SpinTime+3<Time.time) | |
| { | |
| if(r1) | |
| { | |
| SoundSX.Play(); | |
| r1=false; | |
| } | |
| // R1=0; | |
| Sstop1(); | |
| } | |
| else | |
| { | |
| Speed1(); | |
| } | |
| if(SpinTime+4<Time.time) | |
| { | |
| if(r2) | |
| { | |
| SoundSX.Play(); | |
| r2=false; | |
| } | |
| Sstop2(); | |
| //R2=0; | |
| } | |
| else | |
| { | |
| Speed2(); | |
| } | |
| if(SpinTime+5<Time.time) | |
| { | |
| if(r3) | |
| { | |
| SoundSX.Play(); | |
| r3=false; | |
| } | |
| Sstop3(); | |
| // R3=0; | |
| } | |
| else | |
| { | |
| Speed3(); | |
| } | |
| if(SpinTime+6<Time.time) | |
| { | |
| if(r4) | |
| { | |
| SoundSX.Play(); | |
| r4=false; | |
| } | |
| Sstop4(); | |
| // R4=0; | |
| } | |
| else | |
| { | |
| Speed4(); | |
| } | |
| if(SpinTime+7<Time.time) | |
| { | |
| if(r5) | |
| { | |
| SoundSX.Play(); | |
| r5=false; | |
| } | |
| Sstop5(); | |
| // R5=0; | |
| // WinSpin(); | |
| // FBSpins(); | |
| // TimeT1=Time.time; | |
| // TimeWinLine=Time.time; | |
| // StareCurenta="spin"; | |
| // Tshowbool=false; | |
| // for(int i=0;i<lineP;i++) | |
| // { | |
| // if(LineWin[i].x>=1) | |
| // { | |
| // Tshowbool=true; | |
| // LinieAfisare=i; | |
| // } | |
| // } | |
| // if(Tshowbool) | |
| // { | |
| // Global.Sound4(); | |
| // } | |
| // else | |
| // { | |
| // Global.SoundStop(); | |
| // } | |
| } | |
| else | |
| { | |
| Speed5(); | |
| } | |
| } | |
| void OnGUI() | |
| { | |
| if(!BUYmn) | |
| { | |
| GUI.depth=2; | |
| //Minigame / Game | |
| if(!StareCurenta.Equals("minigame")) | |
| { | |
| // cele 15 imagini | |
| GUI.DrawTexture(new Rect(0,0,Screen.width,Screen.height),BkSlot); | |
| //C1 | |
| GUI.DrawTexture(new Rect(p1x,p1y+R1*Global.Size.y,latimeCasuta,inaltimeCasuta),SimbolImg[Global.B1[b[0,3]]]); | |
| GUI.DrawTexture(new Rect(p1x,p2y+R1*Global.Size.y,latimeCasuta,inaltimeCasuta),SimbolImg[Global.B1[b[0,2]]]); | |
| GUI.DrawTexture(new Rect(p1x,p3y+R1*Global.Size.y,latimeCasuta,inaltimeCasuta),SimbolImg[Global.B1[b[0,1]]]); | |
| GUI.DrawTexture(new Rect(p1x,p4y+R1*Global.Size.y,latimeCasuta,inaltimeCasuta),SimbolImg[Global.B1[b[0,0]]]); | |
| //C2 | |
| GUI.DrawTexture(new Rect(p2x,p1y+R2*Global.Size.y,latimeCasuta,inaltimeCasuta),SimbolImg[Global.B2[b[1,3]]]); | |
| GUI.DrawTexture(new Rect(p2x,p2y+R2*Global.Size.y,latimeCasuta,inaltimeCasuta),SimbolImg[Global.B2[b[1,2]]]); | |
| GUI.DrawTexture(new Rect(p2x,p3y+R2*Global.Size.y,latimeCasuta,inaltimeCasuta),SimbolImg[Global.B2[b[1,1]]]); | |
| GUI.DrawTexture(new Rect(p2x,p4y+R2*Global.Size.y,latimeCasuta,inaltimeCasuta),SimbolImg[Global.B2[b[1,0]]]); | |
| //C3 | |
| GUI.DrawTexture(new Rect(p3x,p1y+R3*Global.Size.y,latimeCasuta,inaltimeCasuta),SimbolImg[Global.B3[b[2,3]]]); | |
| GUI.DrawTexture(new Rect(p3x,p2y+R3*Global.Size.y,latimeCasuta,inaltimeCasuta),SimbolImg[Global.B3[b[2,2]]]); | |
| GUI.DrawTexture(new Rect(p3x,p3y+R3*Global.Size.y,latimeCasuta,inaltimeCasuta),SimbolImg[Global.B3[b[2,1]]]); | |
| GUI.DrawTexture(new Rect(p3x,p4y+R3*Global.Size.y,latimeCasuta,inaltimeCasuta),SimbolImg[Global.B3[b[2,0]]]); | |
| //C4 | |
| GUI.DrawTexture(new Rect(p4x,p1y+R4*Global.Size.y,latimeCasuta,inaltimeCasuta),SimbolImg[Global.B4[b[3,3]]]); | |
| GUI.DrawTexture(new Rect(p4x,p2y+R4*Global.Size.y,latimeCasuta,inaltimeCasuta),SimbolImg[Global.B4[b[3,2]]]); | |
| GUI.DrawTexture(new Rect(p4x,p3y+R4*Global.Size.y,latimeCasuta,inaltimeCasuta),SimbolImg[Global.B4[b[3,1]]]); | |
| GUI.DrawTexture(new Rect(p4x,p4y+R4*Global.Size.y,latimeCasuta,inaltimeCasuta),SimbolImg[Global.B4[b[3,0]]]); | |
| //C5 | |
| GUI.DrawTexture(new Rect(p5x,p1y+R5*Global.Size.y,latimeCasuta,inaltimeCasuta),SimbolImg[Global.B5[b[4,3]]]); | |
| GUI.DrawTexture(new Rect(p5x,p2y+R5*Global.Size.y,latimeCasuta,inaltimeCasuta),SimbolImg[Global.B5[b[4,2]]]); | |
| GUI.DrawTexture(new Rect(p5x,p3y+R5*Global.Size.y,latimeCasuta,inaltimeCasuta),SimbolImg[Global.B5[b[4,1]]]); | |
| GUI.DrawTexture(new Rect(p5x,p4y+R5*Global.Size.y,latimeCasuta,inaltimeCasuta),SimbolImg[Global.B5[b[4,0]]]); | |
| // //fuck | |
| // if(GUI.Button(new Rect(380*Global.Size.x,145*Global.Size.y,100*Global.Size.x,100*Global.Size.y),"+ "+speedM)) | |
| // { | |
| // speedM=speedM+10; | |
| // | |
| // } | |
| // | |
| // if(GUI.Button(new Rect(594*Global.Size.x,145*Global.Size.y,100*Global.Size.x,100*Global.Size.y),"- "+speedM)) | |
| // { | |
| // speedM=speedM-10; | |
| // | |
| // } | |
| // //fuck | |
| //show winning line(s) | |
| if(!StareCurenta.Equals("gamespin")) | |
| { | |
| TShow(); | |
| } | |
| //show Level Up | |
| if(ShowLVLTxt && StareCurenta.Equals("spin")) | |
| { | |
| GUI.DrawTexture(new Rect(234*Global.Size.x,137*Global.Size.y,500*Global.Size.x,300*Global.Size.y),LevelT); | |
| GUI.Label(new Rect(270*Global.Size.x,221*Global.Size.y,400*Global.Size.x,100*Global.Size.y),Global.LevelText,PayTable3); | |
| if(GUI.Button(new Rect(389*Global.Size.x,334*Global.Size.y,200*Global.Size.x,65*Global.Size.y),"","")) | |
| { | |
| ShowLVLTxt=false; | |
| } | |
| } | |
| //button location 1.1 delay | |
| if(StareCurenta.Equals("spin") && TimeWinLine+1.1<Time.time && !ShowLVLTxt) | |
| { | |
| if(!op) | |
| { | |
| if(GUI.Button(SpinR,"","") ) | |
| { | |
| Global.Sound5(); | |
| if( Global.money - Bet*lineP >= 0 ) | |
| { | |
| Nuaibani=false; | |
| Global.SpinNR++; | |
| Win=0; | |
| SpinTime=Time.time; | |
| Global.money=Mathf.Ceil(Global.money-Bet*lineP); | |
| Global.NrLevel=Global.NrLevel+Bet*lineP; | |
| RandRun(); | |
| StareCurenta="gamespin"; | |
| //Global.Sound2(); | |
| } | |
| else | |
| { | |
| Nuaibani=true; | |
| } | |
| } | |
| if(GUI.Button(BetR,"","") ) | |
| { | |
| Global.Sound6(); | |
| if(BetK<3+Global.Level) | |
| { | |
| BetK++; | |
| } | |
| else | |
| { | |
| BetK=0; | |
| } | |
| Bet=Global.BetS[BetK]; | |
| } | |
| if(GUI.Button(LineR,"","") ) | |
| { | |
| Global.Sound6(); | |
| if(lineP == 9) | |
| { | |
| lineP=1; | |
| } | |
| else | |
| { | |
| lineP++; | |
| } | |
| } | |
| if(GUI.Button(LineMaxR,"","") ) | |
| { | |
| Global.Sound5(); | |
| lineP=9; | |
| if( Global.money - Bet*lineP >= 0 ) | |
| { | |
| Nuaibani=false; | |
| Global.SpinNR++; | |
| Win=0; | |
| SpinTime=Time.time; | |
| Global.money=Mathf.Ceil(Global.money-Bet*lineP); | |
| Global.NrLevel=Global.NrLevel+Bet*lineP; | |
| RandRun(); | |
| StareCurenta="gamespin"; | |
| //Global.Sound2(); | |
| } | |
| else | |
| { | |
| Nuaibani=true; | |
| } | |
| } | |
| if(GUI.Button(PaytableR,"","") ) | |
| { | |
| Global.Sound_Audio3(); | |
| StareCurenta="paytable"; | |
| } | |
| } | |
| } | |
| else | |
| { | |
| if(StareCurenta.Equals("paytable")) | |
| { | |
| ShowPayT(); | |
| if(!op) | |
| if(GUI.Button(PaytableR,"","") ) | |
| { | |
| Global.Sound_Audio3(); | |
| StareCurenta="spin"; | |
| } | |
| } | |
| } | |
| //return to menu | |
| if(GUI.Button(new Rect(785*Global.Size.x,5*Global.Size.y,100*Global.Size.x,85*Global.Size.y),"","") ) | |
| { | |
| looby=true; | |
| SoundSX.Stop(); | |
| Global.SoundStop(); | |
| if(StareCurenta.Equals("gamespin")) | |
| { | |
| if(freespinON) | |
| Global.FreeSpinGame[Global.tema-1]=Global.FreeSpinGame[Global.tema-1]+1; | |
| } | |
| PlayerPrefs.SetFloat("NrLevel",Global.NrLevel); | |
| PlayerPrefs.SetFloat("SpinNR",Global.SpinNR); | |
| PlayerPrefs.SetFloat("money",Global.money); | |
| Application.LoadLevel(0); | |
| } | |
| } | |
| else | |
| { | |
| //card MiniGame | |
| GUI.DrawTexture(new Rect(0,0,Screen.width,Screen.height),BkCard); | |
| GUI.DrawTexture(new Rect(100*Global.Size.x,103*Global.Size.y,260*Global.Size.x,390*Global.Size.y),cover); | |
| GUI.Label(new Rect(440*Global.Size.x,180*Global.Size.y,350*Global.Size.x,270*Global.Size.y),"Guess the color \n\n of the next card",PayTable3); | |
| if(card[0] != null ) | |
| GUI.DrawTexture(new Rect(445*Global.Size.x,103*Global.Size.y,260*Global.Size.x,390*Global.Size.y),card[0]); | |
| if(card[1] != null ) | |
| GUI.DrawTexture(new Rect(485*Global.Size.x,103*Global.Size.y,260*Global.Size.x,390*Global.Size.y),card[1]); | |
| if(card[2] != null ) | |
| GUI.DrawTexture(new Rect(525*Global.Size.x,103*Global.Size.y,260*Global.Size.x,390*Global.Size.y),card[2]); | |
| if(card[3] != null ) | |
| GUI.DrawTexture(new Rect(565*Global.Size.x,103*Global.Size.y,260*Global.Size.x,390*Global.Size.y),card[3]); | |
| if(card[4] != null ) | |
| GUI.DrawTexture(new Rect(605*Global.Size.x,103*Global.Size.y,260*Global.Size.x,390*Global.Size.y),card[4]); | |
| if(!op) | |
| { | |
| if(scolor==0) | |
| { | |
| if(GUI.Button(RedR,"","")) | |
| { | |
| scolor=1; | |
| Card(); | |
| } | |
| if(GUI.Button(BlackR,"","")) | |
| { | |
| scolor=2; | |
| Card(); | |
| } | |
| } | |
| else | |
| { | |
| //win / lose | |
| if(!rc.Equals(scolor)) | |
| { | |
| if(!sound) | |
| { | |
| Global.Sound_Audio5(); | |
| sound=!sound; | |
| } | |
| GUI.DrawTexture(new Rect(231*Global.Size.x,169*Global.Size.y,475*Global.Size.x,300*Global.Size.y),Tlose); | |
| if(GUI.Button(new Rect(370*Global.Size.x,299*Global.Size.y,200*Global.Size.x,91*Global.Size.y),"","")) | |
| { | |
| reset(); | |
| } | |
| } | |
| if(rc.Equals(scolor)) | |
| { | |
| if(!sound) | |
| { | |
| Global.Sound_Audio4(); | |
| sound=!sound; | |
| } | |
| if(minigr == 5) | |
| { | |
| GUI.DrawTexture(new Rect(231*Global.Size.x,169*Global.Size.y,475*Global.Size.x,300*Global.Size.y),Twin2); | |
| if(GUI.Button(new Rect(369*Global.Size.x,299*Global.Size.y,200*Global.Size.x,100*Global.Size.y),"","")) | |
| { | |
| Global.money=Global.money+Mathf.Ceil(miniWin); | |
| reset(); | |
| } | |
| } | |
| else | |
| { | |
| GUI.DrawTexture(new Rect(231*Global.Size.x,169*Global.Size.y,475*Global.Size.x,300*Global.Size.y),Twin); | |
| if(GUI.Button(new Rect(477*Global.Size.x,299*Global.Size.y,200*Global.Size.x,91*Global.Size.y),"","")) | |
| { | |
| scolor=0; | |
| } | |
| if(GUI.Button(new Rect(262*Global.Size.x,298*Global.Size.y,200*Global.Size.x,91*Global.Size.y),"","")) | |
| { | |
| Global.Sound_Audio6(); | |
| Global.money=Global.money+Mathf.Ceil(miniWin); | |
| reset(); | |
| } | |
| } | |
| } | |
| } | |
| } | |
| //Menu 785*Global.Size.x,5*Global.Size.y,100*Global.Size.x,55*Global.Size.y | |
| // if(GUI.Button(new Rect(895*Global.Size.x,1*Global.Size.y,65*Global.Size.x,55*Global.Size.y),"") ) | |
| if(GUI.Button(new Rect(785*Global.Size.x,5*Global.Size.y,100*Global.Size.x,85*Global.Size.y),"") ) | |
| { | |
| Global.SoundStop(); | |
| SoundSX.Stop(); | |
| looby=true; | |
| PlayerPrefs.SetFloat("NrLevel",Global.NrLevel); | |
| PlayerPrefs.SetFloat("SpinNR",Global.SpinNR); | |
| PlayerPrefs.SetFloat("money",Global.money); | |
| Application.LoadLevel(0); | |
| } | |
| } | |
| if(op) | |
| { | |
| GUI.DrawTexture(new Rect(0,0,Screen.width,Screen.height),Op[Global.r]); | |
| if(GUI.Button(new Rect(380*Global.Size.x,245*Global.Size.y,100*Global.Size.x,100*Global.Size.y),"","")) | |
| { | |
| Global.r=0; | |
| } | |
| if(GUI.Button(new Rect(594*Global.Size.x,245*Global.Size.y,100*Global.Size.x,100*Global.Size.y),"","")) | |
| { | |
| Global.r=1; | |
| } | |
| if(GUI.Button(new Rect(389*Global.Size.x,353*Global.Size.y,250*Global.Size.x,120*Global.Size.y),EXIT,"") ) | |
| { | |
| QUIT(); | |
| //Application.Quit(); | |
| } | |
| } | |
| if(GUI.Button(new Rect(895*Global.Size.x,1*Global.Size.y,65*Global.Size.x,55*Global.Size.y),"","")) | |
| { | |
| Global.Sound_Audio7(); | |
| op=!op; | |
| } | |
| if(GUI.Button(new Rect(70*Global.Size.x,0*Global.Size.y,160*Global.Size.x,60*Global.Size.y),"","") ) | |
| { | |
| Global.Sound_Audio0(); | |
| // print("ok"); | |
| // #if UNITY_ANDROID | |
| // | |
| // #elif UNITY_IPHONE | |
| // StoreKitBinding.purchaseProduct("com.newrosoft.SlotMachine.coin",1); | |
| // #endif | |
| // | |
| BUYmn=true; | |
| } | |
| } | |
| } | |
| void CardLogic() | |
| { | |
| if(minigr>=5) | |
| { | |
| Global.money=Global.money+Mathf.Ceil(miniWin); | |
| reset(); | |
| } | |
| if(rc.Equals(scolor) ) | |
| { | |
| Global.Sound_Audio4(); | |
| scolor=0; | |
| if(minigr == 0) | |
| { | |
| miniWin=miniBet; | |
| } | |
| miniWin=miniWin + miniWin*n[minigr]; | |
| if(minigr<4) | |
| { | |
| minigr++; | |
| } | |
| else | |
| { | |
| //print("++++"); | |
| Global.money=Global.money+Mathf.Ceil(miniWin); | |
| reset(); | |
| } | |
| miniTimer=0; | |
| } | |
| else | |
| { | |
| Global.Sound_Audio4(); | |
| if(minigr>=5) | |
| { | |
| Global.money=Global.money+Mathf.Ceil(miniWin); | |
| reset(); | |
| } | |
| else | |
| { | |
| reset(); | |
| } | |
| } | |
| } | |
| // resetarea variabilelor | |
| void reset() | |
| { | |
| sound=false; | |
| TimeWinLine=Time.time; | |
| scolor=0; | |
| Bspin=0; | |
| MiniGameTimer=-1; | |
| rc=-1; | |
| miniWin=0; | |
| minigr=0; | |
| miniBet=0; | |
| StareCurenta="spin"; | |
| miniTimer=0; | |
| card[0]=null; | |
| card[1]=null; | |
| card[2]=null; | |
| card[3]=null; | |
| card[4]=null; | |
| for (int i=0;i<4;i++) | |
| { | |
| for (int j=0;j<14;j++) | |
| { | |
| CText2D[i,j] = 0; | |
| } | |
| } | |
| } | |
| void Card() | |
| { //pare =rosie | |
| //impare =negre | |
| int P=-1,C=-1; | |
| //se alege o carte random ( TREBUIE MODIFICAT !!) | |
| //vector cu toate cartile sau tin minte ce carte a fost jucata | |
| //P0 =rosu | |
| //P1=rosu | |
| //P2=negru | |
| //P3=negru | |
| sound=false; | |
| P=Random.Range(0,4); | |
| C=Random.Range(2,15); | |
| while (CText2D[P,C] == 10) | |
| { | |
| P=Random.Range(0,4); | |
| C=Random.Range(2,15); | |
| } | |
| CText2D[P,C] = 10; | |
| if(P>1) | |
| {rc=2;} | |
| else | |
| {rc=1;} | |
| if(minigr<5) | |
| card[minigr]=(Texture2D)Resources.Load("Cards/D"+P+"/c"+C); | |
| if(rc==1) | |
| print("red"); | |
| else | |
| print("negru"); | |
| if(rc.Equals(scolor) ) | |
| { | |
| if(minigr == 0) | |
| { | |
| miniWin=miniBet; | |
| } | |
| miniWin=miniWin + Mathf.Ceil(miniWin*n[minigr]); | |
| if(minigr<5) | |
| { | |
| minigr++; | |
| } | |
| } | |
| } | |
| void WinSpin() | |
| { | |
| // Win for every line | |
| LineWin[0]=WinLine( Global.B1[b[0,1]], Global.B2[b[1,1]], Global.B3[b[2,1]], Global.B4[b[3,1]], Global.B5[b[4,1]]); | |
| LineWin[1]=WinLine( Global.B1[b[0,2]], Global.B2[b[1,2]], Global.B3[b[2,2]], Global.B4[b[3,2]], Global.B5[b[4,2]]); | |
| LineWin[2]=WinLine( Global.B1[b[0,0]], Global.B2[b[1,0]], Global.B3[b[2,0]], Global.B4[b[3,0]], Global.B5[b[4,0]]); | |
| LineWin[3]=WinLine( Global.B1[b[0,2]], Global.B2[b[1,1]], Global.B3[b[2,0]], Global.B4[b[3,1]], Global.B5[b[4,2]]); | |
| LineWin[4]=WinLine( Global.B1[b[0,0]], Global.B2[b[1,1]], Global.B3[b[2,2]], Global.B4[b[3,1]], Global.B5[b[4,0]]); | |
| LineWin[5]=WinLine( Global.B1[b[0,1]], Global.B2[b[1,0]], Global.B3[b[2,0]], Global.B4[b[3,0]], Global.B5[b[4,1]]); | |
| LineWin[6]=WinLine( Global.B1[b[0,1]], Global.B2[b[1,2]], Global.B3[b[2,2]], Global.B4[b[3,2]], Global.B5[b[4,1]]); | |
| LineWin[7]=WinLine( Global.B1[b[0,2]], Global.B2[b[1,1]], Global.B3[b[2,2]], Global.B4[b[3,1]], Global.B5[b[4,2]]); | |
| LineWin[8]=WinLine( Global.B1[b[0,0]], Global.B2[b[1,1]], Global.B3[b[2,0]], Global.B4[b[3,1]], Global.B5[b[4,0]]); | |
| Win=0; | |
| if(lineP >= 1) | |
| { | |
| Win = Win +WinWin(WinLine( Global.B1[b[0,1]], Global.B2[b[1,1]], Global.B3[b[2,1]], Global.B4[b[3,1]], Global.B5[b[4,1]])); | |
| } | |
| if(lineP >= 2) | |
| { | |
| Win = Win +WinWin(WinLine( Global.B1[b[0,2]], Global.B2[b[1,2]], Global.B3[b[2,2]], Global.B4[b[3,2]], Global.B5[b[4,2]])); | |
| } | |
| if( lineP >= 3 ) | |
| { | |
| Win = Win +WinWin(WinLine( Global.B1[b[0,0]], Global.B2[b[1,0]], Global.B3[b[2,0]], Global.B4[b[3,0]], Global.B5[b[4,0]])); | |
| } | |
| if(lineP >= 4) | |
| { | |
| Win = Win +WinWin(WinLine( Global.B1[b[0,2]], Global.B2[b[1,1]], Global.B3[b[2,0]], Global.B4[b[3,1]], Global.B5[b[4,2]])); | |
| } | |
| if(lineP >= 5) | |
| { | |
| Win = Win +WinWin(WinLine( Global.B1[b[0,0]], Global.B2[b[1,1]], Global.B3[b[2,2]], Global.B4[b[3,1]], Global.B5[b[4,0]])); | |
| } | |
| if(lineP >= 6) | |
| { | |
| Win = Win +WinWin(WinLine( Global.B1[b[0,1]], Global.B2[b[1,0]], Global.B3[b[2,0]], Global.B4[b[3,0]], Global.B5[b[4,1]])); | |
| } | |
| if(lineP >= 7) | |
| { | |
| Win = Win +WinWin(WinLine( Global.B1[b[0,1]], Global.B2[b[1,2]], Global.B3[b[2,2]], Global.B4[b[3,2]], Global.B5[b[4,1]])); | |
| } | |
| if(lineP >= 8) | |
| { | |
| Win = Win +WinWin(WinLine( Global.B1[b[0,2]], Global.B2[b[1,1]], Global.B3[b[2,2]], Global.B4[b[3,1]], Global.B5[b[4,2]])); | |
| } | |
| if(lineP == 9) | |
| { | |
| Win = Win +WinWin(WinLine( Global.B1[b[0,0]], Global.B2[b[1,1]], Global.B3[b[2,0]], Global.B4[b[3,1]], Global.B5[b[4,0]])); | |
| } | |
| Global.money=Mathf.Ceil(Global.money+Win); | |
| } | |
| void FBSpins() | |
| { | |
| //Search for free spins and Minigame tokens | |
| Bspin=0; | |
| for(int i=0;i<3;i++) | |
| { | |
| switch(Global.B1[b[0,i]]) | |
| { | |
| case 1: | |
| FspinToken++; | |
| break; | |
| case 2: | |
| Bspin++; | |
| break; | |
| } | |
| } | |
| for(int i=0;i<3;i++) | |
| { | |
| switch(Global.B2[b[1,i]]) | |
| { | |
| case 1: | |
| FspinToken++; | |
| break; | |
| case 2: | |
| Bspin++; | |
| break; | |
| } | |
| } | |
| for(int i=0;i<3;i++) | |
| { | |
| switch(Global.B3[b[2,i]]) | |
| { | |
| case 1: | |
| FspinToken++; | |
| break; | |
| case 2: | |
| Bspin++; | |
| break; | |
| } | |
| } | |
| for(int i=0;i<3;i++) | |
| { | |
| switch(Global.B4[b[3,i]]) | |
| { | |
| case 1: | |
| FspinToken++; | |
| break; | |
| case 2: | |
| Bspin++; | |
| break; | |
| } | |
| } | |
| for(int i=0;i<3;i++) | |
| { | |
| switch(Global.B5[b[4,i]]) | |
| { | |
| case 1: | |
| FspinToken++; | |
| break; | |
| case 2: | |
| Bspin++; | |
| break; | |
| } | |
| } | |
| if(FspinToken==Global.NRFspinToken[0]) | |
| { | |
| Global.FreeSpinGame[Global.tema-1]=Global.FreeSpinGame[Global.tema-1]+Global.NRFspin[0]; | |
| } | |
| else | |
| if(FspinToken==Global.NRFspinToken[1]) | |
| { | |
| Global.FreeSpinGame[Global.tema-1]=Global.FreeSpinGame[Global.tema-1]+Global.NRFspin[1]; | |
| } | |
| else | |
| if(FspinToken==Global.NRFspinToken[2]) | |
| { | |
| Global.FreeSpinGame[Global.tema-1]=Global.FreeSpinGame[Global.tema-1]+Global.NRFspin[2]; | |
| } | |
| FspinToken=0; | |
| } | |
| // spin and stop for each column | |
| void Speed1() | |
| { | |
| R1=(R1+(int)(Time.deltaTime*speedM)); | |
| if(inaltimeCasuta*4+R1*Global.Size.y>=inaltimeCasuta*5) | |
| { | |
| //R1=0; | |
| R1=inaltimeCasuta*4+R1*Global.Size.y-inaltimeCasuta*5; | |
| //print("_____"+R1); | |
| b[0,3]++; | |
| b[0,2]++; | |
| b[0,1]++; | |
| b[0,0]++; | |
| if(b[0,0]>Global.BxNR[0]-1) | |
| {b[0,0]=0;} | |
| if(b[0,1]>Global.BxNR[0]-1) | |
| {b[0,1]=0;} | |
| if(b[0,2]>Global.BxNR[0]-1) | |
| {b[0,2]=0;} | |
| if(b[0,3]>Global.BxNR[0]-1) | |
| {b[0,3]=0;} | |
| } | |
| } | |
| void Sstop1() | |
| { | |
| // R1=0; | |
| // r[0]=-1; | |
| if(R1!=0) | |
| { | |
| // R1=R1+10; | |
| R1=(R1+(int)(Time.deltaTime*speedM)); | |
| // print(R1.ToString()+" "+R1*Global.Size.y+" "+(int)(Time.deltaTime*speedM)); | |
| if(inaltimeCasuta*4+R1*Global.Size.y>=inaltimeCasuta*5) | |
| { | |
| R1=0; | |
| b[0,3]++; | |
| b[0,2]++; | |
| b[0,1]++; | |
| b[0,0]++; | |
| if(b[0,0]>Global.BxNR[0]-1) | |
| {b[0,0]=0;} | |
| if(b[0,1]>Global.BxNR[0]-1) | |
| {b[0,1]=0;} | |
| if(b[0,2]>Global.BxNR[0]-1) | |
| {b[0,2]=0;} | |
| if(b[0,3]>Global.BxNR[0]-1) | |
| {b[0,3]=0;} | |
| } | |
| } | |
| } | |
| void Speed2() | |
| { | |
| R2=(R2+(int)(Time.deltaTime*(speedM+Mathf.CeilToInt(10*Global.Size.y)))); | |
| if(inaltimeCasuta*4+R2*Global.Size.y>=inaltimeCasuta*5) | |
| { | |
| R2=inaltimeCasuta*4+R2*Global.Size.y-inaltimeCasuta*5; | |
| b[1,3]++; | |
| b[1,2]++; | |
| b[1,1]++; | |
| b[1,0]++; | |
| if(b[1,0]>Global.BxNR[1]-1) | |
| {b[1,0]=0;} | |
| if(b[1,1]>Global.BxNR[1]-1) | |
| {b[1,1]=0;} | |
| if(b[1,2]>Global.BxNR[1]-1) | |
| {b[1,2]=0;} | |
| if(b[1,3]>Global.BxNR[1]-1) | |
| {b[1,3]=0;} | |
| } | |
| } | |
| void Sstop2() | |
| { | |
| // R2=0; | |
| // r[1]=-1; | |
| if(R2!=0) | |
| { | |
| R2=(R2+(int)(Time.deltaTime*(speedM+Mathf.CeilToInt(10*Global.Size.y)))); | |
| if(inaltimeCasuta*4+R2*Global.Size.y>=inaltimeCasuta*5) | |
| { | |
| R2=0; | |
| b[1,3]++; | |
| b[1,2]++; | |
| b[1,1]++; | |
| b[1,0]++; | |
| if(b[1,0]>Global.BxNR[1]-1) | |
| {b[1,0]=0;} | |
| if(b[1,1]>Global.BxNR[1]-1) | |
| {b[1,1]=0;} | |
| if(b[1,2]>Global.BxNR[1]-1) | |
| {b[1,2]=0;} | |
| if(b[1,3]>Global.BxNR[1]-1) | |
| {b[1,3]=0;} | |
| }} | |
| } | |
| void Speed3() | |
| { | |
| R3=(R3+(int)(Time.deltaTime*(speedM+Mathf.CeilToInt(20*Global.Size.y)))); | |
| if(inaltimeCasuta*4+R3*Global.Size.y>=inaltimeCasuta*5) | |
| { | |
| R3=inaltimeCasuta*4+R3*Global.Size.y-inaltimeCasuta*5; | |
| b[2,3]++; | |
| b[2,2]++; | |
| b[2,1]++; | |
| b[2,0]++; | |
| if(b[2,0]>Global.BxNR[2]-1) | |
| {b[2,0]=0;} | |
| if(b[2,1]>Global.BxNR[2]-1) | |
| {b[2,1]=0;} | |
| if(b[2,2]>Global.BxNR[2]-1) | |
| {b[2,2]=0;} | |
| if(b[2,3]>Global.BxNR[2]-1) | |
| {b[2,3]=0;} | |
| } | |
| } | |
| void Sstop3() | |
| { | |
| // R3=0; | |
| if(R3!=0) | |
| { | |
| R3=(R3+(int)(Time.deltaTime*(speedM+Mathf.CeilToInt(20*Global.Size.y)))); | |
| if(inaltimeCasuta*4+R3*Global.Size.y>=inaltimeCasuta*5) | |
| { | |
| R3=0; | |
| b[2,3]++; | |
| b[2,2]++; | |
| b[2,1]++; | |
| b[2,0]++; | |
| if(b[2,0]>Global.BxNR[2]-1) | |
| {b[2,0]=0;} | |
| if(b[2,1]>Global.BxNR[2]-1) | |
| {b[2,1]=0;} | |
| if(b[2,2]>Global.BxNR[2]-1) | |
| {b[2,2]=0;} | |
| if(b[2,3]>Global.BxNR[2]-1) | |
| {b[2,3]=0;} | |
| } | |
| } | |
| } | |
| void Speed4() | |
| { | |
| R4=(R4+(int)(Time.deltaTime*(speedM+Mathf.CeilToInt(30*Global.Size.y)))); | |
| if(inaltimeCasuta*4+R4*Global.Size.y>=inaltimeCasuta*5) | |
| { | |
| R4=inaltimeCasuta*4+R4*Global.Size.y-inaltimeCasuta*5; | |
| b[3,3]++; | |
| b[3,2]++; | |
| b[3,1]++; | |
| b[3,0]++; | |
| if(b[3,0]>Global.BxNR[3]-1) | |
| {b[3,0]=0;} | |
| if(b[3,1]>Global.BxNR[3]-1) | |
| {b[3,1]=0;} | |
| if(b[3,2]>Global.BxNR[3]-1) | |
| {b[3,2]=0;} | |
| if(b[3,3]>Global.BxNR[3]-1) | |
| {b[3,3]=0;} | |
| } | |
| } | |
| void Sstop4() | |
| { | |
| //R4=0; | |
| if(R4!=0) | |
| { | |
| R4=(R4+(int)(Time.deltaTime*(speedM+Mathf.CeilToInt(30*Global.Size.y)))); | |
| if(inaltimeCasuta*4+R4*Global.Size.y>=inaltimeCasuta*5) | |
| { | |
| R4=0; | |
| b[3,3]++; | |
| b[3,2]++; | |
| b[3,1]++; | |
| b[3,0]++; | |
| if(b[3,0]>Global.BxNR[3]-1) | |
| {b[3,0]=0;} | |
| if(b[3,1]>Global.BxNR[3]-1) | |
| {b[3,1]=0;} | |
| if(b[3,2]>Global.BxNR[3]-1) | |
| {b[3,2]=0;} | |
| if(b[3,3]>Global.BxNR[3]-1) | |
| {b[3,3]=0;} | |
| } | |
| } | |
| } | |
| void Speed5() | |
| { | |
| R5=(R5+(int)(Time.deltaTime*(speedM+Mathf.CeilToInt(40*Global.Size.y)))); | |
| if(inaltimeCasuta*4+R5*Global.Size.y>=inaltimeCasuta*5) | |
| { | |
| R5=inaltimeCasuta*4+R5*Global.Size.y-inaltimeCasuta*5; | |
| b[4,3]++; | |
| b[4,2]++; | |
| b[4,1]++; | |
| b[4,0]++; | |
| if(b[4,0]>Global.BxNR[4]-1) | |
| {b[4,0]=0;} | |
| if(b[4,1]>Global.BxNR[4]-1) | |
| {b[4,1]=0;} | |
| if(b[4,2]>Global.BxNR[4]-1) | |
| {b[4,2]=0;} | |
| if(b[4,3]>Global.BxNR[4]-1) | |
| {b[4,3]=0;} | |
| } | |
| } | |
| void Sstop5() | |
| { | |
| if(R5!=0) | |
| { | |
| R5=(R5+(int)(Time.deltaTime*(speedM+Mathf.CeilToInt(40*Global.Size.y)))); | |
| if(inaltimeCasuta*4+R5*Global.Size.y>=inaltimeCasuta*5) | |
| { | |
| R5=0; | |
| b[4,3]++; | |
| b[4,2]++; | |
| b[4,1]++; | |
| b[4,0]++; | |
| if(b[4,0]>Global.BxNR[4]-1) | |
| {b[4,0]=0;} | |
| if(b[4,1]>Global.BxNR[4]-1) | |
| {b[4,1]=0;} | |
| if(b[4,2]>Global.BxNR[4]-1) | |
| {b[4,2]=0;} | |
| if(b[4,3]>Global.BxNR[4]-1) | |
| {b[4,3]=0;} | |
| } | |
| } | |
| else | |
| { | |
| //R5=0; | |
| WinSpin(); | |
| FBSpins(); | |
| TimeT1=Time.time; | |
| TimeWinLine=Time.time; | |
| StareCurenta="spin"; | |
| Tshowbool=false; | |
| for(int i=0;i<lineP;i++) | |
| { | |
| if(LineWin[i].x>=1) | |
| { | |
| Tshowbool=true; | |
| LinieAfisare=i; | |
| } | |
| } | |
| if(Tshowbool) | |
| { | |
| Global.Sound4(); | |
| } | |
| else | |
| { | |
| Global.SoundStop(); | |
| } | |
| } | |
| } | |
| Vector2 WinLine(int v1,int v2,int v3,int v4,int v5) | |
| { | |
| // number of tokens and the win | |
| q[0]=v1; | |
| q[1]=v2; | |
| q[2]=v3; | |
| q[3]=v4; | |
| q[4]=v5; | |
| temp=-1; | |
| for(int i=0;i<5;i++) | |
| { | |
| //cauta elemente cu care se poarte obtine combinatii castigatoare mai putin wildtoken | |
| if(temp < 0 && (q[i] != 1 && q[i] != 2 && q[i] != 3) ) | |
| { | |
| temp=q[i]; | |
| } | |
| } | |
| //nici un element castigator | |
| if (temp == -1) | |
| { | |
| if(q[0] == 3 ) | |
| { | |
| if (q[0]==q[1] && q[1] == q[2] && q[2] == q[3]&& q[3] == q[4] && q[1] != 1 && q[1] != 2) | |
| { | |
| return new Vector2(5,Global.Tok[q[0],3]); | |
| } | |
| if (q[0]==q[1] && q[1] == q[2] && q[2] == q[3] && q[1] != 1 && q[1] != 2) | |
| { | |
| return new Vector2(4,Global.Tok[q[0],2]); | |
| } | |
| if (q[0]==q[1] && q[1] == q[2] && q[1] != 1 && q[1] != 2) | |
| { | |
| return new Vector2(3,Global.Tok[q[0],1]); | |
| } | |
| if (q[0]==q[1] && q[1] != 1 && q[1] != 2) | |
| { | |
| return new Vector2(2,Global.Tok[q[0],0]); | |
| } | |
| return new Vector2(0,0); | |
| } | |
| else | |
| return new Vector2(0,0); | |
| } | |
| else | |
| { | |
| for(int i=0;i<5;i++) | |
| { | |
| if(q[i] == 3 ) | |
| { | |
| q[i]=temp; | |
| } | |
| } | |
| if (q[0]==q[1] && q[1] == q[2] && q[2] == q[3]&& q[3] == q[4] && q[1] != 1 && q[1] != 2) | |
| { | |
| if(Global.Tok[q[0],3]>0) | |
| return new Vector2(5,Global.Tok[q[0],3]); | |
| } | |
| if (q[0]==q[1] && q[1] == q[2] && q[2] == q[3] && q[1] != 1 && q[1] != 2) | |
| { | |
| if(Global.Tok[q[0],2]>0) | |
| return new Vector2(4,Global.Tok[q[0],2]); | |
| } | |
| if (q[0]==q[1] && q[1] == q[2] && q[1] != 1 && q[1] != 2) | |
| { | |
| if(Global.Tok[q[0],1]>0) | |
| return new Vector2(3,Global.Tok[q[0],1]); | |
| } | |
| if (q[0]==q[1] && q[1] != 1 && q[1] != 2) | |
| { | |
| if(Global.Tok[q[0],0]>0) | |
| return new Vector2(2,Global.Tok[q[0],0]); | |
| } | |
| return new Vector2(0,0); | |
| } | |
| } | |
| float WinWin(Vector2 castig) | |
| { | |
| return castig.y*Bet; | |
| } | |
| void LoadRes() | |
| { | |
| for(int i=1;i<13;i++) | |
| { | |
| SimbolImg[i]=(Texture2D)Resources.Load("T_"+Global.tema+"/Token/"+i); | |
| } | |
| BkSlot=(Texture2D)Resources.Load("Bk/BkSlot"); | |
| BkCard=(Texture2D)Resources.Load("Bk/BkCards"); | |
| for(int i=0;i<9;i++) | |
| { | |
| Line[i]=(Texture2D)Resources.Load("Line/"+(i+1)); | |
| PayTableWinLine[i]=(Texture2D)Resources.Load("PayTLine/"+(i+1)); | |
| Cline[i]=(Texture2D)Resources.Load("WinLineC/"+(i+1)); | |
| } | |
| cover=(Texture2D)Resources.Load("Cards/cover"); | |
| TextPayT=(Texture2D)Resources.Load("Bk/Paytable"); | |
| Twin=(Texture2D)Resources.Load("Cards/info/TWin"); | |
| Twin2=(Texture2D)Resources.Load("Cards/info/TWin2"); | |
| Tlose=(Texture2D)Resources.Load("Cards/info/TLose"); | |
| LevelT=(Texture2D)Resources.Load("Level/Level"); | |
| // botPaytable=(Texture2D)Resources.Load("Bara/TB/Paytable_bara"); | |
| // Ok= (Texture2D)Resources.Load("Level/Ok"); | |
| } | |
| void TShow2() | |
| { | |
| //show the winning lines | |
| if(TimeWinLine+1> Time.time) | |
| { | |
| t=lineP; | |
| if(Time.time % 0.3 <0.1) | |
| { | |
| for (int i=0;i<t;i++) | |
| { | |
| if(LineWin[i].x>=1) | |
| { | |
| GUI.DrawTexture(new Rect(0,0,Screen.width,Screen.height),Line[i]); | |
| switch(i) | |
| { | |
| case 0: | |
| if(LineWin[i].x>=1) | |
| { | |
| GUI.DrawTexture(new Rect(p1x,p3y+R1*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B1[b[0,1]]]); | |
| GUI.DrawTexture(new Rect(p1x,p3y+R1*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } | |
| //C2 | |
| if(LineWin[i].x>=2) | |
| { | |
| GUI.DrawTexture(new Rect(p2x,p3y+R2*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B2[b[1,1]]]); | |
| GUI.DrawTexture(new Rect(p2x,p3y+R2*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } | |
| //C3 | |
| if(LineWin[i].x>=3) | |
| { | |
| GUI.DrawTexture(new Rect(p3x,p3y+R3*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B3[b[2,1]]]); | |
| GUI.DrawTexture(new Rect(p3x,p3y+R3*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } | |
| //C4 | |
| if(LineWin[i].x>=4) | |
| { | |
| GUI.DrawTexture(new Rect(p4x,p3y+R4*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B4[b[3,1]]]); | |
| GUI.DrawTexture(new Rect(p4x,p3y+R4*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } | |
| //C5 | |
| if(LineWin[i].x>=5) | |
| { | |
| GUI.DrawTexture(new Rect(p5x,p3y+R5*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B5[b[4,1]]]); | |
| GUI.DrawTexture(new Rect(p5x,p3y+R5*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } | |
| break; | |
| case 1: | |
| if(LineWin[i].x>=1) | |
| { | |
| GUI.DrawTexture(new Rect(p1x,p2y+R1*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B1[b[0,2]]]); | |
| GUI.DrawTexture(new Rect(p1x,p2y+R1*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } | |
| //C2 | |
| if(LineWin[i].x>=2) | |
| { | |
| GUI.DrawTexture(new Rect(p2x,p2y+R2*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B2[b[1,2]]]); | |
| GUI.DrawTexture(new Rect(p2x,p2y+R2*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } //C3 | |
| if(LineWin[i].x>=3) | |
| { | |
| GUI.DrawTexture(new Rect(p3x,p2y+R3*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B3[b[2,2]]]); | |
| GUI.DrawTexture(new Rect(p3x,p2y+R3*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } //C4 | |
| if(LineWin[i].x>=4) | |
| { | |
| GUI.DrawTexture(new Rect(p4x,p2y+R4*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B4[b[3,2]]]); | |
| GUI.DrawTexture(new Rect(p4x,p2y+R4*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } | |
| //C5 | |
| if(LineWin[i].x>=5) | |
| { | |
| GUI.DrawTexture(new Rect(p5x,p2y+R5*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B5[b[4,2]]]); | |
| GUI.DrawTexture(new Rect(p5x,p2y+R5*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } | |
| break; | |
| case 2: | |
| if(LineWin[i].x>=1) | |
| { | |
| GUI.DrawTexture(new Rect(p1x,p4y+R1*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B1[b[0,0]]]); | |
| GUI.DrawTexture(new Rect(p1x,p4y+R1*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } //C2 | |
| if(LineWin[i].x>=2) | |
| { | |
| GUI.DrawTexture(new Rect(p2x,p4y+R2*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B2[b[1,0]]]); | |
| GUI.DrawTexture(new Rect(p2x,p4y+R2*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } | |
| //C3 | |
| if(LineWin[i].x>=3) | |
| { | |
| GUI.DrawTexture(new Rect(p3x,p4y+R3*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B3[b[2,0]]]); | |
| GUI.DrawTexture(new Rect(p3x,p4y+R3*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } | |
| //C4 | |
| if(LineWin[i].x>=4) | |
| { | |
| GUI.DrawTexture(new Rect(p4x,p4y+R4*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B4[b[3,0]]]); | |
| GUI.DrawTexture(new Rect(p4x,p4y+R4*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } | |
| //C5 | |
| if(LineWin[i].x>=5) | |
| { | |
| GUI.DrawTexture(new Rect(p5x,p4y+R5*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B5[b[4,0]]]); | |
| GUI.DrawTexture(new Rect(p5x,p4y+R5*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } | |
| break; | |
| case 3: | |
| if(LineWin[i].x>=1) | |
| { | |
| GUI.DrawTexture(new Rect(p1x,p2y+R1*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B1[b[0,2]]]); | |
| GUI.DrawTexture(new Rect(p1x,p2y+R1*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } //C2 | |
| if(LineWin[i].x>=2) | |
| { | |
| GUI.DrawTexture(new Rect(p2x,p3y+R2*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B2[b[1,1]]]); | |
| GUI.DrawTexture(new Rect(p2x,p3y+R2*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } | |
| //C3 | |
| if(LineWin[i].x>=3) | |
| { | |
| GUI.DrawTexture(new Rect(p3x,p4y+R3*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B3[b[2,0]]]); | |
| GUI.DrawTexture(new Rect(p3x,p4y+R3*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } | |
| //C4 | |
| if(LineWin[i].x>=4) | |
| { | |
| GUI.DrawTexture(new Rect(p4x,p3y+R4*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B4[b[3,1]]]); | |
| GUI.DrawTexture(new Rect(p4x,p3y+R4*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } | |
| //C5 | |
| if(LineWin[i].x>=5) | |
| { | |
| GUI.DrawTexture(new Rect(p5x,p2y+R5*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B5[b[4,2]]]); | |
| GUI.DrawTexture(new Rect(p5x,p2y+R5*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } | |
| break; | |
| case 4: | |
| if(LineWin[i].x>=1) | |
| { | |
| GUI.DrawTexture(new Rect(p1x,p4y+R1*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B1[b[0,0]]]); | |
| GUI.DrawTexture(new Rect(p1x,p4y+R1*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } //C2 | |
| if(LineWin[i].x>=2) | |
| { | |
| GUI.DrawTexture(new Rect(p2x,p3y+R2*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B2[b[1,1]]]); | |
| GUI.DrawTexture(new Rect(p2x,p3y+R2*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } //C3 | |
| if(LineWin[i].x>=3) | |
| { | |
| GUI.DrawTexture(new Rect(p3x,p2y+R3*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B3[b[2,2]]]); | |
| GUI.DrawTexture(new Rect(p3x,p2y+R3*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } //C4 | |
| if(LineWin[i].x>=4) | |
| { | |
| GUI.DrawTexture(new Rect(p4x,p3y+R4*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B4[b[3,1]]]); | |
| GUI.DrawTexture(new Rect(p4x,p3y+R4*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } //C5 | |
| if(LineWin[i].x>=5) | |
| { | |
| GUI.DrawTexture(new Rect(p5x,p4y+R5*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B5[b[4,0]]]); | |
| GUI.DrawTexture(new Rect(p5x,p4y+R5*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } | |
| break; | |
| case 5: | |
| if(LineWin[i].x>=1) | |
| { | |
| GUI.DrawTexture(new Rect(p1x,p3y+R1*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B1[b[0,1]]]); | |
| GUI.DrawTexture(new Rect(p1x,p3y+R1*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } //C2 | |
| if(LineWin[i].x>=2) | |
| { | |
| GUI.DrawTexture(new Rect(p2x,p4y+R2*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B2[b[1,0]]]); | |
| GUI.DrawTexture(new Rect(p2x,p4y+R2*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } //C3 | |
| if(LineWin[i].x>=3) | |
| { | |
| GUI.DrawTexture(new Rect(p3x,p4y+R3*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B3[b[2,0]]]); | |
| GUI.DrawTexture(new Rect(p3x,p4y+R3*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } //C4 | |
| if(LineWin[i].x>=4) | |
| { | |
| GUI.DrawTexture(new Rect(p4x,p4y+R4*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B4[b[3,0]]]); | |
| GUI.DrawTexture(new Rect(p4x,p4y+R4*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } //C5 | |
| if(LineWin[i].x>=5) | |
| { | |
| GUI.DrawTexture(new Rect(p5x,p3y+R5*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B5[b[4,1]]]); | |
| GUI.DrawTexture(new Rect(p5x,p3y+R5*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } | |
| break; | |
| case 6: | |
| if(LineWin[i].x>=1) | |
| { | |
| GUI.DrawTexture(new Rect(p1x,p3y+R1*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B1[b[0,1]]]); | |
| GUI.DrawTexture(new Rect(p1x,p3y+R1*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } //C2 | |
| if(LineWin[i].x>=2) | |
| { | |
| GUI.DrawTexture(new Rect(p2x,p2y+R2*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B2[b[1,2]]]); | |
| GUI.DrawTexture(new Rect(p2x,p2y+R2*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } //C3 | |
| if(LineWin[i].x>=3) | |
| { | |
| GUI.DrawTexture(new Rect(p3x,p2y+R3*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B3[b[2,2]]]); | |
| GUI.DrawTexture(new Rect(p3x,p2y+R3*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } //C4 | |
| if(LineWin[i].x>=4) | |
| { | |
| GUI.DrawTexture(new Rect(p4x,p2y+R4*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B4[b[3,2]]]); | |
| GUI.DrawTexture(new Rect(p4x,p2y+R4*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } //C5 | |
| if(LineWin[i].x>=5) | |
| { | |
| GUI.DrawTexture(new Rect(p5x,p3y+R5*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B5[b[4,1]]]); | |
| GUI.DrawTexture(new Rect(p5x,p3y+R5*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } | |
| break; | |
| case 7: | |
| if(LineWin[i].x>=1) | |
| { | |
| GUI.DrawTexture(new Rect(p1x,p2y+R1*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B1[b[0,2]]]); | |
| GUI.DrawTexture(new Rect(p1x,p2y+R1*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } //C2 | |
| if(LineWin[i].x>=2) | |
| { | |
| GUI.DrawTexture(new Rect(p2x,p3y+R2*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B2[b[1,1]]]); | |
| GUI.DrawTexture(new Rect(p2x,p3y+R2*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } //C3 | |
| if(LineWin[i].x>=3) | |
| { | |
| GUI.DrawTexture(new Rect(p3x,p2y+R3*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B3[b[2,2]]]); | |
| GUI.DrawTexture(new Rect(p3x,p2y+R3*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } //C4 | |
| if(LineWin[i].x>=4) | |
| { | |
| GUI.DrawTexture(new Rect(p4x,p3y+R4*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B4[b[3,1]]]); | |
| GUI.DrawTexture(new Rect(p4x,p3y+R4*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } //C5 | |
| if(LineWin[i].x>=5) | |
| { | |
| GUI.DrawTexture(new Rect(p5x,p2y+R5*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B5[b[4,2]]]); | |
| GUI.DrawTexture(new Rect(p5x,p2y+R5*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } | |
| break; | |
| case 8: | |
| if(LineWin[i].x>=1) | |
| { | |
| GUI.DrawTexture(new Rect(p1x,p4y+R1*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B1[b[0,0]]]); | |
| GUI.DrawTexture(new Rect(p1x,p4y+R1*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } //C2 | |
| if(LineWin[i].x>=2) | |
| { | |
| GUI.DrawTexture(new Rect(p2x,p3y+R2*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B2[b[1,1]]]); | |
| GUI.DrawTexture(new Rect(p2x,p3y+R2*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } //C3 | |
| if(LineWin[i].x>=3) | |
| { | |
| GUI.DrawTexture(new Rect(p3x,p4y+R3*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B3[b[2,0]]]); | |
| GUI.DrawTexture(new Rect(p3x,p4y+R3*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } //C4 | |
| if(LineWin[i].x>=4) | |
| { | |
| GUI.DrawTexture(new Rect(p4x,p3y+R4*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B4[b[3,1]]]); | |
| GUI.DrawTexture(new Rect(p4x,p3y+R4*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } //C5 | |
| if(LineWin[i].x>=5) | |
| { | |
| GUI.DrawTexture(new Rect(p5x,p4y+R5*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B5[b[4,0]]]); | |
| GUI.DrawTexture(new Rect(p5x,p4y+R5*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } | |
| break; | |
| } | |
| } | |
| } | |
| } | |
| } | |
| else | |
| { | |
| for (int i=0;i<t;i++) | |
| { | |
| if(LineWin[i].x>=1) | |
| { | |
| GUI.DrawTexture(new Rect(0,0,Screen.width,Screen.height),Line[i]); | |
| switch(i) | |
| { | |
| case 0: | |
| if(LineWin[i].x>=1) | |
| { | |
| GUI.DrawTexture(new Rect(p1x,p3y+R1*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B1[b[0,1]]]); | |
| GUI.DrawTexture(new Rect(p1x,p3y+R1*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } | |
| //C2 | |
| if(LineWin[i].x>=2) | |
| { | |
| GUI.DrawTexture(new Rect(p2x,p3y+R2*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B2[b[1,1]]]); | |
| GUI.DrawTexture(new Rect(p2x,p3y+R2*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } | |
| //C3 | |
| if(LineWin[i].x>=3) | |
| { | |
| GUI.DrawTexture(new Rect(p3x,p3y+R3*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B3[b[2,1]]]); | |
| GUI.DrawTexture(new Rect(p3x,p3y+R3*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } | |
| //C4 | |
| if(LineWin[i].x>=4) | |
| { | |
| GUI.DrawTexture(new Rect(p4x,p3y+R4*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B4[b[3,1]]]); | |
| GUI.DrawTexture(new Rect(p4x,p3y+R4*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } | |
| //C5 | |
| if(LineWin[i].x>=5) | |
| { | |
| GUI.DrawTexture(new Rect(p5x,p3y+R5*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B5[b[4,1]]]); | |
| GUI.DrawTexture(new Rect(p5x,p3y+R5*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } | |
| break; | |
| case 1: | |
| if(LineWin[i].x>=1) | |
| { | |
| GUI.DrawTexture(new Rect(p1x,p2y+R1*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B1[b[0,2]]]); | |
| GUI.DrawTexture(new Rect(p1x,p2y+R1*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } | |
| //C2 | |
| if(LineWin[i].x>=2) | |
| { | |
| GUI.DrawTexture(new Rect(p2x,p2y+R2*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B2[b[1,2]]]); | |
| GUI.DrawTexture(new Rect(p2x,p2y+R2*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } //C3 | |
| if(LineWin[i].x>=3) | |
| { | |
| GUI.DrawTexture(new Rect(p3x,p2y+R3*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B3[b[2,2]]]); | |
| GUI.DrawTexture(new Rect(p3x,p2y+R3*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } //C4 | |
| if(LineWin[i].x>=4) | |
| { | |
| GUI.DrawTexture(new Rect(p4x,p2y+R4*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B4[b[3,2]]]); | |
| GUI.DrawTexture(new Rect(p4x,p2y+R4*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } | |
| //C5 | |
| if(LineWin[i].x>=5) | |
| { | |
| GUI.DrawTexture(new Rect(p5x,p2y+R5*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B5[b[4,2]]]); | |
| GUI.DrawTexture(new Rect(p5x,p2y+R5*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } | |
| break; | |
| case 2: | |
| if(LineWin[i].x>=1) | |
| { | |
| GUI.DrawTexture(new Rect(p1x,p4y+R1*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B1[b[0,0]]]); | |
| GUI.DrawTexture(new Rect(p1x,p4y+R1*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } //C2 | |
| if(LineWin[i].x>=2) | |
| { | |
| GUI.DrawTexture(new Rect(p2x,p4y+R2*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B2[b[1,0]]]); | |
| GUI.DrawTexture(new Rect(p2x,p4y+R2*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } | |
| //C3 | |
| if(LineWin[i].x>=3) | |
| { | |
| GUI.DrawTexture(new Rect(p3x,p4y+R3*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B3[b[2,0]]]); | |
| GUI.DrawTexture(new Rect(p3x,p4y+R3*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } | |
| //C4 | |
| if(LineWin[i].x>=4) | |
| { | |
| GUI.DrawTexture(new Rect(p4x,p4y+R4*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B4[b[3,0]]]); | |
| GUI.DrawTexture(new Rect(p4x,p4y+R4*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } | |
| //C5 | |
| if(LineWin[i].x>=5) | |
| { | |
| GUI.DrawTexture(new Rect(p5x,p4y+R5*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B5[b[4,0]]]); | |
| GUI.DrawTexture(new Rect(p5x,p4y+R5*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } | |
| break; | |
| case 3: | |
| if(LineWin[i].x>=1) | |
| { | |
| GUI.DrawTexture(new Rect(p1x,p2y+R1*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B1[b[0,2]]]); | |
| GUI.DrawTexture(new Rect(p1x,p2y+R1*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } //C2 | |
| if(LineWin[i].x>=2) | |
| { | |
| GUI.DrawTexture(new Rect(p2x,p3y+R2*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B2[b[1,1]]]); | |
| GUI.DrawTexture(new Rect(p2x,p3y+R2*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } | |
| //C3 | |
| if(LineWin[i].x>=3) | |
| { | |
| GUI.DrawTexture(new Rect(p3x,p4y+R3*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B3[b[2,0]]]); | |
| GUI.DrawTexture(new Rect(p3x,p4y+R3*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } | |
| //C4 | |
| if(LineWin[i].x>=4) | |
| { | |
| GUI.DrawTexture(new Rect(p4x,p3y+R4*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B4[b[3,1]]]); | |
| GUI.DrawTexture(new Rect(p4x,p3y+R4*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } | |
| //C5 | |
| if(LineWin[i].x>=5) | |
| { | |
| GUI.DrawTexture(new Rect(p5x,p2y+R5*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B5[b[4,2]]]); | |
| GUI.DrawTexture(new Rect(p5x,p2y+R5*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } | |
| break; | |
| case 4: | |
| if(LineWin[i].x>=1) | |
| { | |
| GUI.DrawTexture(new Rect(p1x,p4y+R1*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B1[b[0,0]]]); | |
| GUI.DrawTexture(new Rect(p1x,p4y+R1*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } //C2 | |
| if(LineWin[i].x>=2) | |
| { | |
| GUI.DrawTexture(new Rect(p2x,p3y+R2*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B2[b[1,1]]]); | |
| GUI.DrawTexture(new Rect(p2x,p3y+R2*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } //C3 | |
| if(LineWin[i].x>=3) | |
| { | |
| GUI.DrawTexture(new Rect(p3x,p2y+R3*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B3[b[2,2]]]); | |
| GUI.DrawTexture(new Rect(p3x,p2y+R3*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } //C4 | |
| if(LineWin[i].x>=4) | |
| { | |
| GUI.DrawTexture(new Rect(p4x,p3y+R4*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B4[b[3,1]]]); | |
| GUI.DrawTexture(new Rect(p4x,p3y+R4*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } //C5 | |
| if(LineWin[i].x>=5) | |
| { | |
| GUI.DrawTexture(new Rect(p5x,p4y+R5*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B5[b[4,0]]]); | |
| GUI.DrawTexture(new Rect(p5x,p4y+R5*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } | |
| break; | |
| case 5: | |
| if(LineWin[i].x>=1) | |
| { | |
| GUI.DrawTexture(new Rect(p1x,p3y+R1*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B1[b[0,1]]]); | |
| GUI.DrawTexture(new Rect(p1x,p3y+R1*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } //C2 | |
| if(LineWin[i].x>=2) | |
| { | |
| GUI.DrawTexture(new Rect(p2x,p4y+R2*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B2[b[1,0]]]); | |
| GUI.DrawTexture(new Rect(p2x,p4y+R2*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } //C3 | |
| if(LineWin[i].x>=3) | |
| { | |
| GUI.DrawTexture(new Rect(p3x,p4y+R3*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B3[b[2,0]]]); | |
| GUI.DrawTexture(new Rect(p3x,p4y+R3*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } //C4 | |
| if(LineWin[i].x>=4) | |
| { | |
| GUI.DrawTexture(new Rect(p4x,p4y+R4*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B4[b[3,0]]]); | |
| GUI.DrawTexture(new Rect(p4x,p4y+R4*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } //C5 | |
| if(LineWin[i].x>=5) | |
| { | |
| GUI.DrawTexture(new Rect(p5x,p3y+R5*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B5[b[4,1]]]); | |
| GUI.DrawTexture(new Rect(p5x,p3y+R5*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } | |
| break; | |
| case 6: | |
| if(LineWin[i].x>=1) | |
| { | |
| GUI.DrawTexture(new Rect(p1x,p3y+R1*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B1[b[0,1]]]); | |
| GUI.DrawTexture(new Rect(p1x,p3y+R1*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } //C2 | |
| if(LineWin[i].x>=2) | |
| { | |
| GUI.DrawTexture(new Rect(p2x,p2y+R2*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B2[b[1,2]]]); | |
| GUI.DrawTexture(new Rect(p2x,p2y+R2*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } //C3 | |
| if(LineWin[i].x>=3) | |
| { | |
| GUI.DrawTexture(new Rect(p3x,p2y+R3*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B3[b[2,2]]]); | |
| GUI.DrawTexture(new Rect(p3x,p2y+R3*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } //C4 | |
| if(LineWin[i].x>=4) | |
| { | |
| GUI.DrawTexture(new Rect(p4x,p2y+R4*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B4[b[3,2]]]); | |
| GUI.DrawTexture(new Rect(p4x,p2y+R4*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } //C5 | |
| if(LineWin[i].x>=5) | |
| { | |
| GUI.DrawTexture(new Rect(p5x,p3y+R5*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B5[b[4,1]]]); | |
| GUI.DrawTexture(new Rect(p5x,p3y+R5*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } | |
| break; | |
| case 7: | |
| if(LineWin[i].x>=1) | |
| { | |
| GUI.DrawTexture(new Rect(p1x,p2y+R1*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B1[b[0,2]]]); | |
| GUI.DrawTexture(new Rect(p1x,p2y+R1*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } //C2 | |
| if(LineWin[i].x>=2) | |
| { | |
| GUI.DrawTexture(new Rect(p2x,p3y+R2*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B2[b[1,1]]]); | |
| GUI.DrawTexture(new Rect(p2x,p3y+R2*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } //C3 | |
| if(LineWin[i].x>=3) | |
| { | |
| GUI.DrawTexture(new Rect(p3x,p2y+R3*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B3[b[2,2]]]); | |
| GUI.DrawTexture(new Rect(p3x,p2y+R3*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } //C4 | |
| if(LineWin[i].x>=4) | |
| { | |
| GUI.DrawTexture(new Rect(p4x,p3y+R4*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B4[b[3,1]]]); | |
| GUI.DrawTexture(new Rect(p4x,p3y+R4*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } //C5 | |
| if(LineWin[i].x>=5) | |
| { | |
| GUI.DrawTexture(new Rect(p5x,p2y+R5*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B5[b[4,2]]]); | |
| GUI.DrawTexture(new Rect(p5x,p2y+R5*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } | |
| break; | |
| case 8: | |
| if(LineWin[i].x>=1) | |
| { | |
| GUI.DrawTexture(new Rect(p1x,p4y+R1*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B1[b[0,0]]]); | |
| GUI.DrawTexture(new Rect(p1x,p4y+R1*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } //C2 | |
| if(LineWin[i].x>=2) | |
| { | |
| GUI.DrawTexture(new Rect(p2x,p3y+R2*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B2[b[1,1]]]); | |
| GUI.DrawTexture(new Rect(p2x,p3y+R2*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } //C3 | |
| if(LineWin[i].x>=3) | |
| { | |
| GUI.DrawTexture(new Rect(p3x,p4y+R3*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B3[b[2,0]]]); | |
| GUI.DrawTexture(new Rect(p3x,p4y+R3*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } //C4 | |
| if(LineWin[i].x>=4) | |
| { | |
| GUI.DrawTexture(new Rect(p4x,p3y+R4*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B4[b[3,1]]]); | |
| GUI.DrawTexture(new Rect(p4x,p3y+R4*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } //C5 | |
| if(LineWin[i].x>=5) | |
| { | |
| GUI.DrawTexture(new Rect(p5x,p4y+R5*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B5[b[4,0]]]); | |
| GUI.DrawTexture(new Rect(p5x,p4y+R5*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[i]); | |
| } | |
| break; | |
| } | |
| } | |
| } | |
| } | |
| } | |
| void RandVector1() | |
| { | |
| int tempint,r; | |
| for(int t=0;t<Global.BxNR[0];t++) | |
| { | |
| if(b[0,0] != t && b[0,1] != t && b[0,2] != t ) | |
| { | |
| tempint=Global.B1[t]; | |
| r=Random.Range(t,Global.BxNR[0]); | |
| while(b[0,0] == r || b[0,1] == r || b[0,2] == r) | |
| { | |
| r=Random.Range(0,Global.BxNR[0]); | |
| } | |
| Global.B1[t]=Global.B1[r]; | |
| Global.B1[r]=tempint; | |
| } | |
| } | |
| } | |
| void RandVector2() | |
| { | |
| int tempint,r; | |
| for(int t=0;t<Global.BxNR[1];t++) | |
| { | |
| if(b[1,0] != t && b[1,1] != t && b[1,2] != t ) | |
| { | |
| tempint=Global.B2[t]; | |
| r=Random.Range(t,Global.BxNR[1]); | |
| while(b[1,0] == r || b[1,1] == r || b[1,2] == r) | |
| { | |
| r=Random.Range(0,Global.BxNR[1]); | |
| } | |
| Global.B2[t]=Global.B2[r]; | |
| Global.B2[r]=tempint; | |
| } | |
| } | |
| } | |
| void RandVector3() | |
| { | |
| int tempint,r; | |
| for(int t=0;t<Global.BxNR[2];t++) | |
| { | |
| if(b[2,0] != t && b[2,1] != t && b[2,2] != t ) | |
| { | |
| tempint=Global.B3[t]; | |
| r=Random.Range(t,Global.BxNR[2]); | |
| while(b[2,0] == r || b[2,1] == r || b[2,2] == r) | |
| { | |
| r=Random.Range(0,Global.BxNR[2]); | |
| } | |
| Global.B3[t]=Global.B3[r]; | |
| Global.B3[r]=tempint; | |
| } | |
| } | |
| } | |
| void RandVector4() | |
| { | |
| int tempint,r; | |
| for(int t=0;t<Global.BxNR[3];t++) | |
| { | |
| if(b[3,0] != t && b[3,1] != t && b[3,2] != t ) | |
| { | |
| tempint=Global.B4[t]; | |
| r=Random.Range(t,Global.BxNR[3]); | |
| while(b[3,0] == r || b[3,1] == r || b[3,2] == r) | |
| { | |
| r=Random.Range(0,Global.BxNR[3]); | |
| } | |
| Global.B4[t]=Global.B4[r]; | |
| Global.B4[r]=tempint; | |
| } | |
| } | |
| } | |
| void RandVector5() | |
| { | |
| int tempint,r; | |
| for(int t=0;t<Global.BxNR[4];t++) | |
| { | |
| if(b[4,0] != t && b[4,1] != t && b[4,2] != t ) | |
| { | |
| tempint=Global.B5[t]; | |
| r=Random.Range(t,Global.BxNR[4]); | |
| while(b[4,0] == r || b[4,1] == r || b[4,2] == r) | |
| { | |
| r=Random.Range(0,Global.BxNR[4]); | |
| } | |
| Global.B5[t]=Global.B5[r]; | |
| Global.B5[r]=tempint; | |
| } | |
| } | |
| } | |
| void ShowPayT() | |
| { | |
| //winning line | |
| GUI.DrawTexture(new Rect(0,0,Screen.width,Screen.height),TextPayT); | |
| if(payTablePoz==1) | |
| { | |
| GUI.DrawTexture(new Rect(100*Global.Size.x,100*Global.Size.y,75*Global.Size.x,75*Global.Size.y),SimbolImg[4]); | |
| PayTableText="\n"; | |
| for(int p=3;p>=0;p--) | |
| { | |
| if(Global.Tok[4,p]>0) | |
| { | |
| PayTableText=PayTableText+(p+2)+" - "+Global.Tok[4,p]+"\n"; | |
| } | |
| } | |
| GUI.Label(new Rect(175*Global.Size.x,100*Global.Size.y,50*Global.Size.x,75*Global.Size.y),PayTableText,PayTable); | |
| GUI.DrawTexture(new Rect(100*Global.Size.x,180*Global.Size.y,75*Global.Size.x,75*Global.Size.y),SimbolImg[5]); | |
| PayTableText="\n"; | |
| for(int p=3;p>=0;p--) | |
| { | |
| if(Global.Tok[5,p]>0) | |
| { | |
| PayTableText=PayTableText+(p+2)+" - "+Global.Tok[5,p]+"\n"; | |
| } | |
| } | |
| GUI.Label(new Rect(175*Global.Size.x,180*Global.Size.y,50*Global.Size.x,75*Global.Size.y),PayTableText,PayTable); | |
| GUI.DrawTexture(new Rect(100*Global.Size.x,260*Global.Size.y,75*Global.Size.x,75*Global.Size.y),SimbolImg[6]); | |
| PayTableText="\n"; | |
| for(int p=3;p>=0;p--) | |
| { | |
| if(Global.Tok[6,p]>0) | |
| { | |
| PayTableText=PayTableText+(p+2)+" - "+Global.Tok[6,p]+"\n"; | |
| } | |
| } | |
| GUI.Label(new Rect(175*Global.Size.x,260*Global.Size.y,50*Global.Size.x,75*Global.Size.y),PayTableText,PayTable); | |
| GUI.DrawTexture(new Rect(100*Global.Size.x,340*Global.Size.y,75*Global.Size.x,75*Global.Size.y),SimbolImg[7]); | |
| PayTableText="\n"; | |
| for(int p=3;p>=0;p--) | |
| { | |
| if(Global.Tok[7,p]>0) | |
| { | |
| PayTableText=PayTableText+(p+2)+" - "+Global.Tok[7,p]+"\n"; | |
| } | |
| } | |
| GUI.Label(new Rect(175*Global.Size.x,340*Global.Size.y,50*Global.Size.x,75*Global.Size.y),PayTableText,PayTable); | |
| GUI.DrawTexture(new Rect(100*Global.Size.x,420*Global.Size.y,75*Global.Size.x,75*Global.Size.y),SimbolImg[8]); | |
| PayTableText="\n"; | |
| for(int p=3;p>=0;p--) | |
| { | |
| if(Global.Tok[8,p]>0) | |
| { | |
| PayTableText=PayTableText+(p+2)+" - "+Global.Tok[8,p]+"\n"; | |
| } | |
| } | |
| GUI.Label(new Rect(175*Global.Size.x,420*Global.Size.y,50*Global.Size.x,75*Global.Size.y),PayTableText,PayTable); | |
| //linie 2 | |
| GUI.DrawTexture(new Rect(250*Global.Size.x,100*Global.Size.y,75*Global.Size.x,75*Global.Size.y),SimbolImg[9]); | |
| PayTableText="\n"; | |
| for(int p=3;p>=0;p--) | |
| { | |
| if(Global.Tok[9,p]>0) | |
| { | |
| PayTableText=PayTableText+(p+2)+" - "+Global.Tok[9,p]+"\n"; | |
| } | |
| } | |
| GUI.Label(new Rect(325*Global.Size.x,100*Global.Size.y,50*Global.Size.x,75*Global.Size.y),PayTableText,PayTable); | |
| GUI.DrawTexture(new Rect(250*Global.Size.x,180*Global.Size.y,75*Global.Size.x,75*Global.Size.y),SimbolImg[10]); | |
| PayTableText="\n"; | |
| for(int p=3;p>=0;p--) | |
| { | |
| if(Global.Tok[10,p]>0) | |
| { | |
| PayTableText=PayTableText+(p+2)+" - "+Global.Tok[10,p]+"\n"; | |
| } | |
| } | |
| GUI.Label(new Rect(325*Global.Size.x,180*Global.Size.y,50*Global.Size.x,75*Global.Size.y),PayTableText,PayTable); | |
| GUI.DrawTexture(new Rect(250*Global.Size.x,260*Global.Size.y,75*Global.Size.x,75*Global.Size.y),SimbolImg[11]); | |
| PayTableText="\n"; | |
| for(int p=3;p>=0;p--) | |
| { | |
| if(Global.Tok[11,p]>0) | |
| { | |
| PayTableText=PayTableText+(p+2)+" - "+Global.Tok[11,p]+"\n"; | |
| } | |
| } | |
| GUI.Label(new Rect(325*Global.Size.x,260*Global.Size.y,50*Global.Size.x,75*Global.Size.y),PayTableText,PayTable); | |
| GUI.DrawTexture(new Rect(250*Global.Size.x,340*Global.Size.y,75*Global.Size.x,75*Global.Size.y),SimbolImg[12]); | |
| PayTableText="\n"; | |
| for(int p=3;p>=0;p--) | |
| { | |
| if(Global.Tok[12,p]>0) | |
| { | |
| PayTableText=PayTableText+(p+2)+" - "+Global.Tok[12,p]+"\n"; | |
| } | |
| } | |
| GUI.Label(new Rect(325*Global.Size.x,340*Global.Size.y,50*Global.Size.x,75*Global.Size.y),PayTableText,PayTable); | |
| //GUI.DrawTexture(new Rect(250*Global.Size.x,420*Global.Size.y,75*Global.Size.x,75*Global.Size.y),SimbolImg[1]); | |
| PayTableText="\n"; | |
| for(int p=2;p>=0;p--) | |
| { | |
| PayTableText=PayTableText+Global.NRFspinToken[p]+" Tokens - "+Global.NRFspin[p]+" Free Spins \n"; | |
| } | |
| //GUI.Label(new Rect(325*Global.Size.x,420*Global.Size.y,150*Global.Size.x,75*Global.Size.y),PayTableText,PayTable); | |
| GUI.DrawTexture(new Rect(450*Global.Size.x,100*Global.Size.y,75*Global.Size.x,75*Global.Size.y),SimbolImg[1]); | |
| //GUI.Label(new Rect(550*Global.Size.x,100*Global.Size.y,250*Global.Size.x,75*Global.Size.y),"When you get 10 Free Spins\n Tokens you get a free\n spin (no charge)",PayTable); | |
| GUI.Label(new Rect(550*Global.Size.x,100*Global.Size.y,250*Global.Size.x,75*Global.Size.y),PayTableText,PayTable); | |
| GUI.DrawTexture(new Rect(450*Global.Size.x,180*Global.Size.y,75*Global.Size.x,75*Global.Size.y),SimbolImg[2]); | |
| GUI.Label(new Rect(550*Global.Size.x,180*Global.Size.y,250*Global.Size.x,75*Global.Size.y),"3 or more MiniGame Tokens \n anywhere will activate \n the MiniGame",PayTable); | |
| GUI.DrawTexture(new Rect(450*Global.Size.x,260*Global.Size.y,75*Global.Size.x,75*Global.Size.y),SimbolImg[3]); | |
| GUI.Label(new Rect(550*Global.Size.x,260*Global.Size.y,250*Global.Size.x,75*Global.Size.y),"Wild token substitutes any \n othe symbol except FreeSpin \n and MiniGame",PayTable); | |
| wv=0; | |
| GUI.Label(new Rect(440*Global.Size.x,325*Global.Size.y,125*Global.Size.x,75*Global.Size.y),"Win Lines",PayTable); | |
| for(int w=0;w<3;w++) | |
| { | |
| for(int v=0;v<3;v++) | |
| { | |
| GUI.DrawTexture(new Rect((465+150*w)*Global.Size.x,(370+45*v)*Global.Size.y,100*Global.Size.x,40*Global.Size.y),PayTableWinLine[wv]); | |
| GUI.Label(new Rect((440+150*w)*Global.Size.x,(380+45*v)*Global.Size.y,25*Global.Size.x,25*Global.Size.y),(wv+1)+"",PayTable); | |
| wv++; | |
| } | |
| } | |
| } | |
| } | |
| void TShow() | |
| { | |
| //print(Tshowbool+" "+LinieAfisare); | |
| if(TimeWinLine+0.5> Time.time) | |
| { | |
| t=lineP; | |
| if(Time.time % 0.3 <0.1) | |
| { | |
| for (int i=0;i<t;i++) | |
| { | |
| if(LineWin[i].x>=1) | |
| { | |
| GUI.DrawTexture(new Rect(0,0,Screen.width,Screen.height),Line[i]); | |
| } | |
| } | |
| } | |
| TimeWinLine2=Time.time; | |
| } | |
| else | |
| { | |
| if(Tshowbool) | |
| { | |
| if(TimeWinLine2+0.3< Time.time) | |
| { | |
| //print("Bla blabla"); | |
| // LinieAfisare+=1; | |
| // | |
| // | |
| // if(LinieAfisare>8) | |
| // { | |
| // LinieAfisare=0; | |
| // | |
| // } | |
| // TimeWinLine2=Time.time+0.5; | |
| // | |
| // print("Bla blabla"+LinieAfisare); | |
| do | |
| { | |
| // if(LineWin[LinieAfisare+1].x>=1) | |
| // { | |
| // LinieAfisare+=1; | |
| // if(LinieAfisare>8) | |
| // { | |
| // LinieAfisare=0; | |
| // | |
| // } | |
| // } | |
| LinieAfisare+=1; | |
| if(LinieAfisare>8) | |
| LinieAfisare=0; | |
| } while ( LineWin[LinieAfisare].x <1); | |
| TimeWinLine2=Time.time+0.3; | |
| } | |
| //print(""+LinieAfisare); | |
| GUI.DrawTexture(new Rect(0,0,Screen.width,Screen.height),Line[LinieAfisare]); | |
| switch(LinieAfisare) | |
| { | |
| case 0: | |
| if(LineWin[LinieAfisare].x>=1) | |
| { | |
| GUI.DrawTexture(new Rect(p1x,p3y+R1*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B1[b[0,1]]]); | |
| GUI.DrawTexture(new Rect(p1x,p3y+R1*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[LinieAfisare]); | |
| } | |
| //C2 | |
| if(LineWin[LinieAfisare].x>=2) | |
| { | |
| GUI.DrawTexture(new Rect(p2x,p3y+R2*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B2[b[1,1]]]); | |
| GUI.DrawTexture(new Rect(p2x,p3y+R2*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[LinieAfisare]); | |
| } | |
| //C3 | |
| if(LineWin[LinieAfisare].x>=3) | |
| { | |
| GUI.DrawTexture(new Rect(p3x,p3y+R3*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B3[b[2,1]]]); | |
| GUI.DrawTexture(new Rect(p3x,p3y+R3*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[LinieAfisare]); | |
| } | |
| //C4 | |
| if(LineWin[LinieAfisare].x>=4) | |
| { | |
| GUI.DrawTexture(new Rect(p4x,p3y+R4*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B4[b[3,1]]]); | |
| GUI.DrawTexture(new Rect(p4x,p3y+R4*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[LinieAfisare]); | |
| } | |
| //C5 | |
| if(LineWin[LinieAfisare].x>=5) | |
| { | |
| GUI.DrawTexture(new Rect(p5x,p3y+R5*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B5[b[4,1]]]); | |
| GUI.DrawTexture(new Rect(p5x,p3y+R5*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[LinieAfisare]); | |
| } | |
| break; | |
| case 1: | |
| if(LineWin[LinieAfisare].x>=1) | |
| { | |
| GUI.DrawTexture(new Rect(p1x,p2y+R1*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B1[b[0,2]]]); | |
| GUI.DrawTexture(new Rect(p1x,p2y+R1*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[LinieAfisare]); | |
| } | |
| //C2 | |
| if(LineWin[LinieAfisare].x>=2) | |
| { | |
| GUI.DrawTexture(new Rect(p2x,p2y+R2*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B2[b[1,2]]]); | |
| GUI.DrawTexture(new Rect(p2x,p2y+R2*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[LinieAfisare]); | |
| } //C3 | |
| if(LineWin[LinieAfisare].x>=3) | |
| { | |
| GUI.DrawTexture(new Rect(p3x,p2y+R3*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B3[b[2,2]]]); | |
| GUI.DrawTexture(new Rect(p3x,p2y+R3*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[LinieAfisare]); | |
| } //C4 | |
| if(LineWin[LinieAfisare].x>=4) | |
| { | |
| GUI.DrawTexture(new Rect(p4x,p2y+R4*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B4[b[3,2]]]); | |
| GUI.DrawTexture(new Rect(p4x,p2y+R4*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[LinieAfisare]); | |
| } | |
| //C5 | |
| if(LineWin[LinieAfisare].x>=5) | |
| { | |
| GUI.DrawTexture(new Rect(p5x,p2y+R5*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B5[b[4,2]]]); | |
| GUI.DrawTexture(new Rect(p5x,p2y+R5*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[LinieAfisare]); | |
| } | |
| break; | |
| case 2: | |
| if(LineWin[LinieAfisare].x>=1) | |
| { | |
| GUI.DrawTexture(new Rect(p1x,p4y+R1*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B1[b[0,0]]]); | |
| GUI.DrawTexture(new Rect(p1x,p4y+R1*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[LinieAfisare]); | |
| } //C2 | |
| if(LineWin[LinieAfisare].x>=2) | |
| { | |
| GUI.DrawTexture(new Rect(p2x,p4y+R2*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B2[b[1,0]]]); | |
| GUI.DrawTexture(new Rect(p2x,p4y+R2*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[LinieAfisare]); | |
| } | |
| //C3 | |
| if(LineWin[LinieAfisare].x>=3) | |
| { | |
| GUI.DrawTexture(new Rect(p3x,p4y+R3*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B3[b[2,0]]]); | |
| GUI.DrawTexture(new Rect(p3x,p4y+R3*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[LinieAfisare]); | |
| } | |
| //C4 | |
| if(LineWin[LinieAfisare].x>=4) | |
| { | |
| GUI.DrawTexture(new Rect(p4x,p4y+R4*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B4[b[3,0]]]); | |
| GUI.DrawTexture(new Rect(p4x,p4y+R4*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[LinieAfisare]); | |
| } | |
| //C5 | |
| if(LineWin[LinieAfisare].x>=5) | |
| { | |
| GUI.DrawTexture(new Rect(p5x,p4y+R5*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B5[b[4,0]]]); | |
| GUI.DrawTexture(new Rect(p5x,p4y+R5*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[LinieAfisare]); | |
| } | |
| break; | |
| case 3: | |
| if(LineWin[LinieAfisare].x>=1) | |
| { | |
| GUI.DrawTexture(new Rect(p1x,p2y+R1*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B1[b[0,2]]]); | |
| GUI.DrawTexture(new Rect(p1x,p2y+R1*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[LinieAfisare]); | |
| } //C2 | |
| if(LineWin[LinieAfisare].x>=2) | |
| { | |
| GUI.DrawTexture(new Rect(p2x,p3y+R2*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B2[b[1,1]]]); | |
| GUI.DrawTexture(new Rect(p2x,p3y+R2*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[LinieAfisare]); | |
| } | |
| //C3 | |
| if(LineWin[LinieAfisare].x>=3) | |
| { | |
| GUI.DrawTexture(new Rect(p3x,p4y+R3*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B3[b[2,0]]]); | |
| GUI.DrawTexture(new Rect(p3x,p4y+R3*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[LinieAfisare]); | |
| } | |
| //C4 | |
| if(LineWin[LinieAfisare].x>=4) | |
| { | |
| GUI.DrawTexture(new Rect(p4x,p3y+R4*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B4[b[3,1]]]); | |
| GUI.DrawTexture(new Rect(p4x,p3y+R4*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[LinieAfisare]); | |
| } | |
| //C5 | |
| if(LineWin[LinieAfisare].x>=5) | |
| { | |
| GUI.DrawTexture(new Rect(p5x,p2y+R5*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B5[b[4,2]]]); | |
| GUI.DrawTexture(new Rect(p5x,p2y+R5*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[LinieAfisare]); | |
| } | |
| break; | |
| case 4: | |
| if(LineWin[LinieAfisare].x>=1) | |
| { | |
| GUI.DrawTexture(new Rect(p1x,p4y+R1*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B1[b[0,0]]]); | |
| GUI.DrawTexture(new Rect(p1x,p4y+R1*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[LinieAfisare]); | |
| } //C2 | |
| if(LineWin[LinieAfisare].x>=2) | |
| { | |
| GUI.DrawTexture(new Rect(p2x,p3y+R2*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B2[b[1,1]]]); | |
| GUI.DrawTexture(new Rect(p2x,p3y+R2*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[LinieAfisare]); | |
| } //C3 | |
| if(LineWin[LinieAfisare].x>=3) | |
| { | |
| GUI.DrawTexture(new Rect(p3x,p2y+R3*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B3[b[2,2]]]); | |
| GUI.DrawTexture(new Rect(p3x,p2y+R3*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[LinieAfisare]); | |
| } //C4 | |
| if(LineWin[LinieAfisare].x>=4) | |
| { | |
| GUI.DrawTexture(new Rect(p4x,p3y+R4*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B4[b[3,1]]]); | |
| GUI.DrawTexture(new Rect(p4x,p3y+R4*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[LinieAfisare]); | |
| } //C5 | |
| if(LineWin[LinieAfisare].x>=5) | |
| { | |
| GUI.DrawTexture(new Rect(p5x,p4y+R5*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B5[b[4,0]]]); | |
| GUI.DrawTexture(new Rect(p5x,p4y+R5*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[LinieAfisare]); | |
| } | |
| break; | |
| case 5: | |
| if(LineWin[LinieAfisare].x>=1) | |
| { | |
| GUI.DrawTexture(new Rect(p1x,p3y+R1*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B1[b[0,1]]]); | |
| GUI.DrawTexture(new Rect(p1x,p3y+R1*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[LinieAfisare]); | |
| } //C2 | |
| if(LineWin[LinieAfisare].x>=2) | |
| { | |
| GUI.DrawTexture(new Rect(p2x,p4y+R2*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B2[b[1,0]]]); | |
| GUI.DrawTexture(new Rect(p2x,p4y+R2*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[LinieAfisare]); | |
| } //C3 | |
| if(LineWin[LinieAfisare].x>=3) | |
| { | |
| GUI.DrawTexture(new Rect(p3x,p4y+R3*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B3[b[2,0]]]); | |
| GUI.DrawTexture(new Rect(p3x,p4y+R3*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[LinieAfisare]); | |
| } //C4 | |
| if(LineWin[LinieAfisare].x>=4) | |
| { | |
| GUI.DrawTexture(new Rect(p4x,p4y+R4*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B4[b[3,0]]]); | |
| GUI.DrawTexture(new Rect(p4x,p4y+R4*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[LinieAfisare]); | |
| } //C5 | |
| if(LineWin[LinieAfisare].x>=5) | |
| { | |
| GUI.DrawTexture(new Rect(p5x,p3y+R5*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B5[b[4,1]]]); | |
| GUI.DrawTexture(new Rect(p5x,p3y+R5*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[LinieAfisare]); | |
| } | |
| break; | |
| case 6: | |
| if(LineWin[LinieAfisare].x>=1) | |
| { | |
| GUI.DrawTexture(new Rect(p1x,p3y+R1*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B1[b[0,1]]]); | |
| GUI.DrawTexture(new Rect(p1x,p3y+R1*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[LinieAfisare]); | |
| } //C2 | |
| if(LineWin[LinieAfisare].x>=2) | |
| { | |
| GUI.DrawTexture(new Rect(p2x,p2y+R2*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B2[b[1,2]]]); | |
| GUI.DrawTexture(new Rect(p2x,p2y+R2*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[LinieAfisare]); | |
| } //C3 | |
| if(LineWin[LinieAfisare].x>=3) | |
| { | |
| GUI.DrawTexture(new Rect(p3x,p2y+R3*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B3[b[2,2]]]); | |
| GUI.DrawTexture(new Rect(p3x,p2y+R3*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[LinieAfisare]); | |
| } //C4 | |
| if(LineWin[LinieAfisare].x>=4) | |
| { | |
| GUI.DrawTexture(new Rect(p4x,p2y+R4*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B4[b[3,2]]]); | |
| GUI.DrawTexture(new Rect(p4x,p2y+R4*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[LinieAfisare]); | |
| } //C5 | |
| if(LineWin[LinieAfisare].x>=5) | |
| { | |
| GUI.DrawTexture(new Rect(p5x,p3y+R5*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B5[b[4,1]]]); | |
| GUI.DrawTexture(new Rect(p5x,p3y+R5*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[LinieAfisare]); | |
| } | |
| break; | |
| case 7: | |
| if(LineWin[LinieAfisare].x>=1) | |
| { | |
| GUI.DrawTexture(new Rect(p1x,p2y+R1*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B1[b[0,2]]]); | |
| GUI.DrawTexture(new Rect(p1x,p2y+R1*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[LinieAfisare]); | |
| } //C2 | |
| if(LineWin[LinieAfisare].x>=2) | |
| { | |
| GUI.DrawTexture(new Rect(p2x,p3y+R2*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B2[b[1,1]]]); | |
| GUI.DrawTexture(new Rect(p2x,p3y+R2*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[LinieAfisare]); | |
| } //C3 | |
| if(LineWin[LinieAfisare].x>=3) | |
| { | |
| GUI.DrawTexture(new Rect(p3x,p2y+R3*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B3[b[2,2]]]); | |
| GUI.DrawTexture(new Rect(p3x,p2y+R3*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[LinieAfisare]); | |
| } //C4 | |
| if(LineWin[LinieAfisare].x>=4) | |
| { | |
| GUI.DrawTexture(new Rect(p4x,p3y+R4*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B4[b[3,1]]]); | |
| GUI.DrawTexture(new Rect(p4x,p3y+R4*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[LinieAfisare]); | |
| } //C5 | |
| if(LineWin[LinieAfisare].x>=5) | |
| { | |
| GUI.DrawTexture(new Rect(p5x,p2y+R5*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B5[b[4,2]]]); | |
| GUI.DrawTexture(new Rect(p5x,p2y+R5*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[LinieAfisare]); | |
| } | |
| break; | |
| case 8: | |
| if(LineWin[LinieAfisare].x>=1) | |
| { | |
| GUI.DrawTexture(new Rect(p1x,p4y+R1*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B1[b[0,0]]]); | |
| GUI.DrawTexture(new Rect(p1x,p4y+R1*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[LinieAfisare]); | |
| } //C2 | |
| if(LineWin[LinieAfisare].x>=2) | |
| { | |
| GUI.DrawTexture(new Rect(p2x,p3y+R2*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B2[b[1,1]]]); | |
| GUI.DrawTexture(new Rect(p2x,p3y+R2*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[LinieAfisare]); | |
| } //C3 | |
| if(LineWin[LinieAfisare].x>=3) | |
| { | |
| GUI.DrawTexture(new Rect(p3x,p4y+R3*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B3[b[2,0]]]); | |
| GUI.DrawTexture(new Rect(p3x,p4y+R3*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[LinieAfisare]); | |
| } //C4 | |
| if(LineWin[LinieAfisare].x>=4) | |
| { | |
| GUI.DrawTexture(new Rect(p4x,p3y+R4*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B4[b[3,1]]]); | |
| GUI.DrawTexture(new Rect(p4x,p3y+R4*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[LinieAfisare]); | |
| } //C5 | |
| if(LineWin[LinieAfisare].x>=5) | |
| { | |
| GUI.DrawTexture(new Rect(p5x,p4y+R5*Global.Size.y,latimeCasuta-8*Global.Size.x,inaltimeCasuta-8*Global.Size.y),SimbolImg[Global.B5[b[4,0]]]); | |
| GUI.DrawTexture(new Rect(p5x,p4y+R5*Global.Size.y,latimeCasuta,inaltimeCasuta),Cline[LinieAfisare]); | |
| } | |
| break; | |
| } | |
| } | |
| } | |
| } | |
| void QUIT() | |
| { PlayerPrefs.SetString("TimeR",Global.MoneyTime+""); | |
| PlayerPrefs.SetFloat("money",Global.money); | |
| PlayerPrefs.SetFloat("NrLevel",Global.NrLevel); | |
| PlayerPrefs.SetFloat("SpinNR",Global.SpinNR); | |
| PlayerPrefs.SetFloat("Level",Global.Level); | |
| //print("send"); | |
| //StartCoroutine(DownloadInfo2()); | |
| //Application.Quit(); | |
| StartCoroutine(UploadData()); | |
| } | |
| IEnumerator DownloadInfo2() | |
| { | |
| WWWForm form = new WWWForm(); | |
| form.AddField("ID", SystemInfo.deviceUniqueIdentifier+"" ); | |
| form.AddField("money", Global.money+"" ); | |
| form.AddField("spins",Global.SpinNR+""); | |
| form.AddField("level",Global.NrLevel+""); | |
| form.AddField("facebook",Global.facebookToken+""); | |
| form.AddField("fb_id",Global.facebookUserID+""); | |
| WWW InfoX = new WWW("http://slot.phpfogapp.com/devices.php", form); | |
| //yield return null; | |
| // WWWForm form = new WWWForm(); | |
| // form.AddField("ID", SystemInfo.deviceUniqueIdentifier+"" ); | |
| // form.AddField("money",Global.money+"" ); | |
| // form.AddField("spins",Global.SpinNR+""); | |
| // form.AddField("level",Global.NrLevel+""); | |
| // form.AddField("facebook",Global.facebookToken+""); | |
| // WWW InfoX = new WWW("http://www.x-2.info/SlotMachine/devices.php", form); | |
| yield return null; | |
| Application.Quit(); | |
| } | |
| IEnumerator UploadData() | |
| { | |
| WWWForm form = new WWWForm(); | |
| form.AddField("stare","1"); | |
| form.AddField("ID", SystemInfo.deviceUniqueIdentifier+"" ); | |
| form.AddField("money", Global.money+"" ); | |
| form.AddField("spins",Global.SpinNR+""); | |
| form.AddField("level",Global.NrLevel+""); | |
| form.AddField("facebook",Global.facebookToken+""); | |
| form.AddField("fb_id",Global.facebookUserID+""); | |
| WWW InfoX = new WWW("http://slot.phpfogapp.com/devices.php", form); | |
| yield return null; | |
| Application.Quit(); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment