private void listAnimations_SelectedIndexChanged(object sender, EventArgs e) { SelectedAnimation = listAnimations.SelectedIndex; textAnimID.Text = AnimationIndex.ToString("X04"); if (OnSelectedAnimation != null) { OnSelectedAnimation(AnimationIndex); } }
private void comboSubanim_SelectedIndexChanged(object sender, EventArgs e) { curSub = comboSubanim.SelectedIndex; textAnimID.Text = AnimationIndex.ToString("X04"); if (OnSelectedAnimation != null) { OnSelectedAnimation(AnimationIndex); } }
public bool PlayAnimationSequence(AnimationIndex index, DialogueWindow.CharacterTexture characterTexture) { NPCAnimations.AnimationSequence playerAnim = RetrieveAnimationSequence(index); List<Texture> playerTex = playerAnim.textures; if (playerTex.Count > 0) { characterTexture.animation.StopAnimation(); characterTexture.animation.SetAnimationList(playerTex); characterTexture.animation.PlayAnimation(); characterTexture.animation.SetSpeed(playerAnim.speed); characterTexture.stretch.initialSize = new Vector2 (playerTex[0].width, playerTex[0].height); return true; } else { Debug.LogError("No texures were found for index " + index.ToString()); return false; } }
private void listCategories_SelectedIndexChanged(object sender, EventArgs e) { SelectedCategory = listCategories.SelectedIndex; textAnimID.Text = AnimationIndex.ToString("X04"); }