示例#1
0
文件: Gun.cs 项目: noc7c9/code-red-II
            void EvaluateBarrel(GunBarrel barrel)
            {
                projectileSpawnPoints = barrel.projectileSpawnPoints;

                fireRate        += barrel.fireRate;
                projectileSpeed += barrel.muzzleVelocity;
                damage          += barrel.damage;
            }
示例#2
0
文件: Gun.cs 项目: noc7c9/code-red-II
            public void Evaluate(GunBody body, GunBarrel barrel,
                                 Projectile projectile)
            {
                fireRate        = 0;
                projectileSpeed = 0;
                damage          = 0;

                EvaluateBody(body);
                EvaluateBarrel(barrel);
                EvaluateProjectile(projectile);
            }
示例#3
0
文件: Gun.cs 项目: noc7c9/code-red-II
        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);
        }