Ejemplo n.º 1
0
        /* https://stackoverflow.com/a/11419400/9628054 */
        public static eeNumber Power(eeNumber base_, eeNumber exp)
        {
            var y = ONE.Copy();

            while (true)
            {
                if ((exp & ONE) != ZERO)
                {
                    y *= base_;
                }
                exp >>= 1;
                if (exp == ZERO)
                {
                    return(y);
                }
                base_ *= base_;
            }
        }
Ejemplo n.º 2
0
    public void OnClick()
    {
        hasBought           = true;
        button.interactable = false;
        text.fontSize       = 40;
        text.text           = "HIRED!";
        text.color          = new Color(1f, 0.2f, 0.2f);

        Money.money -= buyPrice;

        switch (targetModuleNumber)
        {
        case 1:
            ONE.ManagerPurchase();
            break;

        case 2:
            TWO.ManagerPurchase();
            break;

        case 3:
            THREE.ManagerPurchase();
            break;

        case 4:
            FOUR.ManagerPurchase();
            break;

        case 5:
            break;

        case 6:
            break;

        case 7:
            break;

        case 8:
            break;
        }

        SaveSystem.SaveAll();
    }
Ejemplo n.º 3
0
        public eeNumber Factorial()
        {
            if (this < ZERO)
            {
                throw new Exception();
            }
            else if (this == ZERO)
            {
                return(ONE.Copy());
            }

            var sum = ONE.Copy();

            for (eeNumber i = this.Copy(); i > ZERO; i -= ONE)
            {
                sum *= i;
            }

            return(sum);
        }
Ejemplo n.º 4
0
        public override void GetHit(float damage)
        {
            base.GetHit(damage);

            ONE.StartCoroutine(HitAnimation());
        }
Ejemplo n.º 5
0
 protected virtual void Die()
 {
     ONE.AgentDied(this);
     Trans.GetComponent <Collider>().enabled = false;
     Destroy(Trans.gameObject, 2);
 }