public void acceptItem() { inspectDone(); Misc.AnimateMovementTo("ok_move_" + id, this.gameObject, InspectUI.instance.objectOk.transform.localPosition); Misc.AnimateScaleTo("ok_scale_" + id, this.gameObject, Vector3.zero); BagHandler.instance.bagInspectItemEnded(); }
public void throwAway() { inspectDone(); Misc.AnimateMovementTo("throw_away_move_" + id, this.gameObject, InspectUI.instance.throwAway.transform.localPosition); Misc.AnimateScaleTo("throw_away_scale_" + id, this.gameObject, Vector3.zero); BagHandler.instance.bagInspectItemEnded(); }
public void sendItemToManualInspect(bool sameTray = true) { inspectDone(); // TODO - Animate to the clicked icon... right now it only looks correct for the big, single button (use the bool in arguments) Misc.AnimateMovementTo("manual_inspect_move_" + id, this.gameObject, InspectUI.instance.manualInspect.transform.localPosition); Misc.AnimateScaleTo("manual_inspect_scale_" + id, this.gameObject, Vector3.zero); BagHandler.instance.bagInspectItemEnded(!sameTray); }
public void animateToBag(float timeToDropPoint = TIME_ANIMATE_TO_DROP_POINT, float timeToTargetPos = TIME_TO_TARGET_POS) { transform.SetParent(parentBag); Misc.AnimateMovementTo("put_back_move_" + id, this.gameObject, locationInBag + new Vector3(0f, parentBag.GetComponentInParent <BagProperties>().halfBagHeight * 3f, 0f), timeToDropPoint); Misc.AnimateRotationTo("put_back_rotate_" + id, this.gameObject, rotationInBag, timeToDropPoint); Misc.AnimateScaleTo("put_back_scale_" + id, this.gameObject, Vector3.one, timeToDropPoint); StartCoroutine(delayedPutBackToTarget(timeToDropPoint, timeToTargetPos)); }
public void callPolice() { Person reportPerson = currentInspectedItem.person; BagProperties inspectedBag = currentInspectedItem.parentBag.GetComponentInParent <BagProperties>(); inspectDone(); Misc.AnimateMovementTo("call_police_move_" + id, this.gameObject, InspectUI.instance.callPolice.transform.localPosition); Misc.AnimateScaleTo("call_police_scale_" + id, this.gameObject, Vector3.zero); BagHandler.instance.bagInspectItemEnded(); StartCoroutine(reportPersonAfterDelay(reportPerson, inspectedBag)); }
private IEnumerator toggleTVState(bool toggledState) { float topBottomTargetZ = toggledState ? topBottomTurnOnScaleZ : topBottomTurnOffScaleZ; float leftRightTargetX = toggledState ? leftRightTurnOnScaleX : leftRightTurnOffScaleX; Vector3 topBarTargetScale = new Vector3(blackBarTop.transform.localScale.x, blackBarTop.transform.localScale.y, topBottomTargetZ); Vector3 bottomBarTargetScale = new Vector3(blackBarBottom.transform.localScale.x, blackBarBottom.transform.localScale.y, topBottomTargetZ); Misc.AnimateScaleTo("tvPowerToggleTopBar", blackBarTop, topBarTargetScale, Misc.DEFAULT_ANIMATION_TIME, Misc.ANIMATION_SQRT); Misc.AnimateScaleTo("tvPowerToggleBottomBar", blackBarBottom, bottomBarTargetScale, Misc.DEFAULT_ANIMATION_TIME, Misc.ANIMATION_SQRT); yield return(new WaitForSeconds(0.2f)); Vector3 leftBarTargetScale = new Vector3(leftRightTargetX, blackBarLeft.transform.localScale.y, blackBarLeft.transform.localScale.z); Vector3 rightBarTargetScale = new Vector3(leftRightTargetX, blackBarRight.transform.localScale.y, blackBarRight.transform.localScale.z); Misc.AnimateScaleTo("tvPowerToggleLeftBar", blackBarLeft, leftBarTargetScale, Misc.DEFAULT_ANIMATION_TIME, Misc.ANIMATION_SQRT); Misc.AnimateScaleTo("tvPowerToggleRightBar", blackBarRight, rightBarTargetScale, Misc.DEFAULT_ANIMATION_TIME, Misc.ANIMATION_SQRT); }
public void animateAndDestroy() { // Misc.AnimateMovementTo("person_passport_hide_" + id, gameObject, passportTargetPosition); Misc.AnimateScaleTo("passport_scale_destroy_" + id, gameObject, new Vector3(0.001f, 0.001f, 0.001f)); Misc.SetActiveAfterDelay("passport_active_destroy_" + id, gameObject, false, true); }