Ejemplo n.º 1
0
    private bool AddAlly(Ally ally)
    {
        bool success = false;

        if (ally.IsComplete)
        {
            m_collidedAllies.Remove(ally);

            // Disable the pickup collider
            ally.Pickup();

            // Add follower to Ally Orbiter
            m_orbiter.AddAlly(ally.ParentFollower);

            // Copy Skill components into the Player object
            PlayerSkill attack = ally.AttackSkill.Clone(gameObject);
            PlayerSkill dash   = ally.DashSkill.Clone(gameObject);

            // Add skills to Player object
            m_skills.AddBack(new SkillSet(ally, attack, dash));

            success = true;
        }

        return(success);
    }