コード例 #1
0
    // Use this for initialization
    void Start()
    {
        Fire();
        animator = gameObject.GetComponentInChildren<Animator>();
        boatOarClass = boatOar.GetComponent<BoatOar>();
        //baconSpotScript = baconSpot.GetComponent<CookingController>();
        p2dControl = gameObject.GetComponentInChildren<Puppet2D_GlobalControl>();

        Transform tempTransform = gameObject.transform.Find("Dolphin 1");
        dolphin = tempTransform.gameObject;

        Transform tempTransform2 = dolphin.transform.Find("bone_47");
        dolphinCollider = tempTransform2.gameObject;
        dolphinCollider =  dolphinCollider.transform.FindDeepChild("dolphin_head_collider").gameObject;
        string StrBacon = baconSpotScript.gameObject.name;
        baconGO = GameObject.Find(StrBacon + "/Bacon");

        rb = getRect(boatEdge);
        pr = getRect(playerHitArea);
        rbs = getRect(baconGO);
        rg = getRect(dolphinCollider);
        //print(rg);
        bo = getRect(boatOar);
    }
コード例 #2
0
ファイル: SharkController.cs プロジェクト: kingofraytown/BOAB
    // Use this for initialization
    void Start()
    {
        //sharkBox = transform.rigidbody2D;
        boatOarClass = boatOar.GetComponent<BoatOar>();
        animator = gameObject.GetComponent<Animator>();
        startTime = Time.time;
        string StrBacon = baconSpotScript.gameObject.name;
        baconGO = GameObject.Find(StrBacon + "/Bacon");
        rb = getRect(boatEdge);

        rbs = getRect(baconGO);

        Fire();
        //Application.targetFrameRate = 1;
    }
コード例 #3
0
ファイル: BirdController.cs プロジェクト: kingofraytown/BOAB
    void Start()
    {
        //initializing hittest variables
        string StrBacon = baconSpotScript.gameObject.name;
        //print(StrBacon + "/Bacon");
        boatOarClass = boatOar.GetComponent<BoatOar>();
        baconGO = GameObject.Find(baconSpotScript.gameObject.name + "/Bacon");
        rbs =  getRect(baconGO);
        rg = getRect(gameObject);
        //Rect br = getRect(baconSpot);
        pr = getRect(playerHitZone);
        bo =  getRect(boatOar);

        animator = gameObject.GetComponent<Animator>();

        startTime = Time.time;

        targetLocked = false;
        Fire();
    }