コード例 #1
0
        protected override void OnDefAssigned()
        {
            Material GetMaterial(Texture2D tex, float alpha)
            {
                return(MaterialPool.MatFrom(tex, ShaderDatabase.MetaOverlay, new Color(1f, 1f, 1f, alpha)));
            }

            Def.GetDragHighlightTexture(tex => {
                designationValidMat   = GetMaterial(tex, 1f);
                designationInvalidMat = GetMaterial(tex, InvalidCellHighlightAlpha);
            });
        }
コード例 #2
0
 protected override void OnDefAssigned()
 {
     Def.GetDragHighlightTexture(tex =>
                                 highlightMaterial = MaterialPool.MatFrom(tex, ShaderDatabase.MetaOverlay, Color.white)
                                 );
 }