コード例 #1
0
 public override void Initialize()
 {
     sc  = gs.GetComponent <SlideComponent>();
     cc  = gs.GetComponent <ChamberComponent>();
     mc  = gs.GetComponent <MagazineComponent>();
     mlc = gs.GetComponent <ManualLoadingComponent>();
 }
コード例 #2
0
 // Use this for initialization
 void Start()
 {
     baseComp   = GetComponentInChildren <BaseComponent>();
     mainComp   = GetComponentInChildren <MainComponent>();
     barrelComp = mainComp.gameObject.GetComponentInChildren <BarrelComponent>();
     magComp    = GetComponentInChildren <MagazineComponent>();
     CalculateDamage();
     shootCD = mainComp.fireCooldown;
 }
コード例 #3
0
 public override void Initialize()
 {
     asc = gs.GetComponent <AlternativeStanceComponent>();
     sc  = gs.GetComponent <SlideComponent>();
     mc  = gs.GetComponent <MagazineComponent>();
     cc  = gs.GetComponent <ChamberComponent>();
     lbc = gs.GetComponent <LockableBoltComponent>();
     mlc = gs.GetComponent <ManualLoadingComponent>();
     rcc = gs.GetComponent <RevolverCylinderComponent>();
 }
コード例 #4
0
ファイル: GunScript.cs プロジェクト: davidgfb/7DFPS
    /// <summary> Connect a magazine to the GunSystems and notifies the Systems to handle it from now on </summary>
    public bool InsertMag(GameObject mag)
    {
        MagazineComponent mc = GetComponent <MagazineComponent>();

        if (!mc)
        {
            return(false);
        }

        // Set this mag as mag to insert
        mc.mag_script        = mag.GetComponent <mag_script>();
        mag.transform.parent = transform;

        // Tell the systems to push the mag in
        return(Request(GunSystemRequests.INPUT_INSERT_MAGAZINE));
    }
コード例 #5
0
ファイル: GunScript.cs プロジェクト: davidgfb/7DFPS
    /// <summary> Disconnect the magazine from the GunSystems and returns the disconnected GameObject </summary>
    public GameObject GrabMag()
    {
        MagazineComponent mc = GetComponent <MagazineComponent>();

        if (!mc || !mc.mag_script)
        {
            return(null);
        }

        // Grag mag reference
        GameObject mag = mc.mag_script.gameObject;

        // Disconnect mag from systems
        mc.mag_script          = null;
        mc.ready_to_remove_mag = false;
        mag.transform.parent   = null;

        return(mag);
    }
コード例 #6
0
 public override void Initialize()
 {
     acavc = gs.GetComponent <AmmoCountAnimatorVisualComponent>();
     mc    = gs.GetComponent <MagazineComponent>();
 }
コード例 #7
0
 public override void Initialize()
 {
     mc  = gs.GetComponent <MagazineComponent>();
     emc = gs.GetComponent <ExternalMagazineComponent>();
 }