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); } }
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(); }
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(); }
void OnDestroy() { mInstance = null; }
void Awake() { mInstance = this; }
private void OnEnable() { Singleton = this; }