Exemple #1
0
        public void SetScore(SmuckPlayer p)
        {
            int pIndex = (int)p.gamePadIndex;

            scores.txScore[pIndex].Text             = p.roundScore.ToString();// +"/" + pointsToWinRound.ToString();
            scores.laneCrossIndicator[pIndex].Count = (int)((p.roundScore + 1) / pointsPerCrossing);
        }
Exemple #2
0
 public void SetPlayer(SmuckPlayer p)
 {
     postRoundPanel.scoreBox[(int)p.gamePadIndex].Player    = p;
     scores.txScore[(int)p.gamePadIndex].Visible            = true;
     scores.laneCrossIndicator[(int)p.gamePadIndex].Visible = true;
     SetScore(p);
 }
 //void OnPlayerDrowned(DisplayObjectContainer sender)
 //{
 //    sender.PlayheadWrap -= new AnimationEvent(OnPlayerDrowned);
 //    sender.Stop();
 //    sender.DestroyAfterUpdate();
 //}
 private void KillPlayer(SmuckPlayer p)
 {
     p.LivingState = LivingState.Dying;
     if (this is SteamRollerScreen || p.isExploding)
     {
         p.body.SetLinearVelocity(Vector2.Zero);
     }
     //if (p.IsNaked)
     //{
     //    p.LivingState = LivingState.Dead;
     //}
     //else
     //{
     //    p.LivingState = LivingState.Dying;
     //}
     //    if (p.LivingState == LivingState.Alive)
     //    {
     //        if (p.DefinitionName.StartsWith("swim"))
     //        {
     //            p.ReplaceView("drowningPlayer");
     //            p.PlayAll();
     //            p.PlayheadWrap += new AnimationEvent(OnPlayerDrowned);
     //        }
     //        else
     //        {
     //            p.ReplaceView("deadPlayer0");
     //        }
     //        p.LivingState = LivingState.Dying;
     //    }
 }
        private void CreateDeadIcon(SmuckPlayer p, DeadIconType type)
        {
            int dIndex = deadIcons.Count;
            DeadIcon di;
            if (this is SteamRollerScreen)
            {
                di = (DeadIcon)CreateInstanceAt("flatteningPlayer" + (int)p.gamePadIndex, "deadIcons" + dIndex, p.X, p.Y, 0, iconDepthCount++);
            }
            else if (p.isExploding)
            {
                di = (DeadIcon)CreateInstanceAt("explodingPlayer", "deadIcons" + dIndex, p.X, p.Y, 0, iconDepthCount++);
            }
            else
            {
                di = (DeadIcon)CreateInstanceAt("deadIcon", "deadIcons" + dIndex, p.X, p.Y, 0, iconDepthCount++);
            }

            // Compact framework doesn't support Enum.GetValues
            di.IconType = (DeadIconType)1;// (DeadIconType)rnd.Next(deadIconCount);
            di.Depth = iconDepthCount;
            di.PlayheadWrap += new AnimationEvent(di_PlayheadWrap);
            di.Play();
        }
 public void SetScore(SmuckPlayer p)
 {
     int pIndex = (int)p.gamePadIndex;
     scores.txScore[pIndex].Text = p.roundScore.ToString();// +"/" + pointsToWinRound.ToString();
     scores.laneCrossIndicator[pIndex].Count = (int)((p.roundScore + 1) / pointsPerCrossing);
 }
 public void SetPlayer(SmuckPlayer p)
 {
     postRoundPanel.scoreBox[(int)p.gamePadIndex].Player = p;
     scores.txScore[(int)p.gamePadIndex].Visible = true;
     scores.laneCrossIndicator[(int)p.gamePadIndex].Visible = true;
     SetScore(p);
 }