private void OnDestroy() { uiMapManager = null; infoManager = null; areaManager = null; mapCamera = null; overView = null; overCamera = null; commonDialog = null; character = null; howToStrategy = null; }
private void OnDestroy() { this.uiMapManager = null; this.infoManager = null; this.areaManager = null; this.mapCamera = null; this.overView = null; this.overCamera = null; this.commonDialog = null; this.character = null; this.howToStrategy = null; }
public void OnClick() { StrategyShipCharacter component = UIflagShip.GetComponent <StrategyShipCharacter>(); if (!(component == null) && component.shipModel != null) { int num = UIflagShip.TouchedPartnerShip(component.shipModel); ShipUtils.PlayShipVoice(component.shipModel, num); int lov = component.shipModel.Lov; component.shipModel.LovAction(0, num); bool isLovUp = component.shipModel.Lov - lov > 0; bool isLovDown = component.shipModel.Lov - lov < 0; PlayMotion(component, isLovUp, isLovDown); SingletonMonoBehaviour <Live2DModel> .Instance.Play(); } }
private void PlayMotion(StrategyShipCharacter character, bool isLovUp, bool isLovDown) { this.HeartAction(isLovUp, isLovDown, false); if (this.UIflagShip.getClickedCount() == 0) { if (character.shipModel.IsMarriage()) { SingletonMonoBehaviour <Live2DModel> .Instance.ChangeMotion(Live2DModel.MotionType.Secret); } else { SingletonMonoBehaviour <Live2DModel> .Instance.ChangeMotion(Live2DModel.MotionType.Port); } } else if (this.UIflagShip.getClickedCount() < 4) { if (character.shipModel.Lov >= 700) { SingletonMonoBehaviour <Live2DModel> .Instance.ChangeMotion((Live2DModel.MotionType) Random.Range(6, 8)); } else if (character.shipModel.Lov >= 500) { SingletonMonoBehaviour <Live2DModel> .Instance.ChangeMotion(Live2DModel.MotionType.Love1); } else { SingletonMonoBehaviour <Live2DModel> .Instance.ChangeMotion(Live2DModel.MotionType.Port); } } else if (character.shipModel.Lov >= 25 || character.shipModel.IsMarriage()) { SingletonMonoBehaviour <Live2DModel> .Instance.ChangeMotion(Live2DModel.MotionType.Port); } else if (character.shipModel.Lov <= 10) { SingletonMonoBehaviour <Live2DModel> .Instance.ChangeMotion((Live2DModel.MotionType) Random.Range(4, 6)); } else { SingletonMonoBehaviour <Live2DModel> .Instance.ChangeMotion(Live2DModel.MotionType.Dislike2); } }