void Start() { workAnimation = FindObjectOfType <WorkAnimation>().GetComponent <WorkAnimation>(); switchActive = FindObjectOfType <SwitchActive>().GetComponent <SwitchActive>(); //boxStackAnimation = GameObject.Find("BoxStack_Animation"); //Debug.Log(boxStackAnimation); truckAnimation = FindObjectOfType <TruckAnimation>().GetComponent <TruckAnimation>(); }
public static Bitmap FindResource(TruckAnimation animation) { switch (animation) { case TruckAnimation.Left2Right: return(Properties.Resources.TruckLeftRight); case TruckAnimation.Left2Top: return(Properties.Resources.TruckLetfTop); case TruckAnimation.Left2Bottom: return(Properties.Resources.TruckLeftBottom); case TruckAnimation.Right2Left: return(Properties.Resources.TruckRightLeft); case TruckAnimation.Right2Top: return(Properties.Resources.TruckRightTop); case TruckAnimation.Right2Bottom: return(Properties.Resources.TruckRightBottom); case TruckAnimation.Top2Left: return(Properties.Resources.TruckTopLeft); case TruckAnimation.Top2Bottom: return(Properties.Resources.TruckTopBottom); case TruckAnimation.Top2Right: return(Properties.Resources.TruckTopRight); case TruckAnimation.Bottom2Left: return(Properties.Resources.TruckBottomLeft); case TruckAnimation.Bottom2Top: return(Properties.Resources.TruckBottomTop); case TruckAnimation.Bottom2Right: return(Properties.Resources.TruckBottomRight); default: Console.Error.WriteLine("Unhandled animation: " + animation); return(Properties.Resources.Missing); //FIXME Not the good one !!! } }
public static Bitmap FindResource(TruckAnimation animation) { switch (animation) { case TruckAnimation.Left2Right: return Properties.Resources.TruckLeftRight; case TruckAnimation.Left2Top: return Properties.Resources.TruckLetfTop; case TruckAnimation.Left2Bottom: return Properties.Resources.TruckLeftBottom; case TruckAnimation.Right2Left: return Properties.Resources.TruckRightLeft; case TruckAnimation.Right2Top: return Properties.Resources.TruckRightTop; case TruckAnimation.Right2Bottom: return Properties.Resources.TruckRightBottom; case TruckAnimation.Top2Left: return Properties.Resources.TruckTopLeft; case TruckAnimation.Top2Bottom: return Properties.Resources.TruckTopBottom; case TruckAnimation.Top2Right: return Properties.Resources.TruckTopRight; case TruckAnimation.Bottom2Left: return Properties.Resources.TruckBottomLeft; case TruckAnimation.Bottom2Top: return Properties.Resources.TruckBottomTop; case TruckAnimation.Bottom2Right: return Properties.Resources.TruckBottomRight; default: Console.Error.WriteLine("Unhandled animation: " + animation); return Properties.Resources.Missing; //FIXME Not the good one !!! } }
/// <summary> /// Start animation /// </summary> public void StartAnimation(TruckAnimation animation) { StartAnimation(Animations.FindResource(animation), false); }