Coin Animation (not synced)

AnimationHandler
This commit is contained in:
brausjonas
2023-01-31 23:21:50 +01:00
parent b479594017
commit 4157107813
16 changed files with 420 additions and 16 deletions
@@ -1,3 +1,4 @@
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
@@ -15,6 +16,14 @@ public abstract class Player : MonoBehaviour
public int index;
public int coins = 0;
//for coin animation
private AnimationHandler animationHandler;
private void Start()
{
animationHandler = GetComponentInChildren<AnimationHandler>();
}
//Aktiviert den Player
public void Activate()
{
@@ -29,4 +38,19 @@ public abstract class Player : MonoBehaviour
}
public abstract void Init();
public void PlayAnimation(AnimationType animationType)
{
switch (animationType)
{
case AnimationType.Coin:
animationHandler.StartAnimation();
break;
}
}
public enum AnimationType
{
Coin
}
}