Play() публичный Метод

public Play ( string name ) : void
name string
Результат void
Пример #1
0
 public void CloseBuildMenu()
 {
     _ = SoundManager.Play(CommonSounds.Instance.Click01);
     transform.GetChild(0).gameObject.SetActive(false);
 }
Пример #2
0
        /// <summary>
        /// Called when X button is clicked
        /// </summary>
        public void OnClickExit()
        {
            _ = SoundManager.Play(SingletonSOSounds.Instance.Click01);

            Reset();
        }
Пример #3
0
 public void Resist()
 {
     SoundManager.Play("Click01");
     Debug.Log("Resist Button");
 }
Пример #4
0
 //called when the buckled button is clicked
 public void OnClickCuffed()
 {
     PlayerManager.PlayerScript.playerNetworkActions.CmdTryUncuff();
     SoundManager.Play(SingletonSOSounds.Instance.Click01);
 }
Пример #5
0
 /// <summary>
 /// Called when mag boots mode action button is pressed
 /// </summary>
 public void OnClickMagBoots()
 {
     SoundManager.Play(SingletonSOSounds.Instance.Click01);
     magBootsAction?.Invoke();
 }
Пример #6
0
 public void Issues_btn()
 {
     Application.OpenURL("https://github.com/unitystation/unitystation/issues");
     _ = SoundManager.Play(CommonSounds.Instance.Click01);
 }
Пример #7
0
 public void OnChatCancel()
 {
     SoundManager.Play("Click01");
     InputFieldChat.text = "";
     CloseChatWindow();
 }
Пример #8
0
 public void OnChatCancel()
 {
     SoundManager.Play(SingletonSOSounds.Instance.Click01);
     InputFieldChat.text = "";
     CloseChatWindow();
 }
    void Update()
    {
        RaycastHit hit;
        Vector3    position = shootPoint.position;

        position.y += 1;                // Adjust height differences

        if (Physics.Raycast(position, transform.TransformDirection(Vector3.forward * detectRange), out hit, detectRange))
        {
            if (hit.transform.tag == "Shop")
            {
                Shop     shop          = hit.transform.GetComponent <Shop>();
                ShopType shopType      = shop.shopType;
                string   shopTitle     = shop.title;
                string   shopDesc      = shop.description;
                int      shopPrice     = shop.price;
                bool     isPurchasable = true;

                WeaponManager weaponManager = transform.parent.gameObject.GetComponent <WeaponManager>();
                WeaponBase    weaponBase    = weaponManager.currentWeaponGO.GetComponent <WeaponBase>();
                Weapon        weapon        = weaponManager.currentWeapon;
                Player        player        = transform.parent.GetComponent <Player>();

                if (shopType == ShopType.AMMO)
                {
                    shopPrice     = GetAmmoCost(weapon, weaponBase);
                    shopText.text = shopTitle + "\n(" + shopPrice + "$)\n\n" + shopDesc + "\n\n";
                }
                else if (shopType == ShopType.HEAL)
                {
                    shopPrice     = 100 + (75 * healUsed);
                    shopText.text = shopTitle + "\n(" + shopPrice + "$)\n\n" + shopDesc + "\n\n";
                }
                else if (shopType == ShopType.UPGRADE_HEALTH)
                {
                    int upgraded = player.upgradeHealth;

                    if (upgraded < 10)
                    {
                        shopPrice     = 100 + (upgraded * 90);
                        shopText.text = shopTitle + " Lv" + (upgraded + 1) + "\n(" + shopPrice + "$)\n\n" + shopDesc + "\n\n";
                    }
                    else
                    {
                        isPurchasable = false;
                        shopText.text = "You are fully upgraded.";
                    }
                }
                else if (shopType == ShopType.UPGRADE_REGENERATION)
                {
                    int upgraded = player.upgradeRegeneration;

                    if (upgraded < 10)
                    {
                        shopPrice     = 100 + (upgraded * 70);
                        shopText.text = shopTitle + " Lv" + (upgraded + 1) + "\n(" + shopPrice + "$)\n\n" + shopDesc + "\n\n";
                    }
                    else
                    {
                        isPurchasable = false;
                        shopText.text = "You are fully upgraded.";
                    }
                }
                else if (shopType == ShopType.UPGRADE_DAMAGE)
                {
                    int upgraded = weaponBase.upgradeDamage;

                    if (upgraded < 10)
                    {
                        shopPrice     = GetUpgradeCost(weaponManager.currentWeapon, weaponBase, upgraded);
                        shopText.text = shopTitle + " Lv" + (upgraded + 1) + "\n(" + shopPrice + "$)\n\n" + shopDesc + "\n\n";
                    }
                    else
                    {
                        isPurchasable = false;
                        shopText.text = "Your weapon is fully upgraded.";
                    }
                }
                else if (shopType == ShopType.UPGRADE_RELOAD)
                {
                    int upgraded = weaponBase.upgradeReload;

                    if (upgraded < 10)
                    {
                        shopPrice     = GetUpgradeCost(weaponManager.currentWeapon, weaponBase, upgraded);
                        shopText.text = shopTitle + " Lv" + (upgraded + 1) + "\n(" + shopPrice + "$)\n\n" + shopDesc + "\n\n";
                    }
                    else
                    {
                        isPurchasable = false;
                        shopText.text = "Your weapon is fully upgraded.";
                    }
                }
                else if (shopType == ShopType.UPGRADE_RECOIL)
                {
                    int upgraded = weaponBase.upgradeRecoil;

                    if (upgraded < 10)
                    {
                        shopPrice     = GetUpgradeCost(weaponManager.currentWeapon, weaponBase, upgraded);
                        shopText.text = shopTitle + " Lv" + (upgraded + 1) + "\n(" + shopPrice + "$)\n\n" + shopDesc + "\n\n";
                    }
                    else
                    {
                        isPurchasable = false;
                        shopText.text = "Your weapon is fully upgraded.";
                    }
                }
                else if (shopType == ShopType.UPGRADE_MAGAZINE)
                {
                    int upgraded = weaponBase.upgradeMag;

                    if (upgraded < 10)
                    {
                        shopPrice     = GetUpgradeCost(weaponManager.currentWeapon, weaponBase, upgraded);
                        shopText.text = shopTitle + " Lv" + (upgraded + 1) + "\n(" + shopPrice + "$)\n\n" + shopDesc + "\n\n";
                    }
                    else
                    {
                        isPurchasable = false;
                        shopText.text = "Your weapon is fully upgraded.";
                    }
                }
                else if (shopType == ShopType.UPGRADE_MAX_AMMO)
                {
                    int upgraded = weaponBase.upgradeMaxAmmo;

                    if (upgraded < 10)
                    {
                        shopPrice     = GetUpgradeCost(weaponManager.currentWeapon, weaponBase, upgraded);
                        shopText.text = shopTitle + " Lv" + (upgraded + 1) + "\n(" + shopPrice + "$)\n\n" + shopDesc + "\n\n";
                    }
                    else
                    {
                        isPurchasable = false;
                        shopText.text = "Your weapon is fully upgraded.";
                    }
                }
                else
                {
                    shopText.text = shopTitle + "\n(" + shopPrice + "$)\n\n" + shopDesc + "\n\n";
                }

                if (isPurchasable && Input.GetKeyDown(KeyCode.F))
                {
                    FundSystem fundSystem = transform.parent.GetComponent <FundSystem>();
                    int        fund       = fundSystem.GetFund();

                    if (fund < shopPrice)
                    {
                        PrintWarning("Not enough money!");
                    }
                    else
                    {
                        bool wasPurchased = true;

                        if (shopType == ShopType.AMMO)
                        {
                            if (weaponBase.bulletsLeft >= (weaponBase.maxAmmo + weaponBase.bulletsPerMag))
                            {
                                wasPurchased = false;
                                PrintWarning("You have full ammo.");
                            }
                            else
                            {
                                weaponBase.bulletsLeft = weaponBase.maxAmmo + weaponBase.bulletsPerMag;
                                weaponBase.UpdateAmmoText();
                            }
                        }
                        else if (shopType == ShopType.HEAL)
                        {
                            HealthManager healthManager = transform.parent.GetComponent <HealthManager>();

                            if (healthManager.Health >= healthManager.MaxHealth)
                            {
                                wasPurchased = false;
                                PrintWarning("You have full health.");
                            }
                            else
                            {
                                healthManager.Heal();
                                healUsed++;
                            }
                        }
                        else if (shopType == ShopType.UPGRADE_HEALTH)
                        {
                            HealthManager healthManager   = transform.parent.GetComponent <HealthManager>();
                            float         addtionalHealth = 17f;

                            healthManager.SetHealth(healthManager.Health + addtionalHealth);
                            healthManager.SetMaxHealth(healthManager.MaxHealth + addtionalHealth);

                            player.upgradeHealth++;
                        }
                        else if (shopType == ShopType.UPGRADE_REGENERATION)
                        {
                            if (player.upgradeRegeneration <= 0)
                            {
                                player.ActivateHealthRegeneration();
                            }

                            player.upgradeRegeneration++;
                        }
                        else if (shopType == ShopType.WEAPON_MP5K)
                        {
                            if (!weaponManager.HasWeapon(Weapon.MP5K))
                            {
                                BuyPrimaryWeapon(Weapon.MP5K);
                            }
                            else
                            {
                                wasPurchased = false;
                                PrintWarning("You already have weapon.");
                            }
                        }
                        else if (shopType == ShopType.WEAPON_PYTHON)
                        {
                            if (!weaponManager.HasWeapon(Weapon.Python))
                            {
                                BuySecondaryWeapon(Weapon.Python);
                            }
                            else
                            {
                                wasPurchased = false;
                                PrintWarning("You already have weapon.");
                            }
                        }
                        else if (shopType == ShopType.WEAPON_UMP45)
                        {
                            if (!weaponManager.HasWeapon(Weapon.UMP45))
                            {
                                BuyPrimaryWeapon(Weapon.UMP45);
                            }
                            else
                            {
                                wasPurchased = false;
                                PrintWarning("You already have weapon.");
                            }
                        }
                        else if (shopType == ShopType.WEAPON_AKM)
                        {
                            if (!weaponManager.HasWeapon(Weapon.AKM))
                            {
                                BuyPrimaryWeapon(Weapon.AKM);
                            }
                            else
                            {
                                wasPurchased = false;
                                PrintWarning("You already have weapon.");
                            }
                        }
                        else if (shopType == ShopType.WEAPON_M870)
                        {
                            if (!weaponManager.HasWeapon(Weapon.M870))
                            {
                                BuyPrimaryWeapon(Weapon.M870);
                            }
                            else
                            {
                                wasPurchased = false;
                                PrintWarning("You already have weapon.");
                            }
                        }
                        else if (shopType == ShopType.UPGRADE_DAMAGE)
                        {
                            if (weaponBase.upgradeDamage >= 10)
                            {
                                wasPurchased = false;
                                PrintWarning("Your weapon is fully upgraded.");
                            }
                            else
                            {
                                UpgradeWeapon(weaponBase, ShopType.UPGRADE_DAMAGE);
                                weaponBase.upgradeSpent += shopPrice;
                            }
                        }
                        else if (shopType == ShopType.UPGRADE_RELOAD)
                        {
                            if (weaponBase.upgradeReload >= 10)
                            {
                                wasPurchased = false;
                                PrintWarning("Your weapon is fully upgraded.");
                            }
                            else
                            {
                                UpgradeWeapon(weaponBase, ShopType.UPGRADE_RELOAD);
                                weaponBase.upgradeSpent += shopPrice;
                            }
                        }
                        else if (shopType == ShopType.UPGRADE_RECOIL)
                        {
                            if (weaponBase.upgradeRecoil >= 10)
                            {
                                wasPurchased = false;
                                PrintWarning("Your weapon is fully upgraded.");
                            }
                            else
                            {
                                UpgradeWeapon(weaponBase, ShopType.UPGRADE_RECOIL);
                                weaponBase.upgradeSpent += shopPrice;
                            }
                        }
                        else if (shopType == ShopType.UPGRADE_MAGAZINE)
                        {
                            if (weaponBase.upgradeMag >= 10)
                            {
                                wasPurchased = false;
                                PrintWarning("Your weapon is fully upgraded.");
                            }
                            else
                            {
                                UpgradeWeapon(weaponBase, ShopType.UPGRADE_MAGAZINE);
                                weaponBase.upgradeSpent += shopPrice;
                            }
                        }
                        else if (shopType == ShopType.UPGRADE_MAX_AMMO)
                        {
                            if (weaponBase.upgradeMaxAmmo >= 10)
                            {
                                wasPurchased = false;
                                PrintWarning("Your weapon is fully upgraded.");
                            }
                            else
                            {
                                UpgradeWeapon(weaponBase, ShopType.UPGRADE_MAX_AMMO);
                                weaponBase.upgradeSpent += shopPrice;
                            }
                        }
                        else
                        {
                            wasPurchased = false;
                        }

                        if (wasPurchased)
                        {
                            fundSystem.TakeFund(shopPrice);
                            SoundManager soundManager = transform.Find("SoundManager").GetComponent <SoundManager>();
                            soundManager.Play(purchasedSound);
                        }
                    }
                }
            }
        }
        else
        {
            shopText.text = "";
        }
    }
Пример #10
0
 /// <summary>
 /// Called when the switch pickup mode action button is pressed
 /// </summary>
 public void OnClickSwitchPickupMode()
 {
     PlayerManager.PlayerScript.playerNetworkActions.CmdSwitchPickupMode();
     SoundManager.Play("Click01");
 }
Пример #11
0
 void OnDraw()
 {
     soundManager.Play(boltSound);
 }
Пример #12
0
 //called when the buckled button is clicked
 public void OnClickCuffed()
 {
     PlayerManager.PlayerScript.playerNetworkActions.CmdTryUncuff();
     SoundManager.Play("Click01");
 }
Пример #13
0
 //invoked when the restrained alert is clicked
 public void OnClickAlertRestrained()
 {
     SoundManager.Play("Click01");
     onClickBuckled?.Invoke();
 }
Пример #14
0
 public void CheckAgain()
 {
     SoundManager.Play("Click01", 1, 1, 0);
     errorWindow.SetActive(false);
     StartCoroutine(CheckVersion());
 }
Пример #15
0
 public void Reddit_btn()
 {
     Application.OpenURL("https://reddit.com/r/unitystation");
     _ = SoundManager.Play(CommonSounds.Instance.Click01);
 }
Пример #16
0
    /**
     * Updates the active states of the game.
     *
     * Usualy only the topmost state is draw and updated.  However any state with backgroundUpdate enabled will be updated even if not topmost.
     *
     */
    public virtual void DoUpdate()
    {
        GameTime += Time.deltaTime;

        Mouse.Update();

        bool ctrl  = Input.GetKey(KeyCode.LeftControl) || Input.GetKey(KeyCode.RightControl);
        bool alt   = Input.GetKey(KeyCode.LeftAlt) || Input.GetKey(KeyCode.RightAlt);
        bool shift = Input.GetKey(KeyCode.LeftShift) || Input.GetKey(KeyCode.RightShift);

        processKeys(ctrl, alt, shift);

        FPSCounter.addSample(Time.deltaTime);

        if (notificationDelayTimer > 0)
        {
            notificationDelayTimer -= Time.deltaTime;
        }

        // add any notifications, 1 at a time.
        if ((notificationDelayTimer <= 0) && (pendingNotifications.Count >= 1))
        {
            var notification = new GuiNotification(pendingNotifications[0].Message, pendingNotifications[0].Sprite);
            var soundName    = pendingNotifications[0].SoundName;

            foreach (var existingNotification in notificationList)
            {
                existingNotification.PushDown();
            }
            notificationList.Add(notification);

            if (!string.IsNullOrEmpty(soundName))
            {
                SoundManager.Play(soundName);
            }

            pendingNotifications.RemoveAt(0);
            notificationDelayTimer = NotificationDelay;
        }

        if (StateList.Count == 0)
        {
            return;
        }

        if (Input.GetMouseButtonDown(0))
        {
            ComponentClickedDownOn = StateList[0].GetComponentAtPosition(Mouse.Position);
        }

        if (DragDrop != null)
        {
            DragDrop.Update();
        }

        // Remove disabled states.
        for (int lp = 0; lp < StateList.Count; lp++)
        {
            if (StateList[lp].Active == false)
            {
                StateList.RemoveAt(lp);
                lp--;
                continue;
            }
        }

        // Remove disabled notifications.
        for (int lp = 0; lp < notificationList.Count; lp++)
        {
            if (notificationList[lp].Active == false)
            {
                notificationList.RemoveAt(lp);
                lp--;
                continue;
            }
        }

        // Update topmost state and any background update states.

        StateList[0].Update();

        for (int lp = 1; lp < StateList.Count; lp++)
        {
            var state = StateList[lp];
            if (state.BackgroundUpdate)
            {
                state.Update();
            }
        }

        // Apply global fx (note: I should probably render all UI to a texture and do this once.
        for (int lp = 0; lp < StateList.Count; lp++)
        {
            var state = StateList[lp];

            switch (FXStyle)
            {
            case RenderFXStyle.Normal:
                state.CompositeColorTransform = ColorTransform.Identity;
                state.Color = Color.white;
                break;

            case RenderFXStyle.Retro:
                var a = ColorTransform.Saturation(0.25f);
                var b = ColorTransform.Multiply(new Color(255 / 255f, 235 / 255f, 215 / 255f));
                var c = ColorTransform.Identity;
                c.Matrix = a.Matrix * b.Matrix;
                state.CompositeColorTransform = c;
                break;

            case RenderFXStyle.Sketch:
                a             = ColorTransform.Saturation(0f);
                b             = ColorTransform.Multiply(3f, 3f, 3f);
                c             = ColorTransform.Identity;
                c.Matrix      = a.Matrix * b.Matrix;
                c.ColorOffset = new Vector3(-0.3f, -0.3f, -0.3f);
                state.CompositeColorTransform = c;
                break;

            case RenderFXStyle._Clay:
                state.CompositeColorTransform = ColorTransform.Bronze;
                state.Color = Color.white;
                break;
            }
        }

        // Show FPS label
        if (Time.time - lastFpsUpdate > 0.5f)
        {
            lastFpsUpdate = Time.time;

            FPSLabel.Caption = Settings.Advanced.ShowFPSDetails ? getAdvancedFPSDetails() : getFPSDetails();

            FPSLabel.Width = Settings.Advanced.ShowFPSDetails ? -1 : 100;
        }

        if (Input.GetMouseButtonUp(0))
        {
            ComponentClickedDownOn = null;
        }
    }
Пример #17
0
 public void Discord_btn()
 {
     Application.OpenURL("https://discord.gg/tFcTpBp");
     _ = SoundManager.Play(CommonSounds.Instance.Click01);
 }
Пример #18
0
    void UpdateAnimator(Vector3 move, Action action)
    {
        // update the animator parameters
        if (Mathf.Abs(m_ForwardAmount) > 0.1)
        {
            Debug.Log("Mec");
        }
        m_Animator.SetFloat("Forward", m_ForwardAmount, 0.1f, Time.deltaTime);
        m_Animator.SetFloat("Turn", m_TurnAmount, 0.1f, Time.deltaTime);
        m_Animator.SetBool("Crouch", m_Crouching);
        m_Animator.SetBool("OnGround", m_IsGrounded);
        m_Animator.SetBool("Climb", isClimbing);
        m_Animator.SetBool("GrabTheLedge", grabTheLedge);
        m_Animator.SetBool("Punch", action == Action.punch);
        m_Animator.SetBool("Dash", action == Action.dash && m_IsGrounded);

        if (action == Action.die)
        {
            m_Animator.SetTrigger("Die");
        }


        if (action == Action.throwFrisbeeForward)
        {
            m_Animator.SetBool("Throw", true);
        }
        else
        {
            m_Animator.SetBool("Throw", isChargingFrisbee);
        }



        if (!m_IsGrounded)
        {
            m_Animator.SetFloat("Jump", m_Rigidbody.velocity.y);
        }


        // calculate which leg is behind, so as to leave that leg trailing in the jump animation
        // (This code is reliant on the specific run cycle offset in our animations,
        // and assumes one leg passes the other at the normalized clip times of 0.0 and 0.5)
        float runCycle =
            Mathf.Repeat(
                m_Animator.GetCurrentAnimatorStateInfo(0).normalizedTime + m_RunCycleLegOffset, 1);
        float jumpLeg = (runCycle < k_Half ? 1 : -1) * m_ForwardAmount;

        if (m_IsGrounded)
        {
            m_Animator.SetFloat("JumpLeg", jumpLeg);
        }

        if (m_IsGrounded && lastJumpLeg != jumpLeg && lastWalkSound + walkSoundInterval < Time.time)
        {
            walkSounds.Play("Walk");
            lastWalkSound = Time.time;
        }

        lastJumpLeg = jumpLeg;

        if (m_dashing && !m_Animator.GetCurrentAnimatorStateInfo(0).IsName("Dash"))
        {
            m_dashing = false;
        }

        // the anim speed multiplier allows the overall speed of walking/running to be tweaked in the inspector,
        // which affects the movement speed because of the root motion.
        if (m_IsGrounded && move.magnitude > 0)
        {
            m_Animator.speed = m_AnimSpeedMultiplier;
        }
        else
        {
            // don't use that while airborne
            m_Animator.speed = 1;
        }
    }
Пример #19
0
 public void Patr_btn()
 {
     Application.OpenURL("https://patreon.com/unitystation");
     _ = SoundManager.Play(CommonSounds.Instance.Click01);
 }
Пример #20
0
 public void OnLogin()
 {
     SoundManager.Play("Click01");
     PerformLogin();
 }
Пример #21
0
 //invoked when the restrained alert is clicked
 public void OnClickAlertRestrained()
 {
     SoundManager.Play(SingletonSOSounds.Instance.Click01);
     onClickBuckled?.Invoke();
 }
Пример #22
0
 public void OnExit()
 {
     SoundManager.Play("Click01");
     Application.Quit();
 }
Пример #23
0
 /// <summary>
 /// Called when the switch pickup mode action button is pressed
 /// </summary>
 public void OnClickSwitchPickupMode()
 {
     PlayerManager.PlayerScript.playerNetworkActions.CmdSwitchPickupMode();
     SoundManager.Play(SingletonSOSounds.Instance.Click01);
 }
Пример #24
0
 public void OnShowControlInformationPanel()
 {
     SoundManager.Play("Click01");
     ShowControlInformationPanel();
 }
Пример #25
0
 private void Start()
 {
     soundManager.Play("Explosion");
 }
Пример #26
0
        /// <summary>
        ///  Calls update() on every ship. Checks for input and manages Selecting
        /// and the execution of commands.
        /// </summary>
        public void Update(GameTime gameTime)
        {
            mShipsQuadTree.Clear();
            foreach (var ship in AllShips)
            {
                mShipsQuadTree.Insert(ship);
            }
            mAiShipManager.Update(gameTime, mShipsQuadTree);
            Game1.mMapScreen.EnvironmentManager.Update(mShipsQuadTree);


            //general update for all ships
            for (var i = 0; i < mAllShipList.Count; i++)
            {
                if (mAllShipList[i] is Dragon == false)
                {
                    mAllShipList[i].UpdateMoving(gameTime);
                }

                if (mAllShipList[i].Hp <= 0) // Ship is dead.
                {
                    Game1.mMapScreen.mGridMap.OccupyCell(mAllShipList[i].Position, true);
                    if (!mAllShipList[i].Owned)
                    {
                        mAllShipList[i].DropLoot();
                    }
                    if (mAllShipList[i] is TradingShip)
                    {
                        Game1.mEventScreen.mEventManager.UpdateStatTotal("Trading Ships Destroyed", 1);
                    }
                    else if (mAllShipList[i] is FisherShip)
                    {
                        Game1.mEventScreen.mEventManager.UpdateStatTotal("Fisher Ships Destroyed", 1);
                    }
                    else if (mAllShipList[i] is BattleShip)
                    {
                        Game1.mEventScreen.mEventManager.UpdateStatTotal("War Ships Destroyed", 1);
                    }
                    mAllShipList.RemoveAt(i);
                }
            }

            //Check if any ships were entered by the AI
            for (var i = 0; i < mPlayerShipsList.Count; i++)
            {
                if (!mPlayerShipsList[i].Owned || mPlayerShipsList[i].Hp <= 0)
                {
                    var ship = mPlayerShipsList[i] as BattleShip;
                    if (ship != null)
                    {
                        ship.CurrentBState = BattleShip.ShipBattleState.Idle;
                        mAiShipManager.AiBattleShips.Add(ship);
                    }
                    else if (mPlayerShipsList[i] is TradingShip)
                    {
                        var tShip = (TradingShip)mPlayerShipsList[i];
                        tShip.CurrentBState = TradingShip.ShipBattleState.Idle;
                        mAiShipManager.AiTradingShips.Add(tShip);
                    }
                    mPlayerShipsList.RemoveAt(i);
                }
            }

            if (AttackingShipList.Count > 0 || EnteringShipList.Count > 0)
            {
                //play battlemukke
                SoundManager.Play("background/BattleMusic");
            }
            else
            {
                SoundManager.Stop("background/BattleMusic");
            }

            // Call Update for every Attacking Ship
            UpdateAttackingShips(gameTime);

            //Check for enemy Ships to shoot at while defending(Only defending Ships)
            UpdateDefendingShips(gameTime);

            //Update and Pathrefreshing for Entering Ships
            UpdateEnteringShips(gameTime);

            // update for all ships repairing
            UpdateReparingShips(gameTime);

            /*
             * // If repairingbutton is pressed in HUD set the ships to reparing state.
             * if (!HudScreen.HudScreenInstance.RepairButtonPressed()) return;
             * {
             *  foreach (var ship in mSelectShipList)
             *  {
             *      if (!ship.Owned || mRepairingShipList.Contains(ship)) continue;
             *      ship.Repairing = true;
             *      mRepairingShipList.Add(ship);
             *  }
             * }*/
        }
Пример #27
0
        /// <summary>
        /// Called when expand/collapse button is clicked
        /// </summary>
        public void OnClickExpandCollapse()
        {
            _ = SoundManager.Play(SingletonSOSounds.Instance.Click01);

            expandedView.SetActive(!expandedView.activeSelf);
        }
Пример #28
0
 public void Webs_btn()
 {
     Application.OpenURL("https://unitystation.org");
     _ = SoundManager.Play(CommonSounds.Instance.Click01);
 }
Пример #29
0
 public void OnCharacterButton()
 {
     SoundManager.Play("Click01");
     characterCustomization.SetActive(true);
 }
Пример #30
0
 public void OnPointerClick(PointerEventData eventData)
 {
     SoundManager.Play("Click01");
     UIManager.Hands.SwapItem(itemSlot);
 }