Ejemplo n.º 1
0
    public override void Load(object serializedObj)
    {
        TransformSaveData data = serializedObj as TransformSaveData;

        transform.localScale    = data.GetLocalScale();
        transform.localRotation = data.GetLocalRotation();
        gridMover.SetPosition(data.GetGlobalPosition());
    }
Ejemplo n.º 2
0
 /// <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);
 }