Exemple #1
0
        /// <summary>
        /// Registers the AI in the level and finds the other players.
        /// </summary>
    	private void Start() {
            bard = GetComponent<AIBard>();
            control = GetComponent<AIControl>();
            enabledRhythms = LevelManager.instance.EnabledRhythms;
            LevelControllerManager.instance.AddPlayer(control.player, control);
            bard.timingVariance = 0.1f;

            MinionTuneSpawn minion = GetComponent<MinionTuneSpawn>();
            PlayerID selfID;
            if (minion != null) {
                selfID = minion.owner;
            } else {
                selfID = control.player;
            }

            otherPlayers = new List<BaseControl>();
            BaseControl[] otherPlayersArray = FindObjectsOfType<BaseControl>();
            foreach (BaseControl otherPlayer in otherPlayersArray) {
                if (otherPlayer.player != selfID && otherPlayer.GetComponent<MinionTuneSpawn>() == null) {
                    otherPlayers.Add(otherPlayer);
                }
            }

            InitializeAI();
    	}
Exemple #2
0
        /// <summary>
        /// Registers the AI in the level and finds the other players.
        /// </summary>
        private void Start()
        {
            control        = GetComponent <AIControl>();
            life           = GetComponent <PlayerLife>();
            enabledRhythms = LevelManager.instance.EnabledRhythms;
            if (!LevelManager.instance.HasPlayer(control.player))
            {
                LevelControllerManager.instance.AddPlayer(control.player, control);
            }
            bard.timingAccuracy = 0.9f;

            FindOtherPlayers();

            InitializeAI();
        }