コード例 #1
0
 void assignSecondaryFunction()
 {
     if (_weaponStats.IsADS)
     {
         _ADSFunction = GetComponent <AimDownSight>();
         if (_ADSFunction == null)
         {
             Debug.LogError("No ADS script!");
         }
     }
     else
     {
         _scopeFunction = GetComponent <ScopeIn>();
         if (_scopeFunction == null)
         {
             Debug.LogError("No ScopeIn script!");
         }
     }
 }
コード例 #2
0
        public Sniper()
        {
            placedStipulationCard = new ScopeIn();

            name = "Sniper";
            description = placedStipulationCard.description;
            image = SpriteBase.mainSpriteBase.crosshair;
        }