//Visualisation: public override void DrawGizmos(GizmoManager gizmoManager) { gizmoManager.SetColor(Colour); Vector3 pos3d = new Vector3(Position().x, Position().y, 0.0f); gizmoManager.DrawSolidSphere(pos3d, Radius, "CircleCopters"); }
void Start() { if (_instance == null) { _instance = this; } SetGestureDescriptionParts(); SetDepthGizmoParts(); SetRotationGizmoParts(); HighlightStatesToStateDetection(0); }
public void DrawGizmos(GizmoManager gizmoManager) { gizmoManager.SetColor(Color.black); for (int i = 0; i < CornerPoints.Length; i++) { Vector2 to = CornerPoints[(i + 1) % CornerPoints.Length]; Vector2 from = CornerPoints[(i) % CornerPoints.Length]; Vector3 to3 = new Vector3(to.x, to.y, 0.0f); Vector3 from3 = new Vector3(from.x, from.y, 0.0f); gizmoManager.DrawLine(from3, to3, 0.1f, "Walls"); } }
void Start() { if (_instance == null) { _instance = this; } else { Destroy(this.gameObject); } Initialize(); }
void Start() { if (_instance == null) { _instance = this; } else { Destroy(this.gameObject); } SetGestureDescriptionParts(); HighlightStatesToStateDetection(0); InitializeFlagParts(); }
void Start() { if (_instance == null) { _instance = this; } else { Destroy(this.gameObject); } SetGestureDescriptionParts(); HighlightStatesToStateDetection(0); InitializeFlagParts(); InitializeTriggerPool(); ManomotionManager.OnManoMotionFrameProcessed += DisplayInformationAfterManoMotionProcessFrame; }
void Update() { //Debug GizmoManager.DrawLine(transform.position, transform.position + Vector3.down * distanceToSwitchLand); //Move action if ((state == EnemyState.MOVE) && canMove) { Move(); } //Scan action if (ScanBarrier()) { if (canSwitchLand) { //TODO: left or right var randDirect = Random.Range(0, 100) / 50; MoveAround((MoveAroundDirect)randDirect); } else { //Attack BaseAttack(); } } else { if (state != EnemyState.MOVE && canMove) { state = EnemyState.MOVE; } } //check time attack cooldown if (timeAttack > 0) { timeAttack -= Time.deltaTime; } }
private void Awake() { Instance = this; Initialize(); }
private void Start() { _gizmoManager = GetComponent <GizmoManager>(); }
public void InitializeRuntimeComponents() { if (!manoVisualization) { try { manoVisualization = GameObject.Find("ManoVisualization").GetComponent <ManoVisualization>(); } catch (Exception ex) { Debug.LogError("Cannot find the ManoVisualization"); } } if (!gizmoManager) { try { gizmoManager = GameObject.Find("GizmoCanvas").GetComponent <GizmoManager>(); } catch (Exception ex) { Debug.LogError("Cannot find the GizmoManager"); } } if (!manoMotionCanvas) { try { manoMotionCanvas = GameObject.Find("ManoMotionCanvas"); } catch (Exception ex) { Debug.Log("Cannot find the ManoMotion Canvas"); } } if (!menuToggleButtonObject) { try { menuToggleButtonObject = GameObject.Find("ToggleMenu"); } catch (Exception ex) { Debug.Log("Cannot find the Menu Toggle Button"); } } if (!featuresMenu) { try { featuresMenu = GameObject.Find("MainFeaturesMenu"); } catch (Exception ex) { Debug.Log("Cannot find the Main Features Object"); } } runTimeObjects.Add(manoVisualization.gameObject); runTimeObjects.Add(gizmoManager.gameObject); runTimeObjects.Add(manoMotionCanvas); runTimeObjects.Add(menuToggleButtonObject); runTimeObjects.Add(featuresMenu); SaveDefalutFeaturesToDisplay(); if (CategoryManager.Instance) { CategoryManager.Instance.SetupMenu(defaultFunctionality); } else { Debug.Log("Cant find Category Manager"); } HideApplicationComponents(); }
public abstract void DrawGizmos(GizmoManager gizmoManager);
public void DrawGizmos(GizmoManager gizmoManager) { gizmoManager.SetColor(Color.black); gizmoManager.DrawSolidSphere(new Vector3(3.0f, 3.0f, 0.0f), 2, "2"); }
public void DrawText(GizmoManager gizmoManager) { gizmoManager.SetColor(Color.red); gizmoManager.DrawText("Text", new Vector3(3.0f, 3.0f, 0.0f), new Vector3(1, 1, 1), "InfoText"); }