예제 #1
0
    private IEnumerator FogAnimationThread()
    {
        yield return(null);

        yield return(null);

        FogScript component  = fog1.GetComponent <FogScript>();
        Vector2   sizeDelta  = fog1.GetComponent <RectTransform>().sizeDelta;
        Vector3   initalPos  = new Vector3(sizeDelta.x / 4f, -55f, 0f);
        Vector2   sizeDelta2 = fog1.GetComponent <RectTransform>().sizeDelta;

        component.Move(initalPos, -50f, (sizeDelta2.x + SectionController.canvasWidth) / -2f);
        FogScript component2 = fog2.GetComponent <FogScript>();
        Vector2   sizeDelta3 = fog2.GetComponent <RectTransform>().sizeDelta;
        Vector3   initalPos2 = new Vector3(0f - sizeDelta3.x / 4f, -719f, 0f);
        Vector2   sizeDelta4 = fog2.GetComponent <RectTransform>().sizeDelta;

        component2.Move(initalPos2, 30f, (sizeDelta4.x + SectionController.canvasWidth) / 2f);
        FogScript component3 = fog3.GetComponent <FogScript>();
        Vector2   sizeDelta5 = fog3.GetComponent <RectTransform>().sizeDelta;
        Vector3   initalPos3 = new Vector3(3f * (sizeDelta5.x / 4f), -55f, 0f);
        Vector2   sizeDelta6 = fog3.GetComponent <RectTransform>().sizeDelta;

        component3.Move(initalPos3, -50f, (sizeDelta6.x + SectionController.canvasWidth) / -2f);
        FogScript component4 = fog4.GetComponent <FogScript>();
        Vector2   sizeDelta7 = fog4.GetComponent <RectTransform>().sizeDelta;
        Vector3   initalPos4 = new Vector3(3f * (0f - sizeDelta7.x / 4f), -719f, 0f);
        Vector2   sizeDelta8 = fog4.GetComponent <RectTransform>().sizeDelta;

        component4.Move(initalPos4, 30f, (sizeDelta8.x + SectionController.canvasWidth) / 2f);
    }
예제 #2
0
 void Awake()
 {
     Bar        = transform.Find("Bar").GetComponent <BarGame>();
     Button     = transform.Find("Button").GetComponent <ButtonGame>();
     Fog        = transform.Find("Fog").GetComponent <FogScript>();
     TotalScore = transform.Find("TotalScore").GetComponent <Score>();
     Record     = transform.Find("Record").GetComponent <Score>();
     Player     = GameObject.Find("Player").GetComponent <PlayerScript>();
 }