private void Start() { this.startingIconColor = this._icon.color; this._icon.enabled = false; GUIHeldItem._guiHeldItem = this; this._myMaterial = this._icon.material.Clone(); this._icon.material = this._myMaterial; this.mTrans = base.transform; if (this.uiCamera == null) { this.uiCamera = NGUITools.FindCameraForLayer(base.gameObject.layer); } this.planeTest = new Plane(this.uiCamera.transform.forward * 1f, new Vector3(0f, 0f, 2f)); this.started = true; }
public void FadeOutToPoint(Vector3 worldPoint) { this.Opaque(); this.fadeOutPointStart = this.mTrans.position; this.fadeOutPointEnd = new Vector3(worldPoint.x, worldPoint.y, worldPoint.z); if (this.fadeOutPointStart == this.fadeOutPointEnd) { this.fadeOutPointEnd.z = this.fadeOutPointEnd.z + 1f; } this.fadeOutPointNormal = this.fadeOutPointEnd - this.fadeOutPointStart; this.fadeOutPointMagnitude = this.fadeOutPointNormal.magnitude; GUIHeldItem gUIHeldItem = this; gUIHeldItem.fadeOutPointNormal = gUIHeldItem.fadeOutPointNormal / this.fadeOutPointMagnitude; this.fadeOutPointDistance = Vector3.Dot(this.fadeOutPointNormal, this.fadeOutPointStart); this.fadeOutAlpha = 1f; this.fadingOut = true; this._icon.enabled = true; this.fadeOutPoint = this.fadeOutPointStart; }
public static IInventoryItem CurrentItem() { return(GUIHeldItem.Get()._itemHolding); }