コード例 #1
0
	void Start () 
	{
		vecPointAt = transform.position + transform.up * -100;
		lastFireTime = -1.0f;
		enableMuzzleLightUntil = -1.0f;

		GameObject goBulletImpactCTRL = GameObject.FindGameObjectWithTag ("Bullet_Impacts_Control");
		if ( goBulletImpactCTRL != null )
			bulletImpactCTRL = goBulletImpactCTRL.GetComponent< FPS_BulletImpacts>();

		laserAim = GetComponent<LineRenderer> ();

		currentRotationSpeed = rotationSpeed;
		muzzleflashChangeTimeThrottle = Time.time;
	}
コード例 #2
0
    void Start()
    {
        vecPointAt             = transform.position + transform.up * -100;
        lastFireTime           = -1.0f;
        enableMuzzleLightUntil = -1.0f;

        GameObject goBulletImpactCTRL = GameObject.FindGameObjectWithTag("Bullet_Impacts_Control");

        if (goBulletImpactCTRL != null)
        {
            bulletImpactCTRL = goBulletImpactCTRL.GetComponent <FPS_BulletImpacts>();
        }

        laserAim = GetComponent <LineRenderer> ();

        currentRotationSpeed          = rotationSpeed;
        muzzleflashChangeTimeThrottle = Time.time;
    }