gather-and-defend/Assets/ScriptTemplates/01-Gather And Defend__Scripts__Level Tile-NewLevelTile.cs.txt
2023-06-03 09:35:13 -04:00

35 lines
913 B
Plaintext

using UnityEngine;
using System.Collections.Generic;
public class #SCRIPTNAME# : LevelTile
{
public override void LevelStart()
{
//executes when object is added to level manager
}
public override void LevelUpdate()
{
//executes when level manager updates
}
public override void LevelDestroy()
{
//executes when object is removed from level manager
}
public override bool Equals(ILevelObject other)
{
var isEqual = base.Equals(other);
//add important code to differentiate this tile from another similar tile
return isEqual;
}
public override Dictionary<string, object> ToDictionary()
{
var dict = base.ToDictionary();
//add variables you would like to serialize to the dictionary
return dict;
}
public override void LoadDictionary(Dictionary<string, object> dict)
{
base.LoadDictionary(dict);
//fetch variables you would like to deserialize from the dictionary.
}
}