Example #1
0
    void CalculateStats()
    {
        TowerBase   t_base   = tower_base.GetComponent <TowerBase>();
        TowerTurret t_turret = tower_turret.GetComponent <TowerTurret>();
        TowerCore   t_core   = tower_core.GetComponent <TowerCore>();

        shot_rate   = shot_rate_base * t_base.firerate_ratio * t_turret.firerate_ratio;
        shot_radius = shot_radius_base * t_turret.radius_ratio;
        shot_damage = (int)(shot_damage_base * t_turret.damage_ratio);
        bullet_type = t_core.bullet_type;
    }
Example #2
0
 public void BindTower(TowerCore tc)
 {
     bulletCore.belongTower = tc;
 }
Example #3
0
 private void Awake()
 {
     towerCore  = new TowerCore();
     preAtkTime = 0;
     BuildComplete();    //测试:暂时先设为一出现就建造完毕
 }