示例#1
0
    public void useItem()
    {
        if (this.itemName == "Potion")
        {
            Ouros = FindObjectOfType <Ouros>();
            if (Ouros.HP != Ouros.maxHP)
            {
                if (Ouros.HP + 100 > Ouros.maxHP)
                {
                    Ouros.HP = Ouros.maxHP;
                }
                else
                {
                    Ouros.HP += 100;
                }

                Ouros.item.amount -= 1;
            }
        }
        if (this.itemName == "Ether")
        {
            Ouros = FindObjectOfType <Ouros>();
            if (Ouros.magic.unLimit == false)
            {
                Ouros.GetComponent <Ouros>().magic.charge += 5;
                Ouros.item.amount -= 1;
            }
        }
    }
示例#2
0
文件: Move.cs 项目: xrofng/Blasphemy
 void Start()
 {
     doubleJumpAbilities = false;
     cameraPeekAbilities = false;
     doublieJumpSpeed    = 80 * (jumpSpeed / 100);
     maxSpeed            = speed;
     rid2d        = GetComponent <Rigidbody2D>();
     animator     = GetComponent <Animator>();
     gravityStore = rid2d.gravityScale;
     Ouros        = GetComponent <Ouros>();
     IngamePut    = true;
     adInput      = true;
 }
示例#3
0
 // Use this for initialization
 void Start()
 {
     Ouros = FindObjectOfType <Ouros>();
 }