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