예제 #1
0
 private void listAnimations_SelectedIndexChanged(object sender, EventArgs e)
 {
     SelectedAnimation = listAnimations.SelectedIndex;
     textAnimID.Text   = AnimationIndex.ToString("X04");
     if (OnSelectedAnimation != null)
     {
         OnSelectedAnimation(AnimationIndex);
     }
 }
예제 #2
0
 private void comboSubanim_SelectedIndexChanged(object sender, EventArgs e)
 {
     curSub          = comboSubanim.SelectedIndex;
     textAnimID.Text = AnimationIndex.ToString("X04");
     if (OnSelectedAnimation != null)
     {
         OnSelectedAnimation(AnimationIndex);
     }
 }
예제 #3
0
    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;
        }
    }
예제 #4
0
 private void listCategories_SelectedIndexChanged(object sender, EventArgs e)
 {
     SelectedCategory = listCategories.SelectedIndex;
     textAnimID.Text  = AnimationIndex.ToString("X04");
 }