示例#1
0
 private void SetSelected(StatusView view, bool isSelected)
 {
     view.SetCursorVisibility(isSelected);
     _cursorView.Renderer.enabled   = true;
     _cursorView.transform.position = view.Character.View.IconTransform.position;
     _followCamera.LookAt           = view.Character.View.IconTransform;
     _followCamera.Follow           = view.Character.View.IconTransform;
     _battlegroundCamera.Priority   = 0;
 }
示例#2
0
        private void AddCharacter(ICharacter character, StatusView.Alignment alignment)
        {
            StatusView status = _statusFactory.Create();

            status.PanelAlignment = alignment;
            status.Character      = character;
            status.SetName(character.Name);
            status.transform.SetParent(alignment == StatusView.Alignment.Right ?
                                       _view.RightPlatesTransform : _view.LeftPlatesTransform, false);

            character.OnHealthChange += status.HealthChange;
            character.OnManaChange   += status.ManaChange;
            character.TriggerStatRefresh();

            if (alignment == StatusView.Alignment.Right)
            {
                _rightStatuses.Add(status);
            }
            else if (alignment == StatusView.Alignment.Left)
            {
                _leftStatuses.Add(status);
            }
        }