Ejemplo n.º 1
0
    public void ChestAnimatorTestsTearDown()
    {
        testObj       = null;
        testObj_box   = null;
        testObj_chest = null;

        arbitraryObj     = null;
        arbitraryObj_box = null;
    }
Ejemplo n.º 2
0
    public void ChestAnimatorTestsSetUp()
    {
        testObj               = new GameObject();
        testObj_chest         = testObj.AddComponent <ChestAnimator>() as ChestAnimator;
        testObj_box           = testObj.AddComponent <BoxCollider2D>() as BoxCollider2D;
        testObj_box.isTrigger = true;
        testObj_box.size      = new Vector2(2f, 2f);
        testObj_chest.coin    = new GameObject();
        testObj.AddComponent <Animator>();
        testObj.AddComponent <AudioSource>();
        testObj.transform.position = Vector3.zero;

        arbitraryObj          = new GameObject();
        arbitraryObj_box      = arbitraryObj.AddComponent <BoxCollider2D>() as BoxCollider2D;
        arbitraryObj_box.size = new Vector2(2f, 2f);
        arbitraryObj.AddComponent <Rigidbody2D>();
        arbitraryObj.transform.position = new Vector3(4f, 4f, 0f);
    }