Exemple #1
0
    public void SetAttributes(int addPerLv, float sec)
    {
        this.addCostPerLv = addPerLv;
        coolDown          = new TimerEC(sec);

        SetCostMP();
    }
    // Use this for initialization
    public void SetTimer()
    {
        pcon      = gameObject.transform.parent.parent.parent.GetComponent <PlayerController>();
        AssetsLib = GameObject.FindGameObjectWithTag("Assets").GetComponent <AssetsLibrary>();
        float cooldownInSeconds = pcon.pinfo.GetAttackTimer();

        attTimer = pcon.pinfo.stats.attackCooldown;
    }
Exemple #3
0
 public CompleteStats(BaseStats baseStats, EquipmentStats invStats, PassiveSkill[] passiveSkills)
 {
     this.baseStats     = baseStats;
     this.invStats      = invStats;
     this.passiveSkills = passiveSkills;
     SetClassAttributes();
     attackCooldown = new TimerEC(attackSpeed);
 }
Exemple #4
0
 public Frenzy()
 {
     name         = "Frenzy";
     level        = 1;
     id           = 1;
     addCostPerLv = 4;
     coolDown     = new TimerEC(60);
     duration     = new TimerEC(30);
     CalculateMult();
 }
Exemple #5
0
 public Mine()
 {
     name          = "Mine";
     level         = 1;
     id            = 3;
     addedDmgPerLv = 3;
     addCostPerLv  = 2;
     coolDown      = new TimerEC(0);
     CalculateBaseDamage();
 }
Exemple #6
0
 public Rage()
 {
     name         = "Rage";
     level        = 1;
     id           = 2;
     addCostPerLv = 4;
     coolDown     = new TimerEC(60);
     duration     = new TimerEC(20);
     CalculateMult();
 }
Exemple #7
0
 public Fireball()
 {
     name          = "Fireball";
     level         = 1;
     id            = 4;
     addedDmgPerLv = 6;
     addCostPerLv  = 2;
     coolDown      = new TimerEC(1);
     CalculateBaseDamage();
 }
    // Use this for initialization
    void Start()
    {
        anim      = gameObject.transform.GetChild(0).GetComponent <AnimationManager>();
        ec        = GetComponent <EnemyControllerNew>();
        plrChar   = gameObject.transform.GetChild(0).gameObject;
        waitTimer = new TimerEC(0.75f);
        UpdatePosAsInt();

        totalSearch = 0;
        MapDataController.map[pos.x, pos.y].SetNpc(ec.pinfo);
    }
 // Use this for initialization
 void Start()
 {
     assetsLib = GameObject.FindGameObjectWithTag("Assets").GetComponent <AssetsLibrary>();
     markBox   = gameObject.transform.GetChild(2).gameObject.GetComponent <SpriteRenderer>();
     trav      = GetComponent <TravelerController>();
     hpcon     = gameObject.transform.GetChild(1).gameObject.GetComponent <HealthbarController>();
     pinfo     = new PlayerInfo(2, hpcon);
     ec        = gameObject.GetComponent <EnemyControllerNew>();
     attTimer  = ec.pinfo.stats.attackCooldown;
     gi.ec.Add(ec);
 }
Exemple #10
0
    void Start()
    {
        changeStanceTimer = new TimerEC(0.1f);
        anim           = this;
        SpriteRenderer = GetComponent <SpriteRenderer>();
        for (int i = 0; i < 12; i++)
        {
            sprites[i] = Resources.Load <Sprite>("Spritesheets/Warrior/" + i);
        }

        animate = true;
        anim.SetSpriteLoopValues(0, 3, "walking_down");
    }
Exemple #11
0
    public Fireball(int slot, PlayerInfo pinfo, int level)
    {
        this.pinfo    = pinfo;
        name          = "Fireball";
        this.level    = level;
        id            = 4;
        addedDmgPerLv = 6;
        addCostPerLv  = 2;
        this.slot     = slot;

        SetActionButtonController();
        coolDown = new TimerEC(1);
    }
Exemple #12
0
    public Rage(int slot, PlayerInfo pinfo, int level)
    {
        this.pinfo   = pinfo;
        name         = "Rage";
        this.level   = level;
        id           = 2;
        addCostPerLv = 4;
        this.slot    = slot;

        SetActionButtonController();
        coolDown = new TimerEC(60);
        duration = new TimerEC(20);
    }
Exemple #13
0
    public Mine(int slot, PlayerInfo pinfo, int level)
    {
        name          = "Mine";
        this.level    = level;
        id            = 3;
        addedDmgPerLv = 3;
        addCostPerLv  = 2;
        dmg           = 10;
        this.slot     = slot;
        this.pinfo    = pinfo;

        SetActionButtonController();
        coolDown = new TimerEC(0);

        SetDescription();
    }
    // Use this for initialization
    void Start()
    {
        target = Target.GetTargetUnit();
        if (target != null)
        {
            Vector2 temp = target.GetPos();
            targetPos = new Vector3(temp.x, temp.y, -1);

            pcon      = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerController>();
            plr       = pcon.pinfo;
            timeToDie = new TimerEC(5);
        }

        if (target == null)
        {
            Destroy(gameObject);
        }
    }
Exemple #15
0
    // Use this for initialization
    void Start()
    {
        //PlayerController pcon = GameObject.FindGameObjectWithTag("Player").GetComponent<PlayerController>();
        assetsLib = GameObject.FindGameObjectWithTag("Assets").GetComponent <AssetsLibrary>();

        cooldownText[0] = gameObject.transform.GetChild(0).GetChild(1).gameObject.GetComponent <Text>();
        cooldownText[1] = gameObject.transform.GetChild(1).GetChild(1).gameObject.GetComponent <Text>();
        cooldownImg[0]  = gameObject.transform.GetChild(0).GetChild(0).gameObject.GetComponent <Image>();
        cooldownImg[1]  = gameObject.transform.GetChild(1).GetChild(0).gameObject.GetComponent <Image>();

        potCooldownText[0] = gameObject.transform.GetChild(2).GetChild(2).gameObject.GetComponent <Text>();
        potCooldownText[1] = gameObject.transform.GetChild(3).GetChild(2).gameObject.GetComponent <Text>();
        potBlockImg[0]     = gameObject.transform.GetChild(2).GetChild(1).gameObject.GetComponent <Image>();
        potBlockImg[1]     = gameObject.transform.GetChild(3).GetChild(1).gameObject.GetComponent <Image>();

        potAmountText[0] = gameObject.transform.GetChild(2).GetChild(0).gameObject.GetComponent <Text>();
        potAmountText[1] = gameObject.transform.GetChild(3).GetChild(0).gameObject.GetComponent <Text>();

        potionCooldown[0] = new TimerEC(3);
        potionCooldown[1] = new TimerEC(3);

        RefreshPotsAmountText();
    }
Exemple #16
0
 public void SetAbilityCooldown(int slot, TimerEC timer)
 {
     abilityCooldown[slot] = timer;
 }
Exemple #17
0
 public void SetAbilityDuration(int slot, TimerEC timer)
 {
     abilityDuration[slot] = timer;
 }