How to Make a Sprite Flash | Unity Ping Pong Function Explained

Published: 19 December 2023
on channel: Ketra Games
2,753
78

In this Unity tutorial we're going to look at how to make the player’s sprite flash when they’ve taken damage and are invincible.

We'll cover how to create a coroutine to change the colour of the sprite over time and how to use the Ping Pong function to create the flash effect.

This is the seventeenth video in our series showing how to make a full top down 2D shooter game in Unity.

The playlist for this series can be found here
►    • Unity 2D Top Down Shooter for Beginners  

The project files are available to our patrons here:
►   / 94928815  

Want to follow along? This project is a good starting point
►   / 93282900  

The full Top Down Shooter Project is available to our patrons here
►   / 75231350  

The final script can be found here
► https://dotnetfiddle.net/t5aEJL

Help support our work:
► Patreon:   / ketragames  

Follow us:
► Ketra Games: http://www.ketra-games.com
► Patreon:   / ketragames  
► Twitter:   / ketragames  
► Facebook:   / ketragames  

Introduction - 0:00
Creating the Sprite Flash Script - 00:34
Explaining the Ping Pong Function - 04:32
Triggering the Flash when the Player is Invincible - 06:46
Summary - 09:56

#KetraGames #LearnUnity #UnityTutorials #UnityTips


Watch video How to Make a Sprite Flash | Unity Ping Pong Function Explained online, duration hours minute second in high quality that is uploaded to the channel Ketra Games 19 December 2023. Share the link to the video on social media so that your subscribers and friends will also watch this video. This video clip has been viewed 2,753 times and liked it 78 visitors.