public void TestInitialize() { itemToBeAdded = new List <GameObject>(); itemToBeDeleted = new List <GameObject>(); allObject = new List <GameObject>(); testPlayer = new Player.Player(200, 200); testMediator = new Mediator(allObject, itemToBeAdded, itemToBeDeleted, testPlayer, testRoom, TestState); testRoom = new Room(800, 400, testMediator); testMediator.room = testRoom; testWall = new Wall(200, 200, testMediator); testMonster = new Creep.Creep(200, 200, testMediator); testMonster2 = new Creep.Creep(200, 200, testMediator); HpPlus = 100; testHpBoost = new HpBoost(HpPlus, 200, 200, testMediator); testMSBoost = new MsBoost(200, 200, testMediator); ExpectedMs = testMSBoost.SpeedBoost; testCrossbow = new Crossbow(200, 200, testMediator); testBow = new FrozenBow(200, 200, testMediator); testGun = new SimpleGun(200, 200, testMediator); testWand = new Wand(200, 200, testMediator); testLaveTile = new LavaTile(200, 200, 5, testMediator); testDoor = new Door(200, 200, testMediator, true); FBProjectile = new FrozenBowProjectile(200, 200, Direction.NORTH, testMediator); WProjectile = new WandProjectile(200, 200, Direction.NORTH, testMediator); SGProjectile = new SimpleGunProjectile(200, 200, Direction.NORTH, testMediator); CBProjectile = new CrossbowProjectile(200, 200, Direction.NORTH, testMediator); }
private static void CreateLavaTile() { LavaTile myAT = new LavaTile(); // lavaTile myAT = ScriptableObject.CreateInstance("lavaTile"); Sprite[] myTextures = myAT.GetSprite(); if (myTextures != null) { Debug.Log(myTextures.GetType() + "Length: " + myTextures.Length); Debug.Log(myTextures[0].name); } else { Debug.Log("Texture not loaded"); } string fName2 = "LavaTile"; myAT.name = fName2 + ".asset"; //Has to be placed before Create of Asset data will be lost after saving myAT.InitiateSlots(myTextures); AssetDatabase.CreateAsset(myAT, "Assets/Tiles/" + myAT.name + ""); AssetDatabase.SaveAssets(); AssetDatabase.Refresh(); }