//--------------------------------------------------------------- #endregion //--------------------------------------------------------------- //--------------------------------------------------------------- #region Methods //--------------------------------------------------------------- /// <summary> /// Does the manipulation. /// </summary> public void Do() { for (int iSubSet = 0; iSubSet < subSets.Length; iSubSet++) { //Interpolate(animatedJoints, anim.Frames[player.FrameIndex].JointArray, // anim.Frames[player.NextFrameIndex].JointArray, player.Weight); //player.Interpolate(animatedJoints, anim.Frames); if (bindings[iSubSet] == -1) { tags[iSubSet] = Matrix4.Identity; } else { tags[iSubSet] = Matrix4.Invert(anim.Frames[0].JointArray[bindings[iSubSet]]) * animatedJoints[bindings[iSubSet]]; } if (subSets[iSubSet] != null) { PositionStream posStream = (PositionStream)subSets[iSubSet].VertexUnit[typeof(PositionStream), 0]; Skinning.PreBind(animatedJoints, animatedJoints, skeleton.InvertedBindingPose); Skinning.SoftSkin(posStream, source[iSubSet], boneIndicesStream[iSubSet], boneWeightsStream[iSubSet], animatedJoints, false); posStream.Upload(); } } }
protected void rep_starterKitDesigns_ItemDataBound(object sender, RepeaterItemEventArgs e) { if (e.Item.DataItem != null) { cms.businesslogic.packager.repositories.Skin s = (cms.businesslogic.packager.repositories.Skin)e.Item.DataItem; if (Skinning.IsSkinInstalled(s.RepoGuid)) { Button inst = (Button)e.Item.FindControl("Button1"); inst.Text = "Apply"; inst.CommandName = "apply"; inst.CommandArgument = s.Text; //inst.ID = s.Text; } if (ActiveSkin != null && ActiveSkin.Name == s.Text) { Button inst = (Button)e.Item.FindControl("Button1"); inst.Text = "Rollback"; inst.CommandName = "remove"; inst.CommandArgument = s.Text; //inst.ID = s.Text; } } }
public static void LoadLootTemplates_Reference() { Log.outInfo(LogFilter.ServerLoading, "Loading reference loot templates..."); uint oldMSTime = Time.GetMSTime(); List<uint> lootIdSet; Reference.LoadAndCollectLootIds(out lootIdSet); // check references and remove used Creature.CheckLootRefs(lootIdSet); Fishing.CheckLootRefs(lootIdSet); Gameobject.CheckLootRefs(lootIdSet); Items.CheckLootRefs(lootIdSet); Milling.CheckLootRefs(lootIdSet); Pickpocketing.CheckLootRefs(lootIdSet); Skinning.CheckLootRefs(lootIdSet); Disenchant.CheckLootRefs(lootIdSet); Prospecting.CheckLootRefs(lootIdSet); Mail.CheckLootRefs(lootIdSet); Reference.CheckLootRefs(lootIdSet); // output error for any still listed ids (not referenced from any loot table) Reference.ReportUnusedIds(lootIdSet); Log.outInfo(LogFilter.ServerLoading, "Loaded refence loot templates in {0} ms", Time.GetMSTimeDiffToNow(oldMSTime)); }
protected void Page_Load(object sender, EventArgs e) { _templateId = int.Parse(Request["id"]); var t = new Template(_templateId); if (Skinning.StarterKitGuid(_templateId).HasValue) { p_apply.Visible = true; var currentSkin = Skinning.GetCurrentSkinAlias(_templateId); var templateRoot = FindTemplateRoot(t); dd_skins.Items.Add("Choose..."); foreach (var kvp in Skinning.AllowedSkins(templateRoot)) { var li = new ListItem(kvp.Value, kvp.Key); if (kvp.Key == currentSkin) { li.Selected = true; } dd_skins.Items.Add(li); } if (!string.IsNullOrEmpty(Skinning.GetCurrentSkinAlias(_templateId))) { ph_rollback.Visible = true; } } }
public void Init() { writer.SetAudio(() => AudioManager.PlaySound("Writting"), () => AudioManager.StopSound("Writting")); writer.Play("Fin de la démo\n\n\n\n\n\n\nMerci d'avoir joué", Skinning.GetSkin(SkinTag.DELETE)); initializableInterface.InitInternal(); }
protected void Page_Load(object sender, EventArgs e) { templateID = int.Parse(Request["id"]); Template t = new Template(templateID); if (Skinning.StarterKitGuid(templateID).HasValue) { p_apply.Visible = true; string currentSkin = Skinning.GetCurrentSkinAlias(templateID); int templateRoot = FindTemplateRoot((CMSNode)t); dd_skins.Items.Add("Choose..."); foreach (KeyValuePair <string, string> kvp in Skinning.AllowedSkins(templateRoot)) { ListItem li = new ListItem(kvp.Value, kvp.Key); if (kvp.Key == currentSkin) { li.Selected = true; } dd_skins.Items.Add(li); } if (!string.IsNullOrEmpty(Skinning.GetCurrentSkinAlias(templateID))) { ph_rollback.Visible = true; } } }
void InitFightPanel() { Skinning.ResetSkin(selectedSkin); if (fightManager == null) { Debug.LogError(debuguableInterface.debugLabel + "FightManager component shouldn't be null. If we can't get scene references we can't do anything."); } EnemyBundle bundle = gameData.enemyContent.Find(item => { return(item.enemy == actualEnemy); }); CombatDialogue selectedCombat = bundle.combatDialogue; actualTutorial.Init(() => { fightManager.Init( useCheats, bundle.punchlines, bundle.shogunDialogue, audioProjectManager, () => { panelManager.JumpTo(GamePhase.CONSEQUENCES, () => consequencesManager = FindObjectOfType <ConsequencesManager>()); audioProjectManager.FadeMusicOut(1); } ); }); }
protected void openRepo(object sender, EventArgs e) { var g = Skinning.StarterKitGuid(_templateId); if (g == null || !Skinning.HasAvailableSkins(_templateId)) { bt_repo.Visible = false; } else { if (_repo.HasConnection()) { try { rep_starterKitDesigns.DataSource = _repo.Webservice.Skins(g.ToString()); rep_starterKitDesigns.DataBind(); } catch (Exception ex) { LogHelper.Error <TemplateSkinning>("An error occurred", ex); //ShowConnectionError(); } } } p_apply.Visible = false; p_download.Visible = true; }
protected void openRepo(object sender, EventArgs e) { Guid?g = Skinning.StarterKitGuid(templateID); if (g == null || !Skinning.HasAvailableSkins(templateID)) { bt_repo.Visible = false; } else { if (repo.HasConnection()) { try { rep_starterKitDesigns.DataSource = repo.Webservice.Skins(g.ToString()); rep_starterKitDesigns.DataBind(); } catch (Exception ex) { BusinessLogic.Log.Add(BusinessLogic.LogTypes.Debug, -1, ex.ToString()); //ShowConnectionError(); } } else { //ShowConnectionError(); } } p_apply.Visible = false; p_download.Visible = true; }
public void PreInit(CombatDialogue actualCombat) { // assign backgrounds for (int i = 0; i < backgrounds.Length; i++) { backgrounds[i].sprite = actualCombat.sceneBackgrounds[i]; backgrounds[i].color = ColorTools.LerpColorValues(Skinning.GetSkin(backgrounds[i].GetComponent <SkinGraphic>().skin_tag), ColorTools.Value.SV, new int[2] { backgroundSvalue, backgroundVvalue }); backgrounds[i].GetComponent <SkinGraphic>().enabled = false; } this.actualCombat = actualCombat; enemyHealth = new List <SubCategory>(actualCombat.weaknesses); enemyGraph.sprite = actualCombat.enemySprites[4 + enemyHealth.Count]; bigEnemyGraph.sprite = enemyGraph.sprite; playerGraph.sprite = playerSprites[0]; actualPhase = Phase.INTRO; if (actualCombat.actualState == GameData.GameState.GAME_OVER_FINISHER) { enemyHealth.Clear(); enemyGraph.sprite = actualCombat.enemySprites[4]; } }
public static void LoadLootTemplates_Skinning() { Log.outInfo(LogFilter.ServerLoading, "Loading skinning loot templates..."); uint oldMSTime = Time.GetMSTime(); List<uint> lootIdSet; List<uint> lootIdSetUsed = new List<uint>(); uint count = Skinning.LoadAndCollectLootIds(out lootIdSet); // remove real entries and check existence loot var ctc = Global.ObjectMgr.GetCreatureTemplates(); foreach (var pair in ctc) { uint lootid = pair.Value.SkinLootId; if (lootid != 0) { if (!lootIdSet.Contains(lootid)) Skinning.ReportNonExistingId(lootid, pair.Value.Entry); else lootIdSetUsed.Add(lootid); } } foreach (var id in lootIdSetUsed) lootIdSet.Remove(id); // output error for any still listed (not referenced from appropriate table) ids Skinning.ReportUnusedIds(lootIdSet); if (count != 0) Log.outInfo(LogFilter.ServerLoading, "Loaded {0} skinning loot templates in {1} ms", count, Time.GetMSTimeDiffToNow(oldMSTime)); else Log.outError(LogFilter.ServerLoading, "Loaded 0 skinning loot templates. DB table `skinning_loot_template` is empty"); }
protected void Page_Load(object sender, EventArgs e) { if (User.GetCurrent().GetApplications().Find(t => string.Equals(t.alias, Constants.Applications.Settings, StringComparison.OrdinalIgnoreCase)) == null) { throw new Exception("The current user can't edit skins as the user doesn't have access to the Settings section!"); } NodeFactory.Node n = NodeFactory.Node.GetCurrent(); ActiveSkin = Skin.CreateFromAlias(Skinning.GetCurrentSkinAlias(n.template)); pnl_connectionerror.Visible = false; //load dependencies if (ActiveSkin != null && ActiveSkin.Dependencies.Count > 0) { LoadDependencies(); } else { //show skin selection pCustomizeSkin.Visible = false; ltCustomizeSkinStyle.Text = ltChangeSkinStyle.Text; ltChangeSkinStyle.Text = string.Empty; } LoadSkins(); }
void Update() { if (isServer) { if (Input.GetMouseButtonDown(0)) { var boneCount = Random.Range(0, 10); var bones = new Bone[boneCount]; for (var i = 0; i < boneCount; i++) { bones [i] = new Bone() { position = i * Vector3.one } } ; _skinning = new Skinning() { bones = bones }; Debug.LogFormat("Update Skinning w count={0}", boneCount); } } else if (isClient) { } }
// called when we get to the shogun panel void InitShogunPanel() { Skinning.ResetSkin(selectedSkin); if (shogunManager == null) { Debug.LogError(debuguableInterface.debugLabel + "ShogunManager component shouldn't be null. If we can't get scene references we can't do anything."); return; } EnemyBundle bundle = gameData.enemyContent.Find(item => { return(item.enemy == actualEnemy); }); GeneralDialogue selectedGeneral = bundle.shogunDialogue; selectedGeneral.Init(); CombatDialogue selectedCombat = bundle.combatDialogue; shogunManager.Init(useCheats, () => { popupManager.Pop(GamePopup.SHOGUN_DEDUCTION); audioProjectManager.FadeMusicOut(); }, audioProjectManager.FadePopupMusicIn); popupManager.GetPopupFromType <ShogunPopup>().SpecificInit( useCheats, selectedGeneral.GetAllClues(), selectedGeneral.unlockableConclusions, shogunManager.characters, selectedGeneral.goodDeityFeedback, selectedGeneral.badDeityFeedback, () => { popupManager.CancelPop(); audioProjectManager.FadeMusicIn(); }, () => { audioProjectManager.FadeMusicOut(); audioProjectManager.FadePopupMusicOut(); panelManager.JumpTo(GamePhase.FIGHT, () => { fightManager = FindObjectOfType <FightManager>(); fightManager.PreInit(selectedCombat); audioProjectManager.FadeMusicOut(); }); }, selectedCombat.actualState ); if (selectedCombat.actualState == GameState.NORMAL) { gameData.ResetPlayerClues(); } actualTutorial.Init(() => shogunManager.StartDialogue(selectedGeneral)); }
protected void Page_Load(object sender, EventArgs e) { skinpicker.Items.Add("Choose..."); foreach (Skin s in Skinning.GetAllSkins()) { skinpicker.Items.Add(new ListItem(s.Name, s.Alias)); } }
void Update() { if (!is_skinned && Skinning.IsReady()) { Skin(); Skinning.Register(this); } }
protected void apply(object sender, EventArgs e) { if (dd_skins.SelectedIndex > 0) { Skin s = Skin.CreateFromAlias(dd_skins.SelectedValue); Skinning.ActivateAsCurrentSkin(s); } }
void InitConsequencesPanel() { Skinning.ResetSkin(selectedSkin); if (consequencesManager == null) { Debug.LogError(debuguableInterface.debugLabel + "ConsequencesManager component shouldn't be null. If we can't get scene references we can't do anything."); } EnemyBundle bundle = gameData.enemyContent.Find(item => { return(item.enemy == actualEnemy); }); CombatDialogue selectedCombat = bundle.combatDialogue; string textToShow = string.Empty; switch (selectedCombat.actualState) { case GameData.GameState.GAME_OVER_GENERAL: textToShow = bundle.combatDialogue.playerLoseGeneralConsequence; break; case GameData.GameState.GAME_OVER_FINISHER: textToShow = bundle.combatDialogue.playerLoseFinalConsequence; break; default: textToShow = bundle.combatDialogue.playerWinConsequence; break; } consequencesManager.Init( selectedCombat.actualState, (int)actualEnemy, () => panelManager.JumpTo(GamePhase.END, () => { endManager = FindObjectOfType <EndManager>(); audioProjectManager.FadeMusicOut(); }), () => panelManager.JumpTo(GamePhase.SHOGUN, () => { shogunManager = FindObjectOfType <ShogunManager>(); shogunManager.PreInit( selectedCombat.actualState, gameData.enemyContent.Find(item => { return(item.enemy == actualEnemy); }).shogunDialogue, AddClueToPlayer ); audioProjectManager.FadeMusicOut(); }), () => panelManager.JumpTo(GamePhase.FIGHT, () => { fightManager = FindObjectOfType <FightManager>(); fightManager.PreInit(selectedCombat); audioProjectManager.FadeMusicOut(); }), () => actualEnemy++, textToShow ); }
void TestSkin() { Skinning.Init(data); foreach (SkinGraphic graphic in Resources.FindObjectsOfTypeAll <SkinGraphic>()) { graphic.Skin(); } }
void SpawnAttackReaction(string reaction) { enemyDialoguePosition.gameObject.SetActive(true); lastWriter = Instantiate(writerPrefab, enemyDialoguePosition.GetChild(1)); lastWriter.GetComponent <TextMeshProUGUI>().font = normalFont; lastWriter.GetComponent <TextMeshProUGUI>().wordSpacing = 0; lastWriter.SetAudio(() => AudioManager.PlaySound("Writting"), () => AudioManager.StopSound("Writting")); lastWriter.Play(reaction, preCombatWriterSpeed, preCombatWriterTrailLength, Skinning.GetSkin(preCombatEnnemyHighlight), Skinning.GetSkin(preCombatEnnemyColor)); }
void InitEnd() { Skinning.ResetSkin(selectedSkin); if (endManager == null) { Debug.LogError(debuguableInterface.debugLabel + "EndManager component shouldn't be null. If we can't get scene references we can't do anything."); } endManager.Init(); }
void OnSkinningChanged(Skinning skinning) { var bones = skinning.bones; var buf = new StringBuilder(); buf.AppendFormat("Observe Skinning w count={0}", bones.Length); for (var i = 0; i < bones.Length; i++) { buf.AppendFormat(" i={0} p={1}", i, bones [i].position); } Debug.Log(buf); }
protected void SelectStarterKitDesign(object sender, EventArgs e) { if (((Button)sender).CommandName == "apply") { Skin s = Skin.CreateFromName(((Button)sender).CommandArgument); Skinning.ActivateAsCurrentSkin(s); Page.Response.Redirect(library.NiceUrl(int.Parse(UmbracoContext.Current.PageId.ToString()))); } else if (((Button)sender).CommandName == "remove") { NodeFactory.Node n = NodeFactory.Node.GetCurrent(); Template t = new Template(n.template); Skinning.RollbackSkin(t.Id); Page.Response.Redirect(library.NiceUrl(int.Parse(UmbracoContext.Current.PageId.ToString()))); } else { Guid kitGuid = new Guid(((Button)sender).CommandArgument); cms.businesslogic.packager.Installer installer = new cms.businesslogic.packager.Installer(); if (repo.HasConnection()) { cms.businesslogic.packager.Installer p = new cms.businesslogic.packager.Installer(); string tempFile = p.Import(repo.fetch(kitGuid.ToString())); p.LoadConfig(tempFile); int pID = p.CreateManifest(tempFile, kitGuid.ToString(), repoGuid); p.InstallFiles(pID, tempFile); p.InstallBusinessLogic(pID, tempFile); p.InstallCleanUp(pID, tempFile); library.RefreshContent(); if (cms.businesslogic.skinning.Skinning.GetAllSkins().Count > 0) { cms.businesslogic.skinning.Skinning.ActivateAsCurrentSkin(cms.businesslogic.skinning.Skinning.GetAllSkins()[0]); } Page.Response.Redirect(library.NiceUrl(int.Parse(UmbracoContext.Current.PageId.ToString()))); } else { //ShowConnectionError(); } } }
/// <summary> /// Draws the ground shadow. /// </summary> public void DrawGroundShadow() { Effect.ApplyAllMatrixVariables(); Skinning.ApplyEffect(Effect.EffectFile); RenderContext.DeviceManager.Device.ImmediateContext.InputAssembler.SetVertexBuffers(0, new VertexBufferBinding(BufferManager.VertexBuffer, BasicInputLayout.SizeInBytes, 0)); RenderContext.DeviceManager.Device.ImmediateContext.InputAssembler.SetIndexBuffer( BufferManager.IndexBuffer, Format.R32_UInt, 0); RenderContext.DeviceManager.Device.ImmediateContext.InputAssembler.InputLayout = BufferManager.VertexLayout; RenderContext.DeviceManager.Device.ImmediateContext.InputAssembler.PrimitiveTopology = PrimitiveTopology.TriangleList; SubsetManager.DrawGroundShadow(); }
/// <summary> /// モデルを更新するときに呼び出します /// </summary> public void Update() { if (BufferManager != null) { BufferManager.RecreateVerticies(); } Morphmanager.UpdateFrame(); Skinning.UpdateSkinning(Morphmanager); foreach (var pmxSubset in SubsetManager.Subsets) { pmxSubset.MaterialInfo.UpdateMaterials(); } }
public void Init(Transform start, SkinTag normal, SkinTag validated, SkinTag wrong, SkinTag old, SubCategory startClue = SubCategory.EMPTY) { this.start = start; this.startClue = startClue; endClue = SubCategory.EMPTY; normalColor = Skinning.GetSkin(normal); validatedColor = Skinning.GetSkin(validated); wrongColor = Skinning.GetSkin(wrong); oldColor = Skinning.GetSkin(old); initializableInterface.InitInternal(); }
protected void SelectLocalStarterKitDesign(object sender, EventArgs e) { if (((Button)sender).CommandName == "apply") { Skinning.ActivateAsCurrentSkin(Skin.CreateFromName(((Button)sender).CommandArgument)); this.Page.Response.Redirect(library.NiceUrl(int.Parse(UmbracoContext.Current.PageId.ToString())) + "?umbSkinning=true"); } else if (((Button)sender).CommandName == "remove") { Template template = new Template(Node.GetCurrent().template); Skinning.RollbackSkin(template.Id); this.Page.Response.Redirect(library.NiceUrl(int.Parse(UmbracoContext.Current.PageId.ToString())) + "?umbSkinning=true"); } }
private String _GetDebugWarnings() { var sb = new StringBuilder(); if (Geometry.TryGetNormal(out Vector3 n)) { if (!n.IsValidNormal()) { sb.Append($" ❌𝚴:{n}"); } } if (Geometry.TryGetTangent(out Vector4 t)) { if (!t.IsValidTangent()) { sb.Append($" ❌𝚻:{t}"); } } for (int i = 0; i < Material.MaxColors; ++i) { var c = Material.GetColor(i); if (!c._IsFinite() | !c.IsInRange(Vector4.Zero, Vector4.One)) { sb.Append($" ❌𝐂{i}:{c}"); } } for (int i = 0; i < Material.MaxTextCoords; ++i) { var uv = Material.GetTexCoord(i); if (!uv._IsFinite()) { sb.Append($" ❌𝐔𝐕{i}:{uv}"); } } for (int i = 0; i < Skinning.MaxBindings; ++i) { var jw = Skinning.GetJointBinding(i); if (!jw.Weight._IsFinite() || jw.Weight < 0 || jw.Index < 0) { sb.Append($" ❌𝐉𝐖{i} {jw.Index}:{jw.Weight}"); } } return(sb.ToString()); }
protected virtual void AddSkinningModules() { // SKINNING // verify access to settings area if (User.GetCurrent().GetApplications().Find(t => string.Equals(t.alias, Umbraco.Core.Constants.Applications.Settings, StringComparison.OrdinalIgnoreCase)) != null) { //only add if there is a skin NodeFactory.Node n = NodeFactory.Node.GetCurrent(); if (!string.IsNullOrEmpty(Skinning.GetCurrentSkinAlias(n.template)) || Skinning.HasAvailableSkins(n.template)) { m_Manager.LiveEditingContext.Menu.Add(new Separator()); m_Manager.LiveEditingContext.Menu.Add(new SkinModule(m_Manager)); } } }
void Awake() { if (!isTesting) { return; } actualDialogue = 0; blockInput = true; isPlayerNext = string.IsNullOrEmpty(dialogues[0].playerLine) ? false : true; toShogunCallback = () => Debug.Log(debugableInterface.debugLabel + "Can't change scen in test mode"); Skinning.Init(test); StartDialogue(); }
public SPCoverBar(SpiderHost host, Skinning.Style style) { this.Host = host; this.Style = style; }