コード例 #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void objPlayer1_OnShotBoxStatus(object sender, SHOTBOXARGS e)
        {
            if (e.SHOTBOXRESPONSE == SHOTBOXMSG.PREPARED)
            {
                IsInitialized = true;
                IsSceneLoaded = true;

                if (sender != null)
                {
                    ShotBox shotboxobj = sender as ShotBox;
                    if (shotboxobj != null)
                    {
                        if (shotboxobj.Equals(objScorePlayer))
                        {
                            WriteTrace("objPlayer1_OnShotBoxStatus Scoreplayer Scene prepared,Calling SetMatchUdt...");
                            SetMatchUdt();
                        }
                        WriteTrace("objPlayer1_OnShotBoxStatus Scoreplayer Scene prepared,Calling Play..");
                        shotboxobj.Play(true, true);
                    }
                    else
                    {
                        if (sender is IPlayer)
                        {
                            IPlayer playerobj = sender as IPlayer;
                            if (playerobj != null)
                            {
                                WriteTrace("objPlayer1_OnShotBoxStatus BackGround Scene prepared,Calling Play...");
                                playerobj.Play(true, true);
                            }
                        }
                    }
                }
            }
            else if (e.SHOTBOXRESPONSE == SHOTBOXMSG.PLAYCOMPLETE)
            {
                WriteTrace("objPlayer1_OnShotBoxStatus SHOTBOXMSG.PLAYCOMPLETE event..");
                if (sender is ShotBox)
                {
                    ShotBox shotboxobj = sender as ShotBox;
                    if (shotboxobj.Equals(objScorePlayer))
                    {
                        WriteTrace("objPlayer1_OnShotBoxStatus Scoreplayer Scene playcomplete,Calling DeleteSg...");
                        shotboxobj.DeleteSg();
                    }
                }
                else if (sender is IPlayer)
                {
                    IPlayer playerobj = sender as IPlayer;
                    if (playerobj.Equals(objBGPlayer))
                    {
                        WriteTrace("objPlayer1_OnShotBoxStatus BackGround Scene playcomplete,Calling DeleteSg...");
                        playerobj.DeleteSg();
                    }
                }
            }
        }