public new void Awake() { base.Awake(); renderer = GetComponent <SpriteRenderer>(); obstacle = GetComponent <NavObstacle>(); currentlyInside = new List <Collider2D>(); frozen = frozen; }
private void Awake() { renderer = GetComponent <SpriteRenderer>(); collider = GetComponent <Collider2D>(); obstacle = GetComponent <NavObstacle>(); startingLayer = gameObject.layer; open = open; locked = locked; }
private void OnEnable() { obstacle = (target as NavObstacle); cornersContent.text = "Corners Visible"; cornersContent.tooltip = "The number of corners of the box to be used in making nav graphs"; arrngmtContent.text = "Arrangement"; arrngmtContent.tooltip = "The arrangement of the corners used to make nav graphs"; consecCornersContent.text = "Consecutive Corners"; consecCornersContent.tooltip = "Are the corners consecutive or diagonal?"; }
private NavTerrainTypes GetTerrainType(Vector2 point) { for (int i = 0; i < overlapCheckBuffer.Length; ++i) { overlapCheckBuffer[i] = null; } Physics2D.OverlapPointNonAlloc(point, overlapCheckBuffer); for (int i = 0; i < overlapCheckBuffer.Length && overlapCheckBuffer[i] != null; ++i) { NavObstacle obstacle = overlapCheckBuffer[i].GetComponent <NavObstacle>(); if (obstacle != null) { return(obstacle.terrainType); } } return(NavTerrainTypes.Floor); }
private void Awake() { collider = GetComponent <Collider2D>(); renderer = GetComponent <SpriteRenderer>(); obstacle = GetComponent <NavObstacle>(); }