コード例 #1
0
 //This function hides our throw and action aim arrows
 public void hideArrows()
 {
     checkForArrows();
     throwArc.hide();
     if (hasAction && hasActionAim)
     {
         actionAimArc.hide();
     }
 }
コード例 #2
0
 //Since the throw and action arrows are not child objects, these next three functions check if they exist and create them. We'll call checkForArrow anytime we know that we need one of the arrows, in case we've changed scenes and lost our arrow objects
 private void createThrowArrow()
 {
     throwArcObj = new GameObject(gameObject.name + "_throwArc");
     throwArcObj.transform.localPosition = new Vector3(0, 0, 0);
     throwArc = throwArcObj.AddComponent <lineArrow>() as lineArrow;
     throwArc.follow(gameObject.transform);
     throwArc.hide();
 }
コード例 #3
0
 private void createActionArrow()
 {
     actionAimObj = new GameObject(gameObject.name + "_actionAimObj");
     actionAimObj.transform.localPosition = new Vector3(0, 0, 0);
     actionAimArc = actionAimObj.AddComponent <lineArrow>() as lineArrow;
     actionAimArc.follow(gameObject.transform);
     actionAimArc.reticleMode = true;
     actionAimArc.setAngle(0);
     actionAimArc.hide();
 }