Ctrl+K

MoveToDirectionComponent

Declaration

public class Strawberry.Components.MoveToDirectionComponent

A simple component that moves the owner to a direction at a given speed.

Inherits: Strawberry.Core.BaseComponent

Properties

Speed

Gets or sets speed of the movement per second

float Speed { get set }

HeadToGoal

Gets or sets the heading of the owner. If true the owner will rotate to face its direction of movement

bool HeadToGoal { get set }

Transform

Gets the transform of the owner

TransformComponent Transform { get }

Direction

Gets or sets the direction of movement in degrees.

float Direction { get set }

Methods

OnUpdate override

void OnUpdate()