public override void Load(object serializedObj) { TransformSaveData data = serializedObj as TransformSaveData; transform.localScale = data.GetLocalScale(); transform.localRotation = data.GetLocalRotation(); gridMover.SetPosition(data.GetGlobalPosition()); }
/// <summary> /// Sets the player's position to the given position. /// Also upadtes the player's grid move target to that position. /// </summary> /// <param name="position"></param> public void SetPlayerPosition(Vector2 position) { gridMover.SetPosition(position); }