Example #1
0
 public void Init()
 {
     this.spot       = base.GetComponentsInChildren <Sprite3D>(true)[0];
     this.beginLines = new List <LineRenderer>();
     this.baseLines  = new List <LineRenderer>();
     this.InitializeLineRendererList <ShaftLaserBeginUnityComponent>(this.beginLines);
     this.InitializeLineRendererList <ShaftLaserBaseUnityComponent>(this.baseLines);
     this.baseLaserTex = (Texture2D)this.baseLines[0].material.mainTexture;
     this.segment      = ((this.texScale * this.laserWidth) * this.baseLaserTex.height) / ((float)this.baseLaserTex.width);
     this.angle1       = 0f;
     this.angle2       = 0f;
     this.initialAlpha = 0f;
     this.currentAlpha = 0f;
     this.stateTime    = 0f;
     this.UpdateAlphaForAllParts(this.initialAlpha);
     this.state = LaserStates.DEFAULT;
 }
Example #2
0
 private void Start()
 {
     this.child           = this.flag.transform.GetChild(0);
     this.spriteComponent = this.flag.transform.GetComponent <Sprite3D>();
 }