Ejemplo n.º 1
0
    public virtual void Awake()
    {
        useTimer = new CooldownTimer(cooldown);
        useTimer.Clear();
        player = GetComponent <Player>();

        actualCooldown = new UpgradableValue <float>(cooldown, cooldown * 0.7f, Upgrade.generalCooldowns);
    }
Ejemplo n.º 2
0
    protected override void Awake()
    {
        animator  = GetComponentInChildren <Animator>();
        rigidbody = GetComponent <Rigidbody2D>();
        sprite    = GetComponentInChildren <SpriteRenderer>();
        health    = maxHealth;

        actualMaxHealth = new UpgradableValue <float>(maxHealth, maxHealthUp, Upgrade.generalHealth);
    }
Ejemplo n.º 3
0
    // -- Functions ----------------------------------------------------------

    protected ReadOnlyUpgradableValue <T> CreateReadOnlyUpgradableValue(UpgradableValue <T> other)
    {
        ReadOnlyUpgradableValue <T> result = new ReadOnlyUpgradableValue <T>();

        result._defaultValue   = other._defaultValue;
        result._upgradedValues = other._upgradedValues;
        result._levelIndex     = other._levelIndex;

        return(result);
    }
Ejemplo n.º 4
0
    protected virtual void Awake()
    {
        animator  = GetComponentInChildren <Animator>();
        rigidbody = GetComponent <Rigidbody2D>();
        sprite    = GetComponentInChildren <SpriteRenderer>();
        camera    = GetComponentInChildren <Camera>();
        reticle   = transform.FindChild("Reticle").GetComponent <SpriteRenderer>();
        health    = maxHealth;

        actualMaxHealth = new UpgradableValue <float>(maxHealth, maxHealthUp, Upgrade.generalHealth);
        actualMoveSpeed = new UpgradableValue <float>(moveSpeed, moveSpeedUp, Upgrade.generalMove);
        actualJumpSpeed = new UpgradableValue <float>(jumpSpeed, jumpSpeedUp, Upgrade.generalJump);
    }
Ejemplo n.º 5
0
 public override void Awake()
 {
     base.Awake();
     stopBullets    = new CooldownTimer(stopBulletsCooldown);
     actualDuration = new UpgradableValue <float>(duration, durationUp, Upgrade.timeDuration);
 }
Ejemplo n.º 6
0
 public override void Awake()
 {
     base.Awake();
     aim            = new Vector2(1, 0);
     actualDuration = new UpgradableValue <float>(duration, durationUp, Upgrade.cannonballDuration);
 }