public void FadeOutFlockAgents() { TaskTree fadeAgents = new TaskTree(new EmptyTask()); foreach (FlockAgent agent in _agents) { Task fadeOut = new LERPColor(agent.sr, agent.sr.color, _transparent, 0.3f); fadeAgents.AddChild(fadeOut); } _tm.Do(fadeAgents); }
public void FadeInFlockAgents() { TaskTree fadeAgents = new TaskTree(new EmptyTask()); Color targetColor; if (_icon == FlockIcon.X) { targetColor = Services.GameManager.Player1Color[1]; } else { targetColor = Services.GameManager.Player2Color[1]; } foreach (FlockAgent agent in _agents) { Task fadeOut = new LERPColor(agent.sr, _transparent, targetColor, 0.3f); fadeAgents.AddChild(fadeOut); } _tm.Do(fadeAgents); }