Example #1
0
    private void OnCollisionEnter2D(Collision2D collision)
    {
        if (collision.gameObject.tag == "PlayerBullet")
        {
            Destroy(collision.gameObject);

            if (ProjectileType == Type.Positive || ProjectileType == Type.PassAggressive)
            {
                if (ProjectileType == Type.PassAggressive)
                {
                    AudioManager.Play("Bloop");
                    SpawnDestroyedParticles();
                }
                ProjectileType        = Type.Positive;
                AttachedTextMesh.text = ArgumentText.GetLine("Positive", spawnedBy, convoIndex);
                GetComponent <Rigidbody2D>().velocity        = Vector2.zero;
                GetComponent <Rigidbody2D>().angularVelocity = 0f;
                SetColor();
            }
            else
            {
                if (ProjectileType == Type.Neutral)
                {
                    //shot down neutral - notify talking head
                    AudioManager.Play("SHH");
                    TalkingHeadManager.Instance.NotifyWasInterrupted(SpawnedBy);
                }
                SpawnDestroyedParticles();
                AudioManager.Play("BrainSlat");
                Destroy(gameObject);
            }
        }
    }
Example #2
0
    private void SetUpText()
    {
        switch (ProjectileType)
        {
        case Type.Angry:
            AttachedTextMesh.text = ArgumentText.GetLine("Angery", spawnedBy, convoIndex);
            break;

        case Type.PassAggressive:
            AttachedTextMesh.text = ArgumentText.GetLine("PassAggressive", spawnedBy, convoIndex);
            break;

        case Type.Neutral:
            AttachedTextMesh.text = ArgumentText.GetLine("Neutral", spawnedBy, convoIndex);
            break;

        case Type.Positive:
            AttachedTextMesh.text = ArgumentText.GetLine("Positive", spawnedBy, convoIndex);
            break;
        }
    }