Beispiel #1
0
        void Start()
        {
            _player = Player.Instance;
            _shield = Player.Instance.ShieldComponent;

            if (gameObject.tag == "EnemyBullet"){
                Speed /= (int)2; // Slow enemy bullets
                Damage /= (int)2; // Weak enemy bullets
            }

            //transform.GetComponent<SpriteRenderer>().sprite.texture.
            //transform.rotation = new Quaternion(0f,0f,0f,344f);
            transform.Rotate(0, 0, Rotation);

            SoundManager.Instance.Play(SoundManager.Instance.BulletSound);
        }
Beispiel #2
0
        void Start()
        {
            ShieldComponent = gameObject.GetComponent<Shield>();
            MeshComponent = gameObject.transform.FindChild("Mesh").GetComponent<MeshRenderer>();

            gameObject.AddComponent<BulletFactory>().Init(
                new List<Weapon>()
                {
                    new Weapon("Bullet", "L"),
                    new Weapon("Gattling", "U"),
                    new Weapon("Bullet", "R"),
                }, false);
            StartCoroutine(ShieldComponent.ReplenishShields());
        }