void currentBulletMethod() { currentBullet = ams_GunManagement.currentBullet; currentBulletScript = currentBullet.GetComponent <AMS_Bullet>(); if (currentBulletScript == null) { currentBulletScript = currentBullet.GetComponentInChildren <AMS_Bullet>(); } currentBulletContactDamage = currentBulletScript.contactDamage; }
//public int Gun1BulletContactDamage; //public int Gun2BulletContactDamage; // public int TempBulletContactDamage; // public GameObject TempbulletObject; // Start is called before the first frame update void Start() { ams_GunManagement = GameObject.Find("MainPlayer").GetComponent <AMS_GunManagement>(); // Gun1Bullet = ams_GunManagement.gun1Bullet; // Gun2Bullet = ams_GunManagement.gun2Bullet; currentBullet = ams_GunManagement.currentBullet; currentBulletScript = currentBullet.GetComponent <AMS_Bullet>(); currentBulletContactDamage = currentBulletScript.contactDamage; // ams_Bullet1Script = Gun1Bullet.GetComponent<AMS_Bullet>(); // Gun1BulletContactDamage = ams_Bullet1Script.contactDamage; }