Esempio n. 1
0
    ///

    void Awake() // INITIALIZE VARIABLES
    {
        bluePlayer = GameObject.FindGameObjectWithTag("Blue_Player").GetComponent <BluePlayerController>();

        blueGun = GameObject.FindGameObjectWithTag("Blue_Gun").GetComponent <BlueGunController>();

        instance = this.gameObject;

        warpColor = warpLight.color;
    }
    //======================================

    void OnEnable()
    {
        // Player Controller
        bluePlayerController = GetComponent <BluePlayerController>();

        bluePlayerController.canShoot = false;  // Disable Firing Script

        // Gun Controller
        blueGunController = GameObject.FindGameObjectWithTag("Blue_Gun").GetComponent <BlueGunController>();

        blueGunController.isFiringLaser = false;

        // Move Player
        myRigidbody = GetComponent <Rigidbody>();

        myRigidbody.velocity = Vector3.zero;    // Stop Movement

        // Disable Firing
        GetComponent <BlueFiringPrimary>().enabled = false;
    }
Esempio n. 3
0
    ///

    void Awake() // INITIALIZE VARIABLES
    {
        blueGun = GameObject.FindGameObjectWithTag("Blue_Gun").GetComponent <BlueGunController>();

        bluePlayer = GameObject.FindGameObjectWithTag("Blue_Player").GetComponent <BluePlayerController>();
    }
Esempio n. 4
0
    void Start()
    {
        blueAltFire = FindObjectOfType <BlueGunController>();

        image = GetComponent <Image>();
    }
Esempio n. 5
0
    void Start()
    {
        blueBattery1 = FindObjectOfType <BlueGunController>();

        image = GetComponent <Image>();
    }