コード例 #1
0
    public void Water()
    {
        // Set state to true
        Watered = true;

        // Wait a certain amount of time before playing the animations
        TimedEventManager.GetInstance().AddTimedEvent(timeBeforeAnimationStarts, () => {
            // Play watering animation
            foreach (ParticleSystem i in wateredParticles)
            {
                i.Play();
            }

            // Delay a certain amount of time before swapping meshes
            TimedEventManager.GetInstance().AddTimedEvent(timeBeforeAnimationStarts, () => {
                EnableRendering(Watered);
            });

            // Play sound
            //AudioManager.PlaySound("Water");
        });
    }
コード例 #2
0
 // Use this for initialization
 void Start()
 {
     TimedEventManager.GetInstance().AddTimedEvent(.5f, () => {
         theAnimator.SetTrigger("doStand");
     });
 }