// Use this for initialization
 void Start()
 {
     controller = gameObject.GetComponent<WeaponControllerCarter>();
     playerController = gameObject.GetComponent<PlayerController>();
     playerAmmo = gameObject.GetComponent<PlayerAmmo>();
     listener = GetComponent<AudioSource>();
 }
 // Use this for initialization
 void Start()
 { 
     nextBulletTimer = nextBulletTimerBase;
     playerController = gameObject.GetComponent<PlayerController>();
     playerAmmo = gameObject.GetComponent<PlayerAmmo>();
     listener = gameObject.GetComponent<AudioSource>();
 }
        public float timerCancelFireAfterReload = 0.5f; // Timer set. TODO : match with the sound's time of reloading

        void Awake()
        {
            playerAmmo = gameObject.GetComponent<PlayerAmmo>();
            doubleGuns = gameObject.GetComponent<WeaponDoubleGuns>();
            flamethrower = gameObject.GetComponent<WeaponFlamethrower>();
            playerController = gameObject.GetComponent<PlayerController>();
        }
        // Use this for initialization
        void Start()
        {
            m_camera = GameController.TopDownCamera;
            m_player = GameController.Player;
            m_notificationColor.a = 255;
            if (useTriggerGoScript)
            {
                trigger = GetComponent<TriggerGameObject>();
                if (trigger == null) Debug.Log("If you checked \"useTriggerGoScript\" you must add a TriggerGameObjectScript to this game object.");
            }

        }
示例#5
0
        protected override void OnLoot(PlayerController entity)
        {
            if (entity.RepairArmor(amount))
            {
                Destroy(gameObject);
                GameController.NotifyPlayer("Armor +" + amount, Color.green, 2);
            }

            else
            {
                GameController.NotifyPlayer("Armor full", Color.green, 2);
            }
        }
示例#6
0
        protected override void OnLoot(PlayerController entity)
        {
            if (entity.Heal(amount))
            {
                Destroy(gameObject);
                GameController.NotifyPlayer("Health +" + amount, Color.green, 2);
            }

            else
            {
                GameController.NotifyPlayer("Health full", Color.green, 2);
            }
        }
        public float timerCancelFireAfterReload = 0.5f; // Timer set

        void Awake()
        {
            playerAmmo = gameObject.GetComponent<PlayerAmmo>();
            assaultRifle = gameObject.GetComponent<WeaponAssaultRifle>();
            playerController = gameObject.GetComponent<PlayerController>();
        }