Ejemplo n.º 1
0
    void Start()
    {
        Cast temp = CastConfig.GetCastById(this.castId);

        this.castId   = temp.id;
        this.castName = temp.name;
        this.damage   = temp.damage;
        this.speed    = temp.speed;
        this.liveTime = temp.liveTime;

        if (temp.buffIds == null)
        {
            return;
        }
        this.buffIds = temp.buffIds;

        for (int i = 0; i < buffIds.Count; i++)
        {
            buffs.Add(BuffManager.GetBuffById(this.buffIds[i]));
        }
    }
Ejemplo n.º 2
0
    void Awake()
    {
        if (hasCreated)
        {
            return;
        }


        SkillConfig.LoadJson();
        BuffManager.LoadJson();
        RoleConfig.LoadJson();
        CastConfig.LoadJson();

        gameObject.AddComponent <NpcManager>();

        gameObject.AddComponent <ItemConfig>();

        gameObject.AddComponent <LevelManager>();

        gameObject.AddComponent <AudioManager>();

        hasCreated = true;
        DontDestroyOnLoad(this.gameObject);
    }