示例#1
0
    /// <summary>
    /// Adds a modification.
    /// </summary>
    /// <param name="mod_type"></param>
    public void Add_Modification(string mod_type)
    {
        Modification mod = Modification_Prefab_Manager.GetInstance().SearchModification(mod_type).GetComponent <Modification>();

        foreach (Modification_Base mBase in Modification_Bases.GetAllBases())
        {
            if (mBase.AttachModification(mod))
            {
                Send.SpawnMod(mod_type, ConnectionEnemyHandler.GetInstance().allExistingEnemies.FindIndex(x => x == gameObject));
                Apply_Modification_Boosts();
                foreach (GameObject player in Battle_Manager.GetInstance().GetBattle(gameObject).GetPlayers())
                {
                    /*
                     * if (player.GetComponent<LockOnTarget>().targetedCreature.Equals(gameObject))
                     * {
                     *  player.GetComponent<LockOnTarget>().RefreshTargets();
                     * }
                     */
                }
            }
        }


        return;
    }
示例#2
0
    /// <summary>
    /// Adds a modification.
    /// </summary>
    /// <param name="mod_type"></param>
    public void Add_Modification(string mod_type)
    {
        Modification mod = Modification_Prefab_Manager.GetInstance().SearchModification(mod_type).GetComponent <Modification>();

        foreach (Modification_Base mBase in Modification_Bases.GetAllBases())
        {
            if (mBase.AttachModification(mod))
            {
                Apply_Modification_Boosts();
                foreach (GameObject player in Battle_Manager.GetInstance().GetBattle(gameObject).GetPlayers())
                {
                    if (player.GetComponent <LockOnTarget>().targetedCreature.Equals(gameObject))
                    {
                        player.GetComponent <LockOnTarget>().RefreshTargets();
                    }
                }
            }
        }


        return;
    }