Пример #1
0
        public void TestFirePrimary()
        {
            FirePrimary fp    = new FirePrimary();
            bool        first = fp.shoot();

            Assert.False(first);
        }
    // Use this for initialization
    void Start()
    {
        firePrimary       = GetComponent <FirePrimary>();
        fireTractorBullet = GetComponent <FireTractorBullet>();
        CapsuleCollider barrelCapsule = GetComponentInChildren <CapsuleCollider>();

        maxBarrelLength = (barrelCapsule.height + barrelCapsule.radius) * barrelCapsule.gameObject.transform.lossyScale.y;
        player          = GameObject.FindGameObjectWithTag("Player").transform.root.gameObject;
    }
 public void TestFirePrimary()
 {
     FirePrimary fp = new FirePrimary();
     bool first = fp.shoot();
     Assert.False(first);
 }
 // Use this for initialization
 void Start()
 {
     firePrimary = GetComponent<FirePrimary>();
     fireTractorBullet = GetComponent<FireTractorBullet>();
     CapsuleCollider barrelCapsule = GetComponentInChildren<CapsuleCollider>();
     maxBarrelLength = (barrelCapsule.height+barrelCapsule.radius)*barrelCapsule.gameObject.transform.lossyScale.y;
     player = GameObject.FindGameObjectWithTag("Player").transform.root.gameObject;
 }