示例#1
0
    private void LoadOptions(BonusLevel item)
    {
        if (Random.value > 0.5f)
        {
            Hear1.Textures = item.MusicHighUncertaintyImages;
            Hear1.Clips    = item.MusicHighUncertaintyAudio;
            Hear2.Textures = item.MusicLowUncertaintyImages;
            Hear2.Clips    = item.MusicLowUncertaintyAudio;
            Logger.Instance.LogAction("BonusLevel", "Music High Uncertainty Box", "1");
        }
        else
        {
            Hear2.Textures = item.MusicHighUncertaintyImages;
            Hear2.Clips    = item.MusicHighUncertaintyAudio;
            Hear1.Textures = item.MusicLowUncertaintyImages;
            Hear1.Clips    = item.MusicLowUncertaintyAudio;
            Logger.Instance.LogAction("BonusLevel", "Music High Uncertainty Box", "2");
        }

        if (Random.value > 0.5f)
        {
            See1.Textures = item.StoryHighUncertaintyImages;
            See2.Textures = item.StoryLowUncertaintyImages;
            Logger.Instance.LogAction("BonusLevel", "Spaceship High Uncertainty Box", "1");
        }
        else
        {
            See2.Textures = item.StoryHighUncertaintyImages;
            See1.Textures = item.StoryLowUncertaintyImages;
            Logger.Instance.LogAction("BonusLevel", "Spaceship High Uncertainty Box", "2");
        }

        PopulateBoxes();
    }
示例#2
0
        // TODO ajouter un PlayerBundle ou un PlayerInfo ou un truc dans ce genre
        public SpacePlayer(PlayerIndex playerIndex, SpaceShipDescription description)
            : base()
        {
            AssetName = description.AssetName;

            _playerIndex = playerIndex;

            _shipSpeed = description.ShipSpeed;

            _playerProfile = new PlayerProfile(String.Format("Player {0}", ((int)playerIndex) + 1), (int)playerIndex);

            _firstWeaponType  = (WeaponType)description.PrimaryWeaponId;
            _secondWeaponType = (WeaponType)description.SecondaryWeaponId;

            _bonusLevel = BonusLevel.None;

            VelocityMax       = 0.95f;
            ForceInsideScreen = true;

            _live = 3;

            // TODO : case
            _shields = new YnSprite("Ship/Shield/Shields");

            _weaponManager              = new WeaponManager(this);
            _weaponManager.Initialized  = true;
            _weaponManager.AssetsLoaded = true;

            LayerDepth = 0.4f;

            _playerTouchedTimer            = new YnTimer(1500, 0);
            _playerTouchedTimer.Completed += _playerTouchedTimer_Completed;

#if COMPLETE
            kinect = KinectSensorController.Instance;

            if (_playerIndex == PlayerIndex.One)
            {
                _kinectPlayerIndex = KinectPlayerIndex.One;
            }

            else if (_playerIndex == PlayerIndex.Two)
            {
                _kinectPlayerIndex = KinectPlayerIndex.Two;
            }
#endif

            LoadContent();
        }
    private void LoadOptions(BonusLevel item)
    {
        if (Random.value > 0.5f)
        {
            Hear1.Textures = item.MusicHighUncertaintyImages;
            Hear1.Clips = item.MusicHighUncertaintyAudio;
            Hear2.Textures = item.MusicLowUncertaintyImages;
            Hear2.Clips = item.MusicLowUncertaintyAudio;
            Logger.Instance.LogAction("BonusLevel", "Music High Uncertainty Box", "1");
        } else
        {
            Hear2.Textures = item.MusicHighUncertaintyImages;
            Hear2.Clips = item.MusicHighUncertaintyAudio;
            Hear1.Textures = item.MusicLowUncertaintyImages;
            Hear1.Clips = item.MusicLowUncertaintyAudio;
            Logger.Instance.LogAction("BonusLevel", "Music High Uncertainty Box", "2");
        }

        if (Random.value > 0.5f)
        {
            See1.Textures = item.StoryHighUncertaintyImages;
            See2.Textures = item.StoryLowUncertaintyImages;
            Logger.Instance.LogAction("BonusLevel", "Spaceship High Uncertainty Box", "1");
        }
        else
        {
            See2.Textures = item.StoryHighUncertaintyImages;
            See1.Textures = item.StoryLowUncertaintyImages;
            Logger.Instance.LogAction("BonusLevel", "Spaceship High Uncertainty Box", "2");
        }

        PopulateBoxes();
    }
 static BonusLevel()
 {
     moneyLevel = new BonusLevel();
 }