void UpdateStartAnimation() { if (!_myAnimation.isPlaying) { _myAnimation.Play("loop"); _animationUpdater = UpdateEmpty; } }
void Awake() { foreach (Renderer r in _renderers) { r.sharedMaterial = Utils.CloneMaterial(r.sharedMaterial); } _animationUpdater = new UpdateAnimation(UpdateEmpty); }
void UpdateEndAnimation() { if (!_myAnimation.isPlaying) { foreach (Renderer r in _renderers) { r.enabled = false; } _animationUpdater = UpdateEmpty; } }
private void Animation_border_MouseRightButtonDown(object sender, MouseButtonEventArgs e) { if (FormExecution.PlayerInfos.Rank < PlayerRank.Animateurs) { return; } UpdateAnimation control = new UpdateAnimation(_anim); control.Show(); Application.Current.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Normal, new Action(() => control.Activate())); control.SendUpdate += Control_SendUpdate; }
public override float EndEffect() { foreach (ParticleSystem ps in _particles) { ps.enableEmission = false; ps.Stop(); } _myAnimation.Play("end"); _animationUpdater = UpdateEndAnimation; if (_pointLight != null) { _pointLight.SetActive(false); } return(0.0f); }
public static Page GetChartContentPage(ChartSample chartSample) { Page page = null; switch (chartSample.SampleViewType) { case (int)ChartSampleViewType.GETTING_STARTED: page = new GettingStartedSample(); break; case (int)ChartSampleViewType.CHART_TYPES: page = new ChartTypesSample(); break; case (int)ChartSampleViewType.MIXED_CHART_TYPES: page = new MixedChartTypesSample(); break; case (int)ChartSampleViewType.LEGEND_AND_TITLES: page = new TitleAndLegendSample(); break; case (int)ChartSampleViewType.TOOLTIPS: page = new TooltipsSample(); break; case (int)ChartSampleViewType.STYLING_SERIES: page = new StylingSeriesSample(); break; case (int)ChartSampleViewType.CUSTOMIZING_AXES: page = new CustomizingAxesSample(); break; case (int)ChartSampleViewType.THEMING: page = new ThemingSample(); break; case (int)ChartSampleViewType.SELECTION_MODES: page = new SelectionModesSample(); break; case (int)ChartSampleViewType.TOGGLE_SERIES: page = new ToggleSeriesSample(); break; case (int)ChartSampleViewType.DYNAMIC_CHARTS: page = new DynamicChartsSample(); break; case (int)ChartSampleViewType.BUBBLE_CHART: page = new BubbleChartSample(); break; case (int)ChartSampleViewType.FINANCIAL_CHART: page = new FinancialChart(); break; case (int)ChartSampleViewType.ZOOMING_AND_SCROLLING: page = new ZoomingAndScrolling(); break; case (int)ChartSampleViewType.HITTEST: page = new HitTest(); break; case (int)ChartSampleViewType.ANIMATION: page = new AnimationOptions(); break; case (int)ChartSampleViewType.MUTIPLE_AXES: page = new MultipleAxesSamples(); break; case (int)ChartSampleViewType.CUSTOM_PLOT_ELEMENTS: page = new CustomPlotElements(); break; case (int)ChartSampleViewType.CONDITIONAL_FORMAT: page = new ConditionalFormatting(); break; case (int)ChartSampleViewType.DATA_LABEL: page = new DataLabelSample(); break; case (int)ChartSampleViewType.SNAPSHOT: page = new Snapshot(); break; case (int)ChartSampleViewType.UPDATE_ANIMATION: page = new UpdateAnimation(); break; case (int)ChartSampleViewType.SCROLLING: page = new ScrollingSample(); break; } page.Title = chartSample.Name; return(page); }
public void Calculate2() { currentPlayer = 6; if (currentPlayer == 6) { if (Attack1Success == true && Attack2Success == true) { //Debug.Log("Something!"); player2_hp -= 15; //HealthSlider.health -= 20f; player1_hp -= 15; //HealthSlider.health -= 20f; } else if (Attack1Success == true && Dodge2Success == true) { //Debug.Log("Something2!"); } else if (Dodge1Success == true && Attack2Success == true) { //Debug.Log("Something3!"); } else if (Dodge1Success == true && Dodge2Success == true) { //Debug.Log("Something!4"); } else if (Attack1Success == true && Dodge2Success == false) { //Debug.Log("Something!5"); player2_hp -= 15; //HealthSlider.health -= 10f; } else if (Dodge1Success == false && Attack2Success == true) { // Debug.Log("Something!6"); player1_hp -= 15; //HealthSlider.health -= 10f; } if (Heal1Success == true) { if (player1_hp + 15 >= 100) { player1_hp = 100; } else { player1_hp += 10; } } if (Heal2Success == true) { if (player2_hp + 15 >= 100) { player2_hp = 100; } else { player2_hp += 10; } } if (Attack1Success) { UpdateAnimation ScriptRef = Player1Ref.GetComponent <UpdateAnimation>(); StartCoroutine(ScriptRef.AnimatorControl()); Player1Combo += 1; } else if (Attack1Success == false) { Player1Combo = 0; } if (Attack2Success) { Player2Combo += 1; } else if (Attack2Success == false) { Player2Combo = 0; } if (Player1Combo >= 3) { player2_hp -= 10; Player1Combo = 0; } if (Player2Combo >= 3) { player1_hp -= 10; Player2Combo = 0; } Attack1Success = false; Attack2Success = false; Dodge1Success = false; Dodge2Success = false; Heal1Success = false; Heal2Success = false; //SpeedUpPendP1 = false; //SpeedUpPendP2 = false; currentPlayer = 1; } }