Пример #1
0
        public override void OnRoundStart()
        {
            base.OnRoundStart();
            if (this._owner.bufListDetail.GetActivatedBufList().Find((Predicate <BattleUnitBuf>)(x => x is BattleUnitBuf_Emotion_BlueStar_SoundBuf)) == null)
            {
                return;
            }
            Battle.CreatureEffect.CreatureEffect original = Resources.Load <Battle.CreatureEffect.CreatureEffect>("Prefabs/Battle/CreatureEffect/New_IllusionCardFX/9_H/FX_IllusionCard_9_H_Voice");
            if (!((UnityEngine.Object)original != (UnityEngine.Object)null))
            {
                return;
            }
            Battle.CreatureEffect.CreatureEffect creatureEffect = UnityEngine.Object.Instantiate <Battle.CreatureEffect.CreatureEffect>(original, SingletonBehavior <BattleSceneRoot> .Instance.transform);
            if (!((UnityEngine.Object)creatureEffect?.gameObject.GetComponent <AutoDestruct>() == (UnityEngine.Object)null))
            {
                return;
            }
            AutoDestruct autoDestruct = creatureEffect?.gameObject.AddComponent <AutoDestruct>();

            if (!((UnityEngine.Object)autoDestruct != (UnityEngine.Object)null))
            {
                return;
            }
            autoDestruct.time = 5f;
            autoDestruct.DestroyWhenDisable();
            SoundEffectPlayer.PlaySound("Creature/BlueStar_Atk");
            SingletonBehavior <BattleSoundManager> .Instance.EndBgm();

            if (!((UnityEngine.Object) this._loop == (UnityEngine.Object)null))
            {
                return;
            }
            this._loop = SingletonBehavior <SoundEffectManager> .Instance.PlayClip("Creature/BlueStar_Bgm", true, parent : SingletonBehavior <BattleSceneRoot> .Instance.currentMapObject.transform);
        }
Пример #2
0
	public void Start() {
		Floor floor = Helper.Find<Floor>("Floor");
		gridManager = floor.GridManager;
		unit = GetComponent<BaseUnit>();

		soundEffectPLayer = GetComponentInChildren<SoundEffectPlayer>();

        LeaveSound = unit.GetComponent<BaseUnit>().LeaveSound;
        ArriveSound = unit.GetComponent<BaseUnit>().ArriveSound;

        if (LeaveSound.Any() || ArriveSound.Any())
	    {
            AudioSource audioSrc = gameObject.AddComponent<AudioSource>();
            LeaveArriveEffectPlayer = gameObject.GetComponent<AudioSource>();
	    }
        
	    if (unit is AvatarUnit)
	    {
	        isAvatarMover = true;
            currentAvatarUnit = (AvatarUnit)unit;
	    }
	    else
	    {
	        isAvatarMover = false;
	    }
	}
        //constructor
        public MercedesSLRMclaren(ref GraphicsDeviceManager graphics, ContentManager currentContentLoader, ref SpriteBatch spriteBatch, Vector3 start, InputHandler input, ref SpriteFont currentFont, ref Model carModel, Game game)
            : base(ref graphics, start, input)
        {
            //smoke particle system
            smoke           = new SmokePlumeParticleSystem(game, currentContentLoader, graphics.GraphicsDevice);
            smoke.DrawOrder = 100;
            game.Components.Add(smoke);

            //car model
            this.carModel = carModel;

            //gearbox and motor of the car
            changeGearBoxToAutomatic();

            //create Gauge
            guageTexture     = currentContentLoader.Load <Texture2D>("Textures//Gauges//Speedo");
            needleTexture    = currentContentLoader.Load <Texture2D>("Textures//Gauges//SpeedoNeedle");
            lightTexture     = currentContentLoader.Load <Texture2D>("Textures//Gauges//SpeedoGearLight");
            canister         = currentContentLoader.Load <Texture2D>("Textures//Gauges//NOScanister");
            this.spriteBatch = spriteBatch;
            this.currentFont = currentFont;
            createGauge(graphics.GraphicsDevice.Viewport);

            //collision data
            collisionSphere = new BoundingSphere(position / 20, 0.30f);
            collisionBox    = CreateBoundingBox();
            collisionSphere = CreateBoundingSphere();

            //sound data
            sound = new SoundEffectPlayer(currentContentLoader, this, "Sound//SoundEffects//Mercedes Mclaren SLR");

            //car scale
            carScale = 0.05f;
        }
Пример #4
0
        public static void insufficientFundsText(RichTextBox infoBox)
        {
            infoBox.ForeColor = System.Drawing.Color.Red;
            infoBox.Text      = "Insufficient funds for this action!";

            SoundEffectPlayer.playSoundEffect(Properties.Resources.processing3);
        }
Пример #5
0
    //光头强抓到我了
    public void OnEventGuangTouQiangCaptureMy()
    {
        if (!IsEnterStart || Prompt_Accelerate != null)
        {
            return;
        }
        if (((IParkourControllerScriptCS)hControllerScriptCS).isGamePaused)
        {
            return;
        }
        if (!IsShowPrompt_Accelerate)
        {
            return;
        }
        Release_Prompt_Accelerate();
        switch (playerIndex)
        {
        case PlayerIndex.Index_P1:
            Prompt_Accelerate = GameRoot.uiOrthographicCamera.LoadLanguageResource_UIPrefabs("Prompt_Accelerate_Left.prefab", GameRoot.gameResource);
            break;

        case PlayerIndex.Index_P2:
            Prompt_Accelerate = GameRoot.uiOrthographicCamera.LoadLanguageResource_UIPrefabs("Prompt_Accelerate_Right.prefab", GameRoot.gameResource);
            break;
        }
        Invoke("Release_Prompt_Accelerate", 3.0f);
        SoundEffectPlayer.PlayStandalone("Accelerate.wav");
    }
Пример #6
0
    private void OnDialogReback(int dialogid, GuiExtendDialog.DialogFlag ret)
    {
        switch (ret)
        {
        case GuiExtendDialog.DialogFlag.Flag_Cancel:
        {
            SoundEffectPlayer.Play("buttonok.wav");
            UnityEngine.Object.DestroyObject(this.gameObject);
        }
        break;

        case GuiExtendDialog.DialogFlag.Flag_Ok:
        {
            SoundEffectPlayer.Play("buttonok.wav");
            int currentSelectCharacterIndex = (int)m_UpgradeCharacterDt.id;
            if (m_UpgradeCharacterDt.att == UiSceneSelectGameCharacter.CharacterAttribute.AttributeA)
            {
                IGamerProfile.Instance.PayMoney(new IGamerProfile.PayMoneyData(IGamerProfile.PayMoneyItem.PayMoneyItem_LevelCharacter,
                                                                               IGamerProfile.gameCharacter.characterDataList[currentSelectCharacterIndex].LevelAToMoney.GetValue(
                                                                                   IGamerProfile.Instance.playerdata.characterData[currentSelectCharacterIndex].levelA),
                                                                               0,
                                                                               PayMoneyCallback), this);
            }
            else if (m_UpgradeCharacterDt.att == UiSceneSelectGameCharacter.CharacterAttribute.AttributeB)
            {
                IGamerProfile.Instance.PayMoney(new IGamerProfile.PayMoneyData(IGamerProfile.PayMoneyItem.PayMoneyItem_LevelCharacter,
                                                                               IGamerProfile.gameCharacter.characterDataList[currentSelectCharacterIndex].LevelBToMoney.GetValue(
                                                                                   IGamerProfile.Instance.playerdata.characterData[currentSelectCharacterIndex].levelB),
                                                                               0,
                                                                               PayMoneyCallback), this);
            }
        }
        break;
        }
    }
    private void OnButtonSelectOk(int index)
    {
        switch (index)
        {
        case (int)ButtonId.Id_Cancel:
            SoundEffectPlayer.Play("buttonok.wav");
            GotoNext();
            break;

        case (int)ButtonId.Id_OpenOne:

            //如果所有宝箱正在开启就不要响应了
            if (!IsAllBoxOpen)
            {
                SoundEffectPlayer.Play("buttonok.wav");
                IGamerProfile.Instance.PayMoney(new IGamerProfile.PayMoneyData(IGamerProfile.PayMoneyItem.PayMoneyItem_OneTreasure,
                                                                               IGamerProfile.gameBaseDefine.gameParameter.treasure.openonce,
                                                                               0,
                                                                               PayMoneyCallback), this);
            }
            break;

        case (int)ButtonId.Id_OpenAll:

            if (!IsAllBoxOpen)
            {
                SoundEffectPlayer.Play("buttonok.wav");
                IGamerProfile.Instance.PayMoney(new IGamerProfile.PayMoneyData(IGamerProfile.PayMoneyItem.PayMoneyItem_AllTreasure,
                                                                               IGamerProfile.gameBaseDefine.gameParameter.treasure.openall,
                                                                               0,
                                                                               PayMoneyCallback), this);
            }
            break;
        }
    }
Пример #8
0
        public void SoundEffectPlayer_PlayResetsVolumePitchAndPanWhenNotSpecified(AudioImplementation audioImplementation)
        {
            var sfxPlayer = default(SoundEffectPlayer);
            var sfx       = default(SoundEffect);

            GivenAnUltravioletApplicationWithNoWindow()
            .WithAudioImplementation(audioImplementation)
            .WithInitialization(uv => uv.GetAudio().AudioMuted = true)
            .WithContent(content =>
            {
                sfxPlayer = SoundEffectPlayer.Create();
                sfx       = content.Load <SoundEffect>("SoundEffects/grenade");

                sfxPlayer.Play(sfx, 0.25f, 0.50f, 0.75f, false);
                sfxPlayer.Stop();
                sfxPlayer.Play(sfx, false);

                TheResultingValue(sfxPlayer.Volume).ShouldBe(1f);
                TheResultingValue(sfxPlayer.Pitch).ShouldBe(0f);
                TheResultingValue(sfxPlayer.Pan).ShouldBe(0f);
            })
            .OnUpdate((app, time) =>
            {
                sfxPlayer.Update(time);
            })
            .RunForOneFrame();
        }
Пример #9
0
        public void SoundEffectPlayer_SlidesVolumeCorrectly(AudioImplementation audioImplementation)
        {
            var sfxPlayer = default(SoundEffectPlayer);
            var sfx       = default(SoundEffect);

            GivenAnUltravioletApplicationWithNoWindow()
            .WithAudioImplementation(audioImplementation)
            .WithInitialization(uv => uv.GetAudio().AudioMuted = true)
            .WithContent(content =>
            {
                sfxPlayer = SoundEffectPlayer.Create();
                sfx       = content.Load <SoundEffect>("SoundEffects/grenade");

                sfxPlayer.Play(sfx, false);

                TheResultingValue(sfxPlayer.Volume).ShouldBe(1f);

                sfxPlayer.SlideVolume(0f, TimeSpan.FromSeconds(1));
            })
            .OnUpdate((app, time) =>
            {
                sfxPlayer.Update(time);
            })
            .RunFor(TimeSpan.FromSeconds(2));

            TheResultingValue(sfxPlayer.Volume).ShouldBe(0f);
        }
        public override void OnRoundStart()
        {
            base.OnRoundStart();
            if (!this.effect)
            {
                return;
            }
            this.effect  = false;
            this.trigger = true;
            this._owner.SetHp(this.savedHp);
            this._owner.breakDetail.breakGauge = this.savedBp;
            this._owner.cardSlotDetail.RecoverPlayPoint(this._owner.cardSlotDetail.GetMaxPlayPoint());
            SingletonBehavior <BattleManagerUI> .Instance.ui_unitListInfoSummary.UpdateCharacterProfile(this._owner, this._owner.faction, this._owner.hp, this._owner.breakDetail.breakGauge);

            Battle.CreatureEffect.CreatureEffect original = Resources.Load <Battle.CreatureEffect.CreatureEffect>("Prefabs/Battle/CreatureEffect/New_IllusionCardFX/4_N/FX_IllusionCard_4_N_Orchestra_Start");
            if (!((UnityEngine.Object)original != (UnityEngine.Object)null))
            {
                return;
            }
            Battle.CreatureEffect.CreatureEffect creatureEffect = UnityEngine.Object.Instantiate <Battle.CreatureEffect.CreatureEffect>(original, SingletonBehavior <BattleSceneRoot> .Instance.transform);
            if (!((UnityEngine.Object)creatureEffect?.gameObject.GetComponent <AutoDestruct>() == (UnityEngine.Object)null))
            {
                return;
            }
            AutoDestruct autoDestruct = creatureEffect?.gameObject.AddComponent <AutoDestruct>();

            if (!((UnityEngine.Object)autoDestruct != (UnityEngine.Object)null))
            {
                return;
            }
            autoDestruct.time = 3f;
            autoDestruct.DestroyWhenDisable();
            SoundEffectPlayer.PlaySound("Creature/Sym_movment_0_clap");
        }
 public override void OnRoundStart()
 {
     base.OnRoundStart();
     if (!this.trigger)
     {
         return;
     }
     this.trigger = false;
     Battle.CreatureEffect.CreatureEffect original = Resources.Load <Battle.CreatureEffect.CreatureEffect>("Prefabs/Battle/CreatureEffect/New_IllusionCardFX/4_N/FX_IllusionCard_4_N_Orchestra_Light");
     if ((UnityEngine.Object)original != (UnityEngine.Object)null)
     {
         Battle.CreatureEffect.CreatureEffect creatureEffect = UnityEngine.Object.Instantiate <Battle.CreatureEffect.CreatureEffect>(original, SingletonBehavior <BattleSceneRoot> .Instance.transform);
         if ((UnityEngine.Object)creatureEffect?.gameObject.GetComponent <AutoDestruct>() == (UnityEngine.Object)null)
         {
             AutoDestruct autoDestruct = creatureEffect?.gameObject.AddComponent <AutoDestruct>();
             if ((UnityEngine.Object)autoDestruct != (UnityEngine.Object)null)
             {
                 autoDestruct.time = 3f;
                 autoDestruct.DestroyWhenDisable();
             }
         }
     }
     foreach (BattleUnitModel alive in BattleObjectManager.instance.GetAliveList(this._owner.faction == Faction.Player ? Faction.Enemy : Faction.Player))
     {
         alive.cardSlotDetail.LosePlayPoint(Reduce);
     }
     SoundEffectPlayer.PlaySound("Creature/Sym_movment_5_finale");
 }
        public override void OnRoundStart()
        {
            if (Ratio < 0.5)
            {
                return;
            }
            int num = (int)((double)this._owner.breakDetail.breakGauge * 0.25);

            this._owner.TakeBreakDamage(num);
            this._owner.view.BreakDamaged(num, BehaviourDetail.Penetrate, this._owner, AtkResist.Normal);
            foreach (BattleUnitModel unit in BattleObjectManager.instance.GetAliveList(this._owner.faction == Faction.Player? Faction.Player : Faction.Enemy).FindAll((Predicate <BattleUnitModel>)(x => x != this._owner)))
            {
                unit.breakDetail.RecoverBreak(num);
            }
            if (Singleton <StageController> .Instance.IsLogState())
            {
                this._owner.battleCardResultLog?.SetNewCreatureAbilityEffect("4_N/FX_IllusionCard_4_N_FlowerPiece", 2f);
                this._owner.battleCardResultLog?.SetCreatureEffectSound("Creature/Ali_FarAtk");
            }
            else
            {
                SingletonBehavior <DiceEffectManager> .Instance.CreateNewFXCreatureEffect("4_N/FX_IllusionCard_4_N_FlowerPiece", 1f, this._owner.view, this._owner.view, 2f);

                SoundEffectPlayer.PlaySound("Creature/Ali_FarAtk");
            }
        }
Пример #13
0
        public override void OnRoundStart()
        {
            base.OnRoundStartOnce();
            if (this._owner.faction != Faction.Enemy)
            {
                return;
            }
            if (round != 4)
            {
                round += 1;
            }
            if (round == 4)
            {
                if (this._owner.cardSlotDetail.PlayPoint >= 4)
                {
                    this._owner.cardSlotDetail.SpendCost(4);
                    foreach (BattleDiceCardModel battleDiceCardModel in this._owner.allyCardDetail.GetHand())
                    {
                        battleDiceCardModel.AddBuf(new DiceCardSelfAbility_oz_control.BattleDiceCardBuf_costZero1Round());
                    }
                    round = 0;
                    SingletonBehavior <DiceEffectManager> .Instance.CreateNewFXCreatureEffect("7_C/FX_IllusionCard_7_C_Magic", 1f, _owner.view, _owner.view, 3f);

                    SoundEffectPlayer.PlaySound("Creature/Oz_CardMagic");
                }
            }
        }
        public override void BeforeGiveDamage(BattleDiceBehavior behavior)
        {
            base.BeforeGiveDamage(behavior);
            if (behavior == null)
            {
                return;
            }
            int dmg = damage;

            this._owner.LoseHp(dmg);
            this._owner.view.Damaged(dmg, BehaviourDetail.None, dmg, this._owner);
            this._owner.battleCardResultLog?.SetNewCreatureAbilityEffect("9_H/FX_IllusionCard_9_H_Martyr", 3f);
            SoundEffectPlayer.PlaySound("Creature/BlueStar_In");
            double ratio     = 1 - (this._owner.hp / this._owner.MaxHp);
            double breakrate = ratio * 10 / 9;

            if (breakrate >= 1)
            {
                breakrate = 1;
            }
            behavior.ApplyDiceStatBonus(new DiceStatBonus()
            {
                breakRate = (int)(breakrate * 100)
            });
            behavior.card.target.battleCardResultLog?.SetNewCreatureAbilityEffect("9_H/FX_IllusionCard_9_H_MartyrExplo", 3f);
        }
Пример #15
0
 public void Start()
 {
     ClearScore();
     customerManager   = FindObjectOfType <CustomerManager>();
     soundEffectPlayer = FindObjectOfType <SoundEffectPlayer>();
     board             = FindObjectOfType <Board>();
 }
            public override void OnRoundStart()
            {
                base.OnRoundStart();
                this._aura = SingletonBehavior <DiceEffectManager> .Instance.CreateNewFXCreatureEffect("8_B/FX_IllusionCard_8_B_Punising", 1f, this._owner.view, this._owner.view)?.gameObject;

                SoundEffectPlayer.PlaySound("Creature/SmallBird_StrongAtk");
            }
Пример #17
0
 public override void Awake()
 {
     base.Awake();
     sfxPlayer                = GetComponent <SoundEffectPlayer>();
     reverbFilter             = GetComponent <AudioReverbFilter>();
     reverbFilter.reverbLevel = -2000;
 }
Пример #18
0
        public Duck(string name, int x, int y)
        {
            Name = name;

            _duckDeath = new Sprite("DuckDeath");
            _duckDeath.LoadContent("DuckDeath");

            _duckDive = new Sprite("DuckDive");
            _duckDive.LoadContent("DuckDive");

            _duck = new AnimatedSprite()
            {
                RenderBoundingBox = false,
                Name = name
            };

            _duck.LoadFrameTexture("DuckFrame1");
            _duck.LoadFrameTexture("DuckFrame2");
            _duck.LoadFrameTexture("DuckFrame3");

            _duck.Velocity       = new Vector2(7, 5);
            _duck.Flip           = false;
            _duck.Location       = new Vector2(x, y);
            _duck.IsVisible      = true;
            _duck.IsEnabled      = true;
            _duck.AnimationType  = AnimationTypeEnum.PingPong;
            _duck.AnimationSpeed = 5;
            _duck.Play();
            State = DuckStateEnum.Start;

            SoundEffectPlayer.LoadSoundEffect("death");
            SoundEffectPlayer.LoadSoundEffect("quaks");
            SoundEffectPlayer.LoadSoundEffect("falling");
            SoundEffectPlayer.LoadSoundEffect("flapping");
        }
        public override void OnRoundStart()
        {
            if (!(this._owner.bufListDetail.GetActivatedBufList().Exists(x => x is Eager)))
            {
                this._owner.bufListDetail.AddBuf(new Eager());
                SoundEffectPlayer.PlaySound("Creature/RedShoes_On");
                CreatureEffect_FaceAttacher effectFaceAttacher = this.MakeFaceEffect(this._owner.view);
                effectFaceAttacher.SetLayer("Character");
                if (!(bool)(UnityEngine.Object)effectFaceAttacher)
                {
                    return;
                }
                this._faceEffect.Add(effectFaceAttacher);
            }
            List <BattleUnitModel> alive = BattleObjectManager.instance.GetAliveList(this._owner.faction == Faction.Player ? Faction.Enemy : Faction.Player);

            foreach (BattleUnitModel member in alive)
            {
                if (member.bufListDetail.GetActivatedBufList().Exists(x => x is TheChosen))
                {
                    return;
                }
            }
            RandomUtil.SelectOne <BattleUnitModel>(alive).bufListDetail.AddBuf(new TheChosen());
        }
Пример #20
0
            public override void Init(BattleUnitModel owner)
            {
                base.Init(owner);
                this._aura = SingletonBehavior <DiceEffectManager> .Instance.CreateNewFXCreatureEffect("1_M/FX_IllusionCard_1_M_Vine", 1f, owner.view, owner.view);

                SoundEffectPlayer.PlaySound("Creature/SnowWhite_StongAtk_Ready");
            }
Пример #21
0
        public static void noMoreActionsText(RichTextBox infoBox)
        {
            infoBox.ForeColor = System.Drawing.Color.Red;
            infoBox.Text      = "No more actions can be taken this turn.";

            SoundEffectPlayer.playSoundEffect(Properties.Resources.processing3);
        }
Пример #22
0
    //光头强只会和障碍物碰撞,不会吃东西
    protected override void OnTriggerEnter(Collider other)
    {
        BrokenObjectController broken = other.gameObject.GetComponent <BrokenObjectController>();

        if (broken == null)
        {
            return;
        }

        if (broken.IsLocker)
        {
            //Debug.Log(other.gameObject + "#跳出");
            return;
        }
        if (broken.brokenHandleType != BrokenObjectController.BrokenHandleType.HandleType_Barrier)
        {
            return;
        }
        //Debug.Log(other.gameObject + "#########");
        broken.IsLocker = true;
        //处理被撞物品
        broken.StartBroken(hControllerScriptCS as IParkourControllerScriptCS);
        //触发碰撞消息
        playerAIControler.OnEventHitBrokenObject();
        //播放碰撞语言
        SoundEffectPlayer.Play("touchbroken.wav");
        //playerSoundControler.PlayAudioSource(IParkourPlayerSound.PlayerSoundType.Type_Barrier);
    }
Пример #23
0
        public static void transactionCompleteText(RichTextBox infoBox)
        {
            infoBox.ForeColor = System.Drawing.Color.Green;
            infoBox.Text      = "Transaction Complete.";

            SoundEffectPlayer.playSoundEffect(Properties.Resources.transaction_completed);
        }
        public override void OnRoundStart()
        {
            base.OnRoundStart();
            if (this._effect)
            {
                return;
            }
            this._effect = true;
            Battle.CreatureEffect.CreatureEffect original = Resources.Load <Battle.CreatureEffect.CreatureEffect>("Prefabs/Battle/CreatureEffect/New_IllusionCardFX/0_K/FX_IllusionCard_0_K_Blizzard");
            if (!((UnityEngine.Object)original != (UnityEngine.Object)null))
            {
                return;
            }
            Battle.CreatureEffect.CreatureEffect creatureEffect = UnityEngine.Object.Instantiate <Battle.CreatureEffect.CreatureEffect>(original, SingletonBehavior <BattleSceneRoot> .Instance.transform);
            if (!((UnityEngine.Object)creatureEffect?.gameObject.GetComponent <AutoDestruct>() == (UnityEngine.Object)null))
            {
                return;
            }
            AutoDestruct autoDestruct = creatureEffect?.gameObject.AddComponent <AutoDestruct>();

            if (!((UnityEngine.Object)autoDestruct != (UnityEngine.Object)null))
            {
                return;
            }
            autoDestruct.time = 3f;
            autoDestruct.DestroyWhenDisable();
            SoundEffectPlayer.PlaySound("Creature/SnowQueen_StrongAtk2");
        }
            public override void Init(BattleUnitModel owner)
            {
                base.Init(owner);
                this.aura = SingletonBehavior <DiceEffectManager> .Instance.CreateNewFXCreatureEffect("5_T/FX_IllusionCard_5_T_Rage", 1f, owner.view, owner.view)?.gameObject;

                SoundEffectPlayer.PlaySound("Creature/Angry_Meet");
            }
        public override bool BeforeTakeDamage(BattleUnitModel attacker, int dmg)
        {
            if (this._activated || (double)this._owner.hp > (double)dmg)
            {
                return(false);
            }
            this._activated = true;
            this._owner.RecoverHP((int)(double)this._owner.MaxHp);
            this._owner.breakDetail.RecoverBreakLife(this._owner.MaxBreakLife);
            this._owner.breakDetail.nextTurnBreak = false;
            this._owner.breakDetail.RecoverBreak(this._owner.breakDetail.GetDefaultBreakGauge());
            this._owner.cardSlotDetail.LosePlayPoint(this._owner.cardSlotDetail.GetMaxPlayPoint());
            if (Singleton <StageController> .Instance.IsLogState())
            {
                this._owner.battleCardResultLog?.SetNewCreatureAbilityEffect("7_C/FX_IllusionCard_7_C_Particle", 3f);
                this._owner.battleCardResultLog?.SetCreatureEffectSound("CreatureOzma_FarAtk");
            }
            else
            {
                SingletonBehavior <DiceEffectManager> .Instance.CreateNewFXCreatureEffect("7_C/FX_IllusionCard_7_C_Particle", 1f, this._owner.view, this._owner.view, 3f);

                SoundEffectPlayer.PlaySound("CreatureOzma_FarAtk");
            }
            return(true);
        }
Пример #27
0
        public void UpdateGameLogic(GameTime gameTime)
        {
            SoundEffectPlayer.ProcessSoundEvents();

            foreach (IRenderNode node in Layer1.ToArray())
            {
                node.Update(gameTime);
            }

            foreach (IRenderNode node in Layer2.ToArray())
            {
                node.Update(gameTime);
            }

            foreach (IRenderNode node in Layer3.ToArray())
            {
                node.Update(gameTime);
            }

            foreach (IRenderNode node in Layer4.ToArray())
            {
                node.Update(gameTime);
            }

            foreach (IRenderNode node in Layer5.ToArray())
            {
                node.Update(gameTime);
            }
        }
Пример #28
0
    //Pause function added to the move (ends)

	public void Start()
	{
	    try
	    {
            _pauseMenuPanel = Helper.Find<RectTransform>("PauseMenuPanel");
            _pauseMenuStartLocation = _pauseMenuPanel.rect.yMin;
	    }
	    catch (Exception)
	    {
            //Continue with bussiness as usual...
            //Detta händer om det inte finns någon paus-meny och knapp
	    }
        
		_mover = GetComponent<Mover>();
		_rotation = GetComponentInChildren<Rotation>();

		Floor floor = Helper.Find<Floor>("Floor");
		_gridManager = floor.GridManager;
		_pathFinder = new PathFinder(_gridManager);
        
        //Audio related
		_lockAudioSourceLocation = this.gameObject.transform.rotation;
	    _audioComponent = this.gameObject.transform.FindChild("AudioComponent").gameObject;
        _avatarSoul = GameObject.Find("AvatarSoul");

	    if (_avatarSoul != null)        //ADD soul if it is multiple characters
	    {
	        _soulMover = _avatarSoul.GetComponentInChildren<SoulMover>();

            //Om det finns en soul ta bort audio listener och ljus på avatar
            AudioListener audioList = GetComponent<AudioListener>();
	        Light lightOnChar = GetComponentInChildren<Light>();

	        if (audioList != null)
	        {
	            audioList.enabled = false;
	        }
	        if (lightOnChar != null)
	        {
	            lightOnChar.enabled = false;
	        }
	    }

	    _soundEffectPlayer = GetComponentInChildren<SoundEffectPlayer>();
        
		AvatarStates avatarStates = new AvatarStates(gameObject);
		_stateMachine = avatarStates.GetStateMachine();
	}