Exemplo n.º 1
0
 ////////////////////////////////////////////////////////////////////////////
 // Use this for initialization
 void Start()
 {
     if (Camera.main)
     {
         m_GlowEffectScript = Camera.main.GetComponent <GlowEffect>();
     }
 }
Exemplo n.º 2
0
        public static void Run()
        {
            // ExStart:1
            // The path to the documents directory.
            string dataDir = RunExamples.GetDataDir(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);

            // Read the source excel file
            Workbook book = new Workbook(dataDir + "sourceGlowEffectColor.xlsx");

            // Access first worksheet
            Worksheet sheet = book.Worksheets[0];

            // Access the shape
            Shape shape = sheet.Shapes[0];

            // Read the glow effect color and its various properties
            GlowEffect effect = shape.Glow;
            CellsColor color  = effect.Color;

            Console.WriteLine("Color: " + color.Color);
            Console.WriteLine("ColorIndex: " + color.ColorIndex);
            Console.WriteLine("IsShapeColor: " + color.IsShapeColor);
            Console.WriteLine("Transparency: " + color.Transparency);
            Console.WriteLine("Type: " + color.Type);
            // ExEnd:1
        }
        public static void Run()
        {
            //Source directory
            string sourceDir = RunExamples.Get_SourceDirectory();

            //Output directory
            string outputDir = RunExamples.Get_OutputDirectory();

            // Load your source excel file
            Workbook wb = new Workbook(sourceDir + "sampleGlowEffectOfShape.xlsx");

            // Access first worksheet
            Worksheet ws = wb.Worksheets[0];

            // Access first shape
            Shape sh = ws.Shapes[0];

            // Set the glow effect of the shape, Set its Size and Transparency properties
            GlowEffect ge = sh.Glow;

            ge.Size         = 30;
            ge.Transparency = 0.4;

            // Save the workbook in xlsx format
            wb.Save(outputDir + "outputGlowEffectOfShape.xlsx");

            Console.WriteLine("GlowEffectOfShape executed successfully.");
        }
Exemplo n.º 4
0
        public static void Run()
        {
            // ExStart:GlowEffectOfShape
            // The path to the documents directory.
            string dataDir = RunExamples.GetDataDir(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);

            // Load your source excel file
            Workbook wb = new Workbook(dataDir + "sample.xlsx");

            // Access first worksheet
            Worksheet ws = wb.Worksheets[0];

            // Access first shape
            Shape sh = ws.Shapes[0];

            // Set the glow effect of the shape, Set its Size and Transparency properties
            GlowEffect ge = sh.Glow;

            ge.Size         = 30;
            ge.Transparency = 0.4;

            // Save the workbook in xlsx format
            wb.Save(dataDir + "output_out_.xlsx");
            // ExEnd:GlowEffectOfShape
        }
Exemplo n.º 5
0
        public static void Run()
        {
            //Source directory
            string sourceDir = RunExamples.Get_SourceDirectory();

            // Read the source excel file
            Workbook book = new Workbook(sourceDir + "sampleReadColorOfShapesGlowEffect.xlsx");

            // Access first worksheet
            Worksheet sheet = book.Worksheets[0];

            // Access the shape
            Shape shape = sheet.Shapes[0];

            // Read the glow effect color and its various properties
            GlowEffect effect = shape.Glow;
            CellsColor color  = effect.Color;

            Console.WriteLine("Color: " + color.Color);
            Console.WriteLine("ColorIndex: " + color.ColorIndex);
            Console.WriteLine("IsShapeColor: " + color.IsShapeColor);
            Console.WriteLine("Transparency: " + color.Transparency);
            Console.WriteLine("Type: " + color.Type);

            Console.WriteLine("ReadColorOfShapesGlowEffect executed successfully.\r\n");
        }
Exemplo n.º 6
0
        public InkSketchEffect()
        {
            EffectData = new InkSketchData ();

            glowEffect = new GlowEffect ();
            desaturateOp = new UnaryPixelOps.Desaturate ();
            darkenOp = new UserBlendOps.DarkenBlendOp ();
        }
Exemplo n.º 7
0
 public CharacterBody(string characterPath, Vector2 offset, Color glowColor)
 {
     _glow = new GlowEffect(new Size2(60, 100))
     {
         Tint = Color.FromNonPremultiplied(glowColor.R, glowColor.G, glowColor.B, 18)
     };
     _characterPath = characterPath;
     _offset        = offset;
 }
 public void SetActiveHand(HandGestureState hand)
 {
     if (curState == ProxyState.Default)
     {
         // Debug.Log("SetActiveHand: " + (hand == leftHand ? "left" : "right"));
         copyTo.GetComponent <SnapToObject>().SetRoot(hand.hand.gameObject, hand == leftHand);
         activeHand     = hand;
         activeHandGlow = hand == leftHand ? leftHandGlow : rightHandGlow;
     }
 }
Exemplo n.º 9
0
        public void GlowEffect2()
        {
            var src = GetSourceImage("input.png");

            var effect = new GlowEffect(12, 50, 50);

            effect.Render(src);

            Compare(src, "glow2.png");
        }
    void Start()
    {
        eff = this.GetComponent <GlowEffect> ();

        if (colors == null || colors.Length < 2)
        {
            Debug.Log("Need to setup colors array in inspector");
        }

        nextIndex = (currentIndex + 1) % colors.Length;
    }
    private void SetHandGlow(float opacity, GlowEffect handGlow = null)
    {
        if (handGlow == null)
        {
            handGlow = activeHandGlow;
        }

        if (handGlow)
        {
            handGlow.SetOpacity(opacity);
        }
    }
Exemplo n.º 12
0
        private void UpdateFpsTexture(bool forceUpdate)
        {
            var text = $"FPS: {lastFpsCount}";

            if (!forceUpdate && text == lastTextFpsCount)
            {
                return;
            }
            lastTextFpsCount = text;

            imgObjFpsText.texture = GlowEffect.CreateGlowSpriteFont(cooperBlackSpriteFont, text, Color.DarkRed, glowColor, new Vector2(0.85f), blurX, blurY, dist, angle, alpha, strength, inner, knockout, circleSamplingTimes, linearSamplingTimes, GraphicsDevice);
        }
Exemplo n.º 13
0
        private void CreateGlow(Drawables.Image image, Texture2D texture, Color?imageGlowColor = null)
        {
            var imageGlow = GlowEffect.CreateGlow(texture, imageGlowColor == null ? glowColor : imageGlowColor.Value, blurX, blurY, dist, angle, alpha, strength, inner, knockout, circleSamplingTimes, linearSamplingTimes, GraphicsDevice);

            // Dispose if the previous texture is not pixel
            if (image.texture != imgPixel)
            {
                image.texture.Dispose();
            }

            image.texture = imageGlow;
        }
    private void SetHandGlow(Color color, GlowEffect handGlow = null)
    {
        if (handGlow == null)
        {
            handGlow = activeHandGlow;
        }

        if (handGlow)
        {
            handGlow.SetColor(color);
        }
    }
Exemplo n.º 15
0
 void Awake()
 {
     // Setting up the references.
     anim = GetComponent<Animator>();
     playerMovement = GetComponent<PlayerMovement>();
     flash = GameObject.Find ("Main Camera").GetComponent<GlowEffect> ();
     GameObject tmp = GameObject.Find ("EndLevel");
     if (tmp != null)
         endLevel = tmp.GetComponent<EndLevel>();
     GameObject gameController = GameObject.Find ("gameController");
     if (gameController != null)
         lastPlayerSighting = gameController.GetComponent<LastPlayerSighting>();
 }
Exemplo n.º 16
0
 void Start()
 {
     bE                    = transform.GetComponent <BlurEffect> () as BlurEffect;
     gE                    = transform.GetComponent <GlowEffect> () as GlowEffect;
     bE.enabled            = false;
     gE.enabled            = false;
     gE.glowIntensity      = 0f;
     sC                    = transform.GetComponent <SphereCollider> () as SphereCollider;
     sC.radius             = 0.2f;
     sC.isTrigger          = true;
     rigidbody.isKinematic = true;
     gameObject.layer      = 4;    // Water layer
 }
Exemplo n.º 17
0
        private void RenderGlowEffect(Graphics gr, GraphicsPath path)
        {
            var e = new GlowEffect()
            {
                OuterGlow = cbOuter.Checked
            };
            var opactity = (byte)(255f * (float)nudOpacity.Value / 100f);

            e.Color = Color.FromArgb(opactity, lbColorPicker.BackColor);
            e.Blur  = (int)nudBlur.Value;
            //e.Distance = (int)nudDistance.Value;

            e.Render(gr, path);
        }
Exemplo n.º 18
0
    // Use this for initialization
    void Start()
    {
        gleffect = GameObject.Find("Camera").GetComponent <GlowEffect>();
        gleffect.glowIntensity = 3.5f;
        glstate = "GlowUp";
        // GlowUp
        // GlowDown
        // GlowBlance

        button1 = GameObject.Find("BUTTON_practice"); button1.SetActive(false);
        button2 = GameObject.Find("BUTTON_battle");   button2.SetActive(false);
        button3 = GameObject.Find("BUTTON_special");  button3.SetActive(false);
        button4 = GameObject.Find("BUTTON_exit");     button4.SetActive(false);
    }
Exemplo n.º 19
0
    void Awake()
    {
        GameObject.DontDestroyOnLoad(this.gameObject);
        //Util.Settings.DisableUnitility();
        glow            = GameObject.FindObjectOfType <GlowEffect>();
        colorAmp        = GameObject.FindObjectOfType <AmplifyColorEffect>();
        targetLowPass   = setLowPass;
        currentLowPass  = setLowPass;
        targetHighPass  = defaultHighPass;
        currentHighPass = defaultHighPass;

        instance = this;
        samples  = new float[1024];

        Charlie = GameObject.FindObjectOfType <HappyHippo> ();
    }
Exemplo n.º 20
0
    public static Material ShareMaterial(GlowEffect _glowEffect)
    {
        for (int i = 0; i < allMaterials.Count; i++)
        {
            if (allMaterials[i].SpriteTexture == _glowEffect.Renderer.sprite.texture &&
                allMaterials[i].DrawOutside == _glowEffect.DrawOutside &&
                allMaterials[i].InstancingEnabled == _glowEffect.EnableInstancing)
            {
                return(allMaterials[i]);
            }
        }
        GlowMaterial material = new GlowMaterial(_glowEffect.Renderer.sprite.texture, _glowEffect.DrawOutside, _glowEffect.EnableInstancing);

        material.hideFlags = HideFlags.DontSaveInBuild | HideFlags.DontSaveInEditor | HideFlags.NotEditable;
        allMaterials.Add(material);
        return(material);
    }
Exemplo n.º 21
0
        public static LayerInfo Load(PsdBinaryReader reader)
        {
            var signature = reader.ReadAsciiChars(4);

            if (signature != "8BIM")
            {
                throw new PsdInvalidException("Could not read LayerInfo due to signature mismatch." + signature);
            }

            var key    = reader.ReadAsciiChars(4);
            var length = reader.ReadInt32();
//            var startPosition = reader.BaseStream.Position;

//            UnityEngine.Debug.Log("EffectLayerFactory key:" + key);

            LayerInfo result;

            switch (key)
            {
            case "iglw":
            case "oglw":
                result = new GlowEffect(reader, key);
                break;

            case "dsdw":
            case "isdw":
                result = new ShadowEffect(reader, key);
                break;

            case "bevl":
                result = new BevelEffect(reader, key);
                break;

            default:
                result = new RawLayerInfo(reader, key, (int)length);
                break;
            }

            return(result);
        }
	void Start()
	{
		//Debug and Testing
		//SetPosition (1);
		//SetMoveTo (GameObject.Find ("Selector"));
		//SetLookAt (GameObject.Find ("Selector"));
		//SetFocus (GameObject.Find ("Selector"));
		//SetFocusHeight (1f);
		//SetRotateTowards (GameObject.Find ("Selector"));
		//Zoom (-1);
		//SetHeight (5f);
		//Pan (1);

		/*Intro Camera
		SetMoveSpeed (8f);
		SetRotateSpeed (20f);
		GameObject focus = GameObject.FindGameObjectWithTag ("Combat Selector");
		SetMoveTo(focus);
		SetRotateTowards(focus);
		*/
		SpawnGlobalAnimation (null, "Field Preview");
		glow = cam.GetComponent<GlowEffect>();
		glow.enabled = true;
		Invoke ("TurnOffGlowEffect", 3f);
	}
Exemplo n.º 23
0
 void Start()
 {
     glow = GetComponent <GlowEffect>();
 }
Exemplo n.º 24
0
 public void OnLevelWasLoaded(int levelId)
 {
     glow     = GameObject.FindObjectOfType <GlowEffect>();
     Charlie  = GameObject.FindObjectOfType <HappyHippo> ();
     colorAmp = GameObject.FindObjectOfType <AmplifyColorEffect>();
 }