コード例 #1
0
    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);
    }
コード例 #2
0
    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);
    }