Exemplo n.º 1
0
            void EvaluateBody(GunBody body)
            {
                fireMode   = body.fireMode;
                burstCount = body.burstCount;

                fireRate        += body.fireRate;
                projectileSpeed += body.muzzleVelocity;
                damage          += body.damage;
            }
Exemplo n.º 2
0
            public void Evaluate(GunBody body, GunBarrel barrel,
                                 Projectile projectile)
            {
                fireRate        = 0;
                projectileSpeed = 0;
                damage          = 0;

                EvaluateBody(body);
                EvaluateBarrel(barrel);
                EvaluateProjectile(projectile);
            }
Exemplo n.º 3
0
        void Awake()
        {
            player = GameManager.Instance.GetPlayerController();

            // instantiate body and barrel instances as children
            // and also replace the prefabs with the actual instances
            body   = Instantiate(body, transform) as GunBody;
            barrel = Instantiate(barrel, transform) as GunBarrel;

            stats = new EffectiveGunStats();
            stats.Evaluate(body, barrel, projectile);
        }