Example #1
0
	// Use this for initialization
	void Start ()
    
    {
		if(onPyramid){
			this.platform = transform.parent.GetComponent<Platform>();
			Debug.Assert(this.platform != null);

			if(platform.ID % 2 == 1){
				int idOnPlatform = transform.GetSiblingIndex();
				this.successor = transform.parent.GetChild( (idOnPlatform+1)%platform.getNumberOfFieldsOnPlatform() ).GetComponent<Field>();
			}
			//else this.successor = this;
		}

	}