protected override void DrawIsAlignToDirection() { base.DrawIsAlignToDirection(); RigidbodyMover rigidbodyMover = _waypointsMover as RigidbodyMover; rigidbodyMover.RotationSpeed = EditorGUILayout.FloatField("Rotation speed", rigidbodyMover.RotationSpeed); }
// Start is called before the first frame update void Start() { Invoke("LifeTimeEnded", lifeTime); rigidbodyMover = GetComponent <RigidbodyMover>(); rigidbodyMover.SetMovementVector(movementVector); //rotate to movement - новый способ поворота вещей (Singed angle мб лучше) + мб лучше поворачивать сразу при спавне //если поворачивать здесь, то лучше инкапсулируется функционал, не нужно лезть в вепон чтобы менять поведение проджектайла float deltaRot = Mathf.Atan2(movementVector.y, movementVector.x) * Mathf.Rad2Deg; transform.rotation = Quaternion.Euler(0f, 0f, deltaRot); }
// Start is called before the first frame update void Start() { rigidbodyMover = GetComponent <RigidbodyMover>(); graphicsController = GetComponentInChildren <PlayerGraphicsController>(); }
// Use this for initialization private void Start() { mover = GetComponent <RigidbodyMover>(); elementList.Add(Element); eMeter.ShowElements(elementList.ToArray()); }
private void Awake() { rigidbodyMover = GetComponent <RigidbodyMover>(); graphicsController = GetComponentInChildren <EnemyGraphicsController>(); attackAction = GetComponent <AttackAction>(); }
// Start is called before the first frame update void Start() { rigidbodyMover = GetComponent <RigidbodyMover>(); InvokeRepeating("PlayVFX", 0f, 0.2f); }