/// <summary> /// Initializes this Gem with passing the level context. /// </summary> /// <param name="context">Context.</param> public override void Init(IGemContext context) { this.context = context; }
// <summary> /// Register this LevelSource to ILevelManager /// </summary> public void Start() { ILevelManager levelManger = (ILevelManager)GetComponent (typeof(ILevelManager)); context = levelManger.GetGemContext (); levelManger.SetLevelSource (this); int maxColors = ((ColorGem.GemColor[])System.Enum.GetValues(typeof(ColorGem.GemColor))).Length-1; if(numberOfColors > maxColors){ numberOfColors = maxColors; } Restart(); }
/// <summary> /// Initializes this Gem with passing the level context. /// </summary> /// <param name="context">Context.</param> public virtual void Init(IGemContext context) { }
// <summary> /// Register this LevelSource to ILevelManager. /// </summary> public void Start() { ILevelManager levelManger = (ILevelManager)GetComponent(typeof (ILevelManager)); context = levelManger.GetGemContext(); levelManger.SetLevelSource(this); }
public void Start() { levelManger = (ILevelManager)GetComponent(typeof (ILevelManager)); level = levelManger.GetGemContext(); }
/// <summary> /// Register this Physics to ILevelManager. /// </summary> public void Start() { ILevelManager levelManger = (ILevelManager)GetComponent(typeof (ILevelManager)); level = levelManger.GetGemContext(); levelManger.SetLevelPhysics(this); }