コード例 #1
0
 // Use this for initialization
 void Start()
 { 
     nextBulletTimer = nextBulletTimerBase;
     playerController = gameObject.GetComponent<PlayerController>();
     playerAmmo = gameObject.GetComponent<PlayerAmmo>();
     listener = gameObject.GetComponent<AudioSource>();
 }
コード例 #2
0
 // Use this for initialization
 void Start()
 {
     controller = gameObject.GetComponent<WeaponControllerCarter>();
     playerController = gameObject.GetComponent<PlayerController>();
     playerAmmo = gameObject.GetComponent<PlayerAmmo>();
     listener = GetComponent<AudioSource>();
 }
コード例 #3
0
        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>();
        }
コード例 #4
0
        // Use this for initialization
        void Start()
        {
            playerAmmo = gameObject.GetComponent<PlayerAmmo>();
            doubleGuns = gameObject.GetComponent<WeaponDoubleGuns>();
            flamethrower = gameObject.GetComponent<WeaponFlamethrower>();

            if (rigWeaponAndArms != null && rigWeaponAndArms.Length > 1)
            {
                //Use the double gun at start
                indexActiveWeapon = 0;
                rigWeaponAndArms[0].SetActive(true);
                rigWeaponAndArms[1].SetActive(false);
            }
        }
コード例 #5
0
        void OnTriggerEnter(Collider other)
        {
            if (other.tag == "Player")
            {
                //Debug.Log("I'am a AmmoBox type " + ammoType + " and i was touched by " + marineType);

                PlayerAmmo playerInv = other.gameObject.GetComponent <PlayerAmmo>();

                if (ammoType == AmmoType.AmmoType1 && marineType == MarinesType.MajCarter)
                {
                    playerInv.PickUpAmmo(ammoType, amount * 20);                                                                        // Flamethrower
                }
                else
                {
                    playerInv.PickUpAmmo(ammoType, amount);
                }
                amount = 0;
                Depop();
            }
        }
コード例 #6
0
        void Awake()
        {
            if (playerDisplay)
            {
                entityDisplay = playerDisplay;
            }

            anim       = gameObject.GetComponent <Animator>();
            playerAmmo = gameObject.GetComponent <PlayerAmmo>();
            body       = gameObject.GetComponent <Rigidbody>();

            if (marinesType == MarinesType.MajCarter)
            {
                weapCCarter = GetComponent <WeaponControllerCarter>();
            }
            else
            {
                weapCHartman = GetComponent <WeaponControllerHartman>();
            }

            GameController.Player = this;
            GameController.TopDownCamera.SetTarget(transform);
        }
コード例 #7
0
        void Awake()
        {
            if (playerDisplay)
            {
                entityDisplay = playerDisplay;
            }

            anim = gameObject.GetComponent<Animator>();
            playerAmmo = gameObject.GetComponent<PlayerAmmo>();
            body = gameObject.GetComponent<Rigidbody>();

            if (marinesType == MarinesType.MajCarter)
            { weapCCarter = GetComponent<WeaponControllerCarter>(); }
            else
            { weapCHartman = GetComponent<WeaponControllerHartman>(); }

            GameController.Player = this;
            GameController.TopDownCamera.SetTarget(transform);
            
        }
コード例 #8
0
 // Use this for initialization
 void Start()
 {
     playerAmmo = gameObject.GetComponent<PlayerAmmo>();
     listener = GetComponent<AudioSource>();
 }
コード例 #9
0
 // Use this for initialization
 void Start()
 {
     playerAmmo = gameObject.GetComponent <PlayerAmmo>();
     listener   = GetComponent <AudioSource>();
 }
コード例 #10
0
 // Use this for initialization
 void Start()
 {
     playerAmmo = gameObject.GetComponent<PlayerAmmo>();
     assaultRifle = gameObject.GetComponent<WeaponAssaultRifle>();
 }
コード例 #11
0
        public float timerCancelFireAfterReload = 0.5f; // Timer set

        void Awake()
        {
            playerAmmo       = gameObject.GetComponent <PlayerAmmo>();
            assaultRifle     = gameObject.GetComponent <WeaponAssaultRifle>();
            playerController = gameObject.GetComponent <PlayerController>();
        }
コード例 #12
0
 // Use this for initialization
 void Start()
 {
     playerAmmo = gameObject.GetComponent<PlayerAmmo>();
 }
コード例 #13
0
        public float timerCancelFireAfterReload = 0.5f; // Timer set

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