示例#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;
    }
示例#3
0
    ///

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

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

        image = GetComponent <Image>();
    }
示例#5
0
    void Start()
    {
        blueBattery1 = FindObjectOfType <BlueGunController>();

        image = GetComponent <Image>();
    }