40 lines
866 B
C#
40 lines
866 B
C#
using System;
|
|
using UnityEngine;
|
|
|
|
public class AblaufKleinerStern3 : MonoBehaviour
|
|
{
|
|
public GameObject mariaAufEsel;
|
|
|
|
private Action nextStep;
|
|
|
|
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
|
void Start()
|
|
{
|
|
nextStep = AuftrittMariaUndJoseph;
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
if (Input.GetKeyDown(KeyCode.Space)){
|
|
nextStep();
|
|
}
|
|
}
|
|
|
|
private void AuftrittMariaUndJoseph(){
|
|
mariaAufEsel.GetComponent<FigurMitBeinenBewegung>().GoToXPosition(1);
|
|
nextStep = AuftrittKleinerStern;
|
|
}
|
|
|
|
private void AuftrittKleinerStern(){
|
|
nextStep = EinStueckWeiter;
|
|
}
|
|
|
|
private void EinStueckWeiter(){
|
|
nextStep = Abgang;
|
|
}
|
|
|
|
private void Abgang(){
|
|
nextStep = delegate(){};
|
|
}
|
|
}
|