Пример #1
0
    public void LevelObjectDatabaseTest_PlayModeSimplePasses()
    {
        LevelObjectDatabase database = new LevelObjectDatabase();
        LevelEditorObject   obj      = database.GetObject(0, 0);

        Assert.IsNotNull(obj);
    }
Пример #2
0
    public void SerializableLevelTest_EditModeSimplePasses()
    {
        // Load database
        LevelObjectDatabase database = new LevelObjectDatabase();

        // Create level
        GameObject[]      objects  = new GameObject[0];
        LevelEditorObject data     = database.GetObject(0, 0);
        GameObject        instance = MonoBehaviour.Instantiate(data.Prefab);

        instance.name = data.Path;

        instance.transform.position   = new Vector3(-1f, 5f, 3);
        instance.transform.rotation   = Quaternion.Euler(-45f, 90f, 15f);
        instance.transform.localScale = new Vector3(2f, 0.5f, 1.5f);
        objects[0] = instance;
    }