Beispiel #1
0
    void Start () {
		BP = GetComponent<BeamParam>();
		LRSize = 16;
		NowLength = 0.0f;
		LR = GetComponent<LineRenderer>();
		HitObj = transform.FindChild("GeroBeamHit").GetComponent<GeroBeamHit>();
        SHP_Emitter = transform.FindChild("ShotParticle_Emitter").GetComponent<ShotParticleEmitter>();
        Flash = transform.FindChild("BeamFlash").gameObject;
        F_Vec = new Vector3[LRSize+1];
        FlashSize = Flash.transform.localScale.x;

        for (int i=0;i < LRSize+1;i++)
		{
			F_Vec[i] = transform.forward;
		}
	}
Beispiel #2
0
 // Use this for initialization
 void Start()
 {
     BP          = GetComponent <BeamParam>();
     NowLength   = 0.0f;
     LR          = this.GetComponent <LineRenderer>();
     HitObj      = this.transform.FindChild("GeroBeamHit").GetComponent <GeroBeamHit>();
     HitObjSize  = HitObj.transform.localScale;
     SHP_Emitter = this.transform.FindChild("ShotParticle_Emitter").GetComponent <ShotParticleEmitter>();
     Flash       = this.transform.FindChild("BeamFlash").gameObject;
     F_Vec       = new Vector3[positionSize + 1];
     FlashSize   = Flash.transform.localScale.x;
     for (int i = 0; i < positionSize + 1; i++)
     {
         F_Vec[i] = transform.forward;
     }
 }
Beispiel #3
0
    void Start()
    {
        BP               = GetComponent <BeamParam>();
        LR               = GetComponent <LineRenderer>();
        HitObj           = transform.Find("GeroBeamHit").GetComponent <GeroBeamHit>();
        SHP_Emitter      = transform.Find("ShotParticle_Emitter").GetComponent <ShotParticleEmitter>();
        Flash            = transform.Find("BeamFlash").gameObject;
        renderer         = GetComponent <Renderer>();
        flashScaleWiggle = Flash.GetComponent <ScaleWiggle>();
        flashRenderer    = Flash.GetComponent <Renderer>();
        shootableMask    = LayerMask.GetMask("Enemy");

        HitObjSize = HitObj.transform.localScale;
        FlashSize  = Flash.transform.localScale.x;
        MaxLength  = BP.MaxLength;
        BlockLen   = MaxLength / LRSize;
        forwardVec = transform.forward;
    }
Beispiel #4
0
 // Use this for initialization
 void Start()
 {
     BP          = GetComponent <BeamParam>();
     LRSize      = 16;
     NowLength   = 0.0f;
     LR          = this.GetComponent <LineRenderer>();
     HitObj      = this.transform.Find("GeroBeamHit").GetComponent <GeroBeamHit>();
     HitObjSize  = HitObj.transform.localScale;
     SHP_Emitter = this.transform.Find("ShotParticle_Emitter").GetComponent <ShotParticleEmitter>();
     Flash       = this.transform.Find("BeamFlash").gameObject;
     F_Vec       = new Vector3[LRSize + 1];
     FlashSize   = Flash.transform.localScale.x;
     for (int i = 0; i < LRSize + 1; i++)
     {
         F_Vec[i] = transform.forward;
     }
     audioSource_Effect0.PlayOneShot(InterferenceSound_start);
 }