Question by 
               $$anonymous$$ · Jun 24, 2017 at 08:32 AM · 
                c#unity 5coroutinesdesign-patternsbest practices  
              
 
              Unity MVC animation coroutine
Hello everybody!
I'm not that good at MVC pattern and now I'm concerned about where to put animation coroutine. I've placed it under the controller, calling StartCoroutine(...) on the view, like this:
 public void Crush( )
 {
     view.StartCoroutine(CrushRoutine(...));
 }
 
 private IEnumerator CrushRoutine(...)
 {
     // Doing stuff here
 }
- view is a class that derives from MonoBehaviour, of course... 
Is it a good practice to do like this, or should I move the coroutine code to the view class and call something like PlayCrushRoutine(...) from the controller class (in terms of MVC design patter practices)?
THANK YOU ALL IN ADVANCE!
               Comment
              
 
               
              Your answer
 
 
              koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                