コード例 #1
0
    void Start()
    {
        currentBatSpeed  = 0;
        alwaysSwoopTimer = 0.0f;

        player = GameObject.Find("Player");

        point1 = transform.Find("Point 1");
        point2 = transform.Find("Point 2");

        CreateFlightParabola();

        if (!debugging)
        {
            Destroy(point1.gameObject.GetComponent <SpriteRenderer>());
            Destroy(point2.gameObject.GetComponent <SpriteRenderer>());
        }
        Destroy(transform.Find("KEEP POINTS ABOVE THIS LINE").gameObject);

        bat     = transform.Find("Batboy").gameObject;
        batAnim = bat.GetComponent <Animator>();

        bat.transform.localPosition = point1.localPosition;
        currentLocalX = bat.transform.localPosition.x;

        batSounds = bat.GetComponent <BatSounds>();
    }
コード例 #2
0
    protected void Awake()
    {
        sounds = new BatSounds(this);
        states = new BatStates(this);

        endLabel = Instantiate(endLabelPrefab);
        StartCoroutine(StartWorking());
    }