public void OnDropRun()
 {
     if (_locked)
     {
         return;
     }
     if (_priceType != PriceType.None)
     {
         UICursorManager.Clear();
         BuyHero();
     }
 }
    //Buy Hero by Gold
    //drag gold to target for summon Hero
    public void OnDragGold()
    {
        if (_locked)
        {
            return;
        }
        if (_priceType != PriceType.Gold)
        {
            UICursorManager.Set(_goldPriceName);
            _priceType = PriceType.Gold;

            iTween.Stop(uiTutorial.hand);
            uiTutorial.hand.SetActive(false);
        }
    }
    //Buy Hero by Silver
    //drag silver to target for summon Hero
    public void OnDragSilver()
    {
        if (_locked)
        {
            return;
        }
        if (_priceType != PriceType.Silver)
        {
            UICursorManager.Set(_silverPriceName);
            _priceType = PriceType.Silver;

            iTween.Stop(uiTutorial.hand);
            uiTutorial.hand.SetActive(false);
        }
    }
示例#4
0
    void PickUp()
    {
        PickedUp = true;
        OwnDesk.LightRef.EnableLight(true);
        CurrentlyHeld = this;
        AtDesk        = false;
        AtCooler      = false;

        Complaining.Play();
        Complaining.time = 1f;
        AngryMeow.Play();
        AnimatorRef.SetBool("Moving", true);

        UICursorManager.SetCursorPickup();
    }
示例#5
0
    void Drop()
    {
        PickedUp           = false;
        transform.position = Utils.MouseWorldPosition(0f);
        OwnDesk.LightRef.EnableLight(false);

        Watercooler nearbyCooler = GetNearestCooler();

        if (Vector3.Distance(transform.position, OwnDesk.WorkLocation.transform.position) <
            Vector3.Distance(transform.position, nearbyCooler.transform.position))
        {
            ReturnToDesk();
        }
        else
        {
            GoToWaterCooler(nearbyCooler);
        }
        CurrentlyHeld = null;

        Complaining.Stop();

        UICursorManager.SetCursorHover();
    }
 public static void OnDragRelease()
 {
     UICursorManager.Set(null);
 }
 public void OnDragRelease()
 {
     _priceType = PriceType.None;
     UICursorManager.Clear();
 }
示例#8
0
 void OnDestroy()
 {
     mInstance = null;
 }
示例#9
0
 void Awake()
 {
     mInstance = this;
 }
 private void OnEnable()
 {
     Singleton = this;
 }