Ejemplo n.º 1
0
 // Start is called before the first frame update
 void Start()
 {
     robotControl.gameObject.SetActive(false);
     dad           = transform.Find("Dad");
     mom           = transform.Find("Mom");
     dd            = transform.Find("DD");
     friend        = transform.Find("Friend");
     dadControl    = transform.Find("Dad").GetComponent <EnemyControl>();
     momControl    = transform.Find("Mom").GetComponent <EnemyControl>();
     ddControl     = transform.Find("DD").GetComponent <EnemyControl>();
     friendControl = transform.Find("Friend").GetComponent <EnemyControl>();
     dadMat        = dadControl.transform.GetChild(0).GetChild(0).GetComponent <SkinnedMeshRenderer>().sharedMaterial;
     momMat        = momControl.transform.GetChild(0).GetChild(0).GetComponent <SkinnedMeshRenderer>().sharedMaterial;
     ddMat         = ddControl.transform.GetChild(0).GetChild(0).GetComponent <SkinnedMeshRenderer>().sharedMaterial;
     friendMat     = friendControl.transform.GetChild(0).GetChild(0).GetComponent <SkinnedMeshRenderer>().sharedMaterial;
     dadMat.SetVector("_Color", Vector4.one);
     momMat.SetVector("_Color", Vector4.one);
     ddMat.SetVector("_Color", Vector4.one);
     friendMat.SetVector("_Color", Vector4.one);
     dad.GetChild(0).GetComponent <BoxCollider>().enabled    = false;
     mom.GetChild(0).GetComponent <BoxCollider>().enabled    = false;
     dd.GetChild(0).GetComponent <BoxCollider>().enabled     = false;
     friend.GetChild(0).GetComponent <BoxCollider>().enabled = false;
     scene4AnimState = Scene4AnimState.NotStart;
 }
Ejemplo n.º 2
0
 public void StartAnim()
 {
     dadControl.StartAnim();
     momControl.StartAnim();
     ddControl.StartAnim();
     friendControl.StartAnim();
     scene4AnimState = Scene4AnimState.isPlaying;
     //dad.GetChild(0).GetComponent<BoxCollider>().enabled = false;
     //mom.GetChild(0).GetComponent<BoxCollider>().enabled = false;
     //dd.GetChild(0).GetComponent<BoxCollider>().enabled = false;
     //friend.GetChild(0).GetComponent<BoxCollider>().enabled = false;
 }