public Asset(int name, GetGobjectDelegate getgobjectcallback, Vector3 scale) { Name = name; GetNewGobject = getgobjectcallback; Scale = scale; Color = Color.Gray; }
/// <summary> /// Adds an asset with a default scale of 1 /// </summary> /// <param name="name"></param> /// <param name="CreateCallback"></param> public void AddAsset(Enum e, GetGobjectDelegate CreateCallback) { AddAsset(e, CreateCallback, 1.0f); }
/// <summary> /// Adds an asset with a scale of X = Y = Z = scale /// </summary> /// <param name="name"></param> /// <param name="CreateCallback"></param> /// <param name="scale"></param> public void AddAsset(Enum e, GetGobjectDelegate CreateCallback, float scale) { AddAsset(e, CreateCallback, new Vector3(scale, scale, scale)); }
/// <summary> /// Adds an asset /// </summary> /// <param name="name"></param> /// <param name="CreateCallback"></param> /// <param name="scale"></param> public void AddAsset(Enum e, GetGobjectDelegate CreateCallback, Vector3 scale) { int id = (int)Convert.ChangeType(e, e.GetTypeCode()); AddAsset(new Asset(id, CreateCallback, scale)); }