示例#1
0
    private void Start()
    {
        body          = GetComponent <Rigidbody>();
        currentDashCD = dashCD;
        dashDirection = false;

        count = 0;

        GameObject Walls = GameObject.Find("Walls");

        rmAddPoints = Walls.GetComponent <RoomManager>();

        GameObject Star002 = GameObject.Find("Circle_Space001");

        star002 = Star002.GetComponent <RandomPointOnMesh>();

        GameObject Rectangle002 = Walls.transform.Find("Rectangle001").gameObject.transform.Find("Circle_Space002").gameObject;

        rectangle002 = Rectangle002.GetComponent <RandomPointOnMesh>();

        GameObject Pentagon002 = Walls.transform.Find("Pentagon001").gameObject.transform.Find("Circle_Space003").gameObject;

        pentagon002 = Pentagon002.GetComponent <RandomPointOnMesh>();

        GameObject Hexagon002 = Walls.transform.Find("Hexagon001").gameObject.transform.Find("Circle_Space004").gameObject;

        hexagon002 = Hexagon002.GetComponent <RandomPointOnMesh>();

        GameObject Heptagon002 = Walls.transform.Find("Heptagon001").gameObject.transform.Find("Circle_Space005").gameObject;

        heptagon002 = Heptagon002.GetComponent <RandomPointOnMesh>();

        if (healthBarHandler)
        {
            healthBarHandler.SetMaxHealth(maxHealth);
        }

        currentHealth = maxHealth;
    }