Пример #1
0
 public void RunOvercharge()
 {
     ghostCharacter.RunShock();
     explodeParticleSystem.Play();
     burstParticleSystem.Play();
     SoundManager.PlaySound(SoundManager.SoundType.SoundFX, overchargeSound, 1.0f, Random.Range(0.75f, 1.25f));
     CameraCtrl.Shake(0.15f, 50.0f);
 }
Пример #2
0
    public void RunDashFX()
    {
        dashRenderer.emitting = true;
        dashParticleSystem.Play();
        var emission = dashParticleSystem.emission;

        emission.enabled = true;
        CameraCtrl.Shake(0.15f, 20.0f);
        eyesBase.localScale = new Vector3(1.5f, 1.5f, 1.0f);
    }
Пример #3
0
    void JoinPlayer(OneButton button)
    {
        Character newChar = Instantiate(characterPrefab, playerSpawnPoint[players.Count].position, Quaternion.identity);

        newChar.playerColor = playerColors[players.Count];
        newChar.button      = button;
        newChar.playerId    = players.Count;
        newChar.RunSpawnFX();

        playerScores[players.Count].gameObject.SetActive(true);
        playerScores[players.Count].color = newChar.playerColor;

        uiBars[players.Count].gameObject.SetActive(true);
        uiBars[players.Count].character = newChar;

        newChar.uiBar = uiBars[players.Count];

        players.Add(newChar);

        CameraCtrl.Shake(0.15f, 20.0f);

        SoundManager.PlaySound(SoundManager.SoundType.SoundFX, playerJoinSound, 1, 1 + 0.05f * players.Count);
    }
Пример #4
0
    private void OnTriggerEnter2D(Collider2D collision)
    {
        if (isDead)
        {
            return;
        }

        Character character = collision.GetComponent <Character>();

        if (character)
        {
            if (character.isDead)
            {
                return;
            }

            isDead = true;
            GetComponentInChildren <ParticleSystem>().Play();
            GetComponentInChildren <Animator>().SetTrigger("Explode");
            character.DealDamage(gameParams.blockDamage);
            CameraCtrl.Shake(0.1f, 20.0f);
            SoundManager.PlaySound(SoundManager.SoundType.SoundFX, sound, 1.0f, Random.Range(0.8f, 1.2f));
        }
    }