示例#1
0
 /*
  * public void SetOutlinerPositionWithDelay(HexObject aHexObjectManager, float aDelayTime) {
  *  touchFocusedOnThisObject = aHexObjectManager;
  *  Invoke("SetOutlinerPosition", aDelayTime);
  * }
  *
  *
  * public void SetOutlinerPosition() {
  *  if (!InputManager.im.isDragging) {
  *      outliner.position = touchFocusedOnThisObject.transform.position;
  *      outliner.rotation = Quaternion.Euler(0, 0, touchFocusedOnThisObject.ExecuteRotatorAngle());
  *      outliner.localScale = new Vector3(touchFocusedOnThisObject.GetSideLength(), touchFocusedOnThisObject.GetSideLength(), touchFocusedOnThisObject.GetSideLength());
  *      outliner.gameObject.SetActive(true);
  *      Debug.Log("Object selection triggered in GameController");
  *  }
  * }
  */
 /*
  * public void SelectObject(HexObject aHexObjectManager) {
  *  if (!isSelectionCoroutineRunning) {
  *      StartCoroutine(SetOutlinerPosition(aHexObjectManager));
  *  }
  * }
  * private IEnumerator SetOutlinerPosition(HexObject aHexObjectManager) {
  *  isSelectionCoroutineRunning = true;
  *  yield return new WaitForSeconds(0.3f);
  *  if (!InputManager.im.isDragging) {
  *      touchFocusedOnThisObject = aHexObjectManager;
  *      outliner.position = touchFocusedOnThisObject.transform.position;
  *      outliner.rotation = Quaternion.Euler(0, 0, touchFocusedOnThisObject.ExecuteRotatorAngle());
  *      outliner.localScale = new Vector3(touchFocusedOnThisObject.GetSideLength(), touchFocusedOnThisObject.GetSideLength(), touchFocusedOnThisObject.GetSideLength());
  *      outliner.gameObject.SetActive(true);
  *      Debug.Log("Object selection triggered in GameController");
  *  }
  *  isSelectionCoroutineRunning = false;
  * }
  */
 public void SetOutlinerPosition(HexObject aHexObjectManager)
 {
     touchFocusedOnThisObject = aHexObjectManager;
     outliner.position        = touchFocusedOnThisObject.transform.position;
     outliner.rotation        = Quaternion.Euler(0, 0, touchFocusedOnThisObject.ExecuteRotatorAngle());
     outliner.localScale      = new Vector3(touchFocusedOnThisObject.GetSideLength(), touchFocusedOnThisObject.GetSideLength(), touchFocusedOnThisObject.GetSideLength());
     outliner.gameObject.SetActive(true);
     //Debug.Log("Object selection triggered in GameController");
 }