// Start is called before the first frame update void Start() { if (hexa == null) { hexa = Hexasphere.GetInstance("Hexasphere"); } }
protected override void Start() { base.Start(); if (planetSurface == null) { planetSurface = GameObject.Find("surfaceObj").transform; } if (hexa == null) { hexa = Hexasphere.GetInstance("Hexasphere"); } if (hexaT == null) { hexaT = Hexasphere.GetInstance("Hexasphere").transform; } if (selfCanvas == null) { selfCanvas = GetComponent <Canvas>(); } for (int i = 0; i < children.Count; i++) { children[i].GetComponent <Material>().DOFade(0f, 0f); } selfCanvas.enabled = false; /* for (int i = 0; i < transform.childCount; i++) * { * Transform child = transform.getChild(i) as Transform; * * children.Add(child); * }*/ }
void Start() { if (selfAuto == null) { selfAuto = GetComponent <autoMovement>(); } if (selfMove == null) { selfMove = GetComponent <MoveUnit>(); } if (selfSend == null) { selfSend = GetComponent <sendUnit>(); } if (hexa == null) { hexa = Hexasphere.GetInstance("Hexasphere"); } //set height adjustment to keep object flush with surface heightAdjust = GetComponent <Renderer>().bounds.size.y; //get current tile at position, parent and set object alignment currentTile = hexa.GetTileAtLocalPos(transform.position); //hexa.ParentAndAlignToTile(gameObject, currentTile, heightAdjust, true, false, 1); //set initial state as idle stateMachine.ChangeState(new Idle(this)); }
// Start is called before the first frame update void Start() { if (hexasphere == null) { hexasphere = Hexasphere.GetInstance("Hexasphere"); } //Dictionary<GameObject, float> robotDistance = new Dictionary<GameObject, float>(); }
//Initialization functions void Start() { if (hexa == null) { hexa = Hexasphere.GetInstance("Hexasphere"); } if (menuObject == null) { menuObject = GameObject.Find("popUI").GetComponent <adjustMenu>(); } }
/// <summary> /// Start is called on the frame when a script is enabled just before /// any of the Update methods is called the first time. /// </summary> void Start() { if (hexa == null) { hexa = Hexasphere.GetInstance("Hexasphere"); } if (setColor == null) { setColor = gameObject.GetComponent <SetSelfColor>(); } height = gameObject.GetComponent <BoxCollider>().bounds.size.y / 2; setBasicAttributes(); setSize(); }
// Start is called before the first frame update void Start() { if (hexa == null) { hexa = Hexasphere.GetInstance("Hexasphere"); } if (robotParent == null) { robotParent = GameObject.Find("Robots").GetComponent <Transform>(); } if (robotParent.childCount > 0) { startNow = StartCoroutine(calculateAutoDestinations()); } }
// Start is called before the first frame update void Start() { if (thisUnit == null) { thisUnit = gameObject.GetComponent <Unit>(); } if (hexa == null) { hexa = Hexasphere.GetInstance("Hexasphere"); } // if (hexa == null) hexa = GameObject.Find("Hexasphere").GetComponent<Hexasphere>(); currentTile = thisUnit.currentTile; lastDestination = currentTile; //Moved this coroutine to it's own function // StartCoroutine(calculateAutoDestinations()); }
// Start is called before the first frame update void Start() { //Debug.Log("starting at moveUnit"); if (hexa == null) { hexa = Hexasphere.GetInstance("Hexasphere"); } if (thisUnit == null) { thisUnit = gameObject.GetComponent <Unit>(); } if (autoMove == null) { autoMove = gameObject.GetComponent <autoMovement>(); } //currentTile = thisUnit.currentTile; }