예제 #1
0
        protected override void DrawIsAlignToDirection()
        {
            base.DrawIsAlignToDirection();

            RigidbodyMover rigidbodyMover = _waypointsMover as RigidbodyMover;

            rigidbodyMover.RotationSpeed = EditorGUILayout.FloatField("Rotation speed", rigidbodyMover.RotationSpeed);
        }
예제 #2
0
    // 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);
    }
예제 #3
0
 // Start is called before the first frame update
 void Start()
 {
     rigidbodyMover     = GetComponent <RigidbodyMover>();
     graphicsController = GetComponentInChildren <PlayerGraphicsController>();
 }
예제 #4
0
 // 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>();
 }
예제 #6
0
 // Start is called before the first frame update
 void Start()
 {
     rigidbodyMover = GetComponent <RigidbodyMover>();
     InvokeRepeating("PlayVFX", 0f, 0.2f);
 }