Пример #1
0
    void Start()
    {
        if (instance == null)
        {
            lock (padlock)
            {
                if (instance == null)
                {
                    //instance = new Knight();
                    instance = this;

                    HeroPool.GetInstance().SetHero(this, CommonConfig.Knight);

                    LevelManager = new KnightLeveling(this, KnightConfig.Level);
                }
            }
        }

        HeroAnimator = GetComponent <Animator>();

        LoadAttr();
        particleEffect.Stop();

        LoadSkill();

        InvokeRepeating("UpdateTarget", 0f, 0.5f);
    }
Пример #2
0
    private FireMage getInstance()
    {
        if (instance == null)
        {
            instance = this;

            HeroPool.GetInstance().SetHero(this, CommonConfig.FireMage);
            LevelManager = new MageLeveling(this, FireMageConfig.Level);
        }
        return(instance);
    }
Пример #3
0
    void Start()
    {
        LevelManager = new ArcherLeveling(this, ArcherConfig.Level);
        LoadAttr();
        LoadSkill();
        HeroPool.GetInstance().SetHero(this, CommonConfig.Archer);
        HeroAnimator = GetComponent <Animator>();
        particleEffect.Stop();
        arrowEffect.Stop();

        InvokeRepeating("UpdateTarget", 0f, 0.5f);
    }
Пример #4
0
    private Priest getInstance()
    {
        if (instance == null)
        {
            instance = this;

            HeroPool.GetInstance().SetHero(this, CommonConfig.Priest);

            LevelManager = new PriestLeveling(this, PriestConfig.Level);
        }
        return(instance);
    }
Пример #5
0
    private Archer getInstance()
    {
        if (instance == null)
        {
            instance = this;

            HeroPool.GetInstance().SetHero(this, CommonConfig.Archer);

            LevelManager = new ArcherLeveling(this, ArcherConfig.Level);
        }
        return(instance);
    }
Пример #6
0
    void Start()
    {
        HeroPool.GetInstance().SetHero(this, CommonConfig.FireMage);
        LevelManager = new MageLeveling(this, FireMageConfig.Level);

        HeroAnimator = GetComponent <Animator>();
        Logger.Log(HeroAnimator);
        LoadAttr();

        particleEffect.Stop();
        fireEffect.Stop();

        LoadSkill();

        InvokeRepeating("UpdateTarget", 0f, 0.5f);
    }
Пример #7
0
    void Start()
    {
        HeroPool.GetInstance().SetHero(this, CommonConfig.Priest);

        LevelManager = new PriestLeveling(this, PriestConfig.Level);

        animator = GetComponent <Animator>();

        LoadAttr();

        LoadSkill();

        particleEffect.Stop();

        InvokeRepeating("UpdateHeroTarget", 0f, 0.5f);
    }
Пример #8
0
 void Start()
 {
     heroPool = HeroPool.GetInstance();
 }