Esempio n. 1
0
 void Awake()
 {
     fireMech    = GetComponent <FireMechanism>();
     ammoSys     = GetComponent <AmmoSystem>();
     drawRelease = GetComponent <DrawReleaseScript>();
     reloadable  = GetComponent <IReloadable>();
 }
Esempio n. 2
0
 void Awake()
 {
     fireMech    = GetComponent <FireMechanism>();
     ammoSys     = GetComponent <AmmoSystem>();
     recoil      = GetComponent <RecoilBase>();
     scopeStatus = GetComponent <IScopeStatus>();
     scope       = GetComponent <ScopeBase>();
     reloadable  = GetComponent <IReloadable>();
 }
 // Use this for initialization
 private void Start()
 {
     text         = GetComponent <Text>();
     inputhandler = FindObjectOfType <InputHandler>();
     overheating  = FindObjectOfType <OverHeating>();
     ammosystem   = FindObjectOfType <AmmoSystem>();
     manager      = FindObjectOfType <EnemyManager>();
     timer        = FindObjectOfType <Timer>();
     player       = FindObjectOfType <Player>();
     sound        = FindObjectOfType <SoundManager>();
     RenderSettings.skybox.SetFloat("_Rotation", 0);
 }
Esempio n. 4
0
    // Use this for initialization
    private void Start()
    {
        for (int i = 0; i < Enum.GetNames(typeof(UIPanel)).Length; ++i)
        {
            UILIST[i].SetActive(false);
            uilist[i] = UILIST[i];
        }

        inputhandler = FindObjectOfType <InputHandler>();
        overheating  = FindObjectOfType <OverHeating>();
        ammosystem   = FindObjectOfType <AmmoSystem>();
        manager      = FindObjectOfType <EnemyManager>();
        timer        = FindObjectOfType <Timer>();

        BlurEffect         = Camera.main.gameObject.GetComponent <UnityStandardAssets.ImageEffects.BlurOptimized>();
        BlurEffect.enabled = false;
    }
Esempio n. 5
0
        /*public List<Bullet> Bullets
         * {
         *  get
         *  {
         *      return bullets;
         *  }
         * }*/


        public Player(ChopperBase basicChopper, Vector2 position)
        {
            /*hitRadius = sprite.Texture.Width;
             *
             * if (hitRadius < sprite.Texture.Height)
             * {
             *  hitRadius = sprite.Texture.Height;
             * }
             * hitRadius /= 2;*/

            //this.sprite = sprite;

            /*chopperBase = ChopperList.GetChopper(0);
             * chopperBase.SnapCenter(position);*/
            chopperBase = basicChopper;
            chopperBase.SnapCenter(position);

            //bullets = new List<Bullet>();

            //this.weaponSystem = weaponSystem;

            alive = true;

            deathTimer = new Timer(3);

            landTimer = new Timer(2);

            fuelSystem = new FuelSystem(1000000, 1000000);
            ammoSystem = new AmmoSystem(1000, 1000);

            healthSystem = new HealthSystem(2000, 2000);

            effects = new List <EffectManager>();

            /*fuelSystem = new FuelSystem(10000, 10000);
             * ammoSystem = new AmmoSystem(10, 10);*/
        }