public void SetScore(TypeScore score) { var a = Instantiate(objScore, TransScore); switch (score) { case TypeScore.Point_2: AudioCtrl.Ins.Play("2Point"); a.ChangeImg(Scoure_Img_Score[0]); break; case TypeScore.Point_3: AudioCtrl.Ins.Play("3Point"); a.ChangeImg(Scoure_Img_Score[1]); break; case TypeScore.Clean_Shoot: AudioCtrl.Ins.Play("3Point"); a.ChangeImg(Scoure_Img_Score[2]); break; case TypeScore.JumpBall: AudioCtrl.Ins.Play("SlampDunk"); a.ChangeImg(Scoure_Img_Score[3]); break; } }
public virtual void SetUpTypeScore() { if (CurrPos >= 5) { type = TypeScore.Point_3; } else { type = TypeScore.Point_2; } }
public void SetKey(string key) { if (isGlobal) { return; } Global[key] = 1; if (Global[Key_Global] != 0) { if (isCanGlobal) { if (Global[Key_Baset_2] == 1 && Global[Key_Baset_1] == 0) { isCanGlobal = false; return; } else { Global[key] = 1; } if ((Global[Key_Baset_1] + Global[Key_Baset_2]) == 2) { if (!CtrlGamePlay.Ins.isPlaying) { return; } CtrlGamePlay.Ins.ResetRound(); var ball = (Ball)CtrlGamePlay.Ins.Ball; var player = (Player)CtrlGamePlay.Ins.Player; var cpu = (AI)CtrlGamePlay.Ins.AI; AudioCtrl.Ins.Play("Goal"); switch (BoardOf) { case BoardGame.Player: int score = 0; TypeScore type1 = cpu.GetTypeScore(); if (ball.LastHand is AI) { if (type1 == TypeScore.Point_2) { if (!cpu.isNullEffAction()) { type1 = TypeScore.JumpBall; score = 2; } else { type1 = TypeScore.Point_2; score = 2; } } else { if (!cpu.isNullEffAction()) { type1 = TypeScore.JumpBall; score = 2; } else { if (Global[Key_Coll_2] == 0) { type1 = TypeScore.Clean_Shoot; score = 3; } else { type1 = TypeScore.Point_3; score = 3; } } } CtrlGamePlay.Ins.SetScore(type1); } else { score = 2; CtrlGamePlay.Ins.SetScore(TypeScore.Point_2); } CtrlGamePlay.Ins.GlobalCPU(score); break; case BoardGame.CPU: int score1 = 0; if (ball.LastHand is Player) { TypeScore type = player.GetTypeScore(); if (type == TypeScore.Point_2) { if (!player.isInAction()) { type = TypeScore.JumpBall; } else { type = TypeScore.Point_2; } score1 = 2; } else { if (!player.isInAction()) { type = TypeScore.JumpBall; score1 = 2; } else { if (Global[Key_Coll_2] == 0) { type = TypeScore.Clean_Shoot; score1 = 3; } else { type = TypeScore.Point_3; score1 = 3; } } } CtrlGamePlay.Ins.SetScore(type); } else { score1 = 2; CtrlGamePlay.Ins.SetScore(TypeScore.Point_2); } CtrlGamePlay.Ins.GlobalPlayer(score1); break; } isGlobal = true; } } } }