void CreateBullet(){
float b1 = (bullet.GetComponent<BulletFather>().CurrSpeed / bullet.GetComponent<BulletFather>().Speed) - 1;
float b2 = ((float)bullet.GetComponent<BulletFather>().CurrAtt / bullet.GetComponent<BulletFather>().Att) - 1;
}
void CreateBullet(){
BulletFather BulFather = bullet.GetComponent<BulletFather>();
float b1 = (BulFather.CurrSpeed / BulFather.Speed) - 1;
float b2 = (BulFather.CurrAtt /BulFather.Att) - 1;
}
第二个代码是不是更加节约性能