コード例 #1
0
            public Light(IMyLightingBlock b, ColorStage[] data)
            {
                light = b;
                Vector3I pos = b.Position;

                offset = (pos.X * xAxisSpeed + pos.Y * yAxisSpeed + pos.Z * zAxisSpeed);

                for (int i = 0; i < data.Length; i++)
                {
                    ColorStage c = data[i];
                    for (int n = 0; n < c.duration; n++)
                    {
                        colors.Add(c.color);
                    }
                }
            }
コード例 #2
0
ファイル: UICastBar.cs プロジェクト: KateFoxBeta/MGUI
        /// <summary>
        /// Applies the color stages.
        /// </summary>
        /// <param name="stage">Stage.</param>
        public virtual void ApplyColorStage(ColorStage stage)
        {
            if (this.m_FillImage != null)
            {
                this.m_FillImage.canvasRenderer.SetColor(stage.fillColor);
            }

            if (this.m_TitleLabel != null)
            {
                this.m_TitleLabel.canvasRenderer.SetColor(stage.titleColor);
            }

            if (this.m_TimeLabel != null)
            {
                this.m_TimeLabel.canvasRenderer.SetColor(stage.timeColor);
            }
        }
コード例 #3
0
/*#if UNITY_EDITOR
		protected void OnValidate()
		{
			// Apply the normal color stage
			if (this.isActiveAndEnabled)
				this.ApplyColorStage(this.m_NormalColors);
		}
#endif*/
		
		/// <summary>
		/// Applies the color stages.
		/// </summary>
		/// <param name="stage">Stage.</param>
		public virtual void ApplyColorStage(ColorStage stage)
		{
			if (this.m_Fill != null)
				this.m_Fill.canvasRenderer.SetColor(stage.fillColor);
			
			if (this.m_TitleLabel != null)
				this.m_TitleLabel.canvasRenderer.SetColor(stage.titleColor);
			
			if (this.m_TimeLabel != null)
				this.m_TimeLabel.canvasRenderer.SetColor(stage.timeColor);
		}