Skip to content

Commit

Permalink
refactor: Replaced GetCenter for GetGameObject in ITargetable.
Browse files Browse the repository at this point in the history
BREAKING CHANGE: With this, the center of the object and any other needed data can be grabbed, while also not assuming the numeric type to be a Vector3.
  • Loading branch information
christides11 committed Sep 25, 2020
1 parent 2c36cb1 commit 30de643
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
4 changes: 2 additions & 2 deletions Assets/CAF/Combat/Interfaces/ITargetable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ public interface ITargetable
/// </summary>
bool Targetable { get; }
/// <summary>
/// The center of the object in world space.
/// The object that's being targeted.
/// </summary>
Vector3 GetCenter();
GameObject GetGameObject();
}
}
11 changes: 3 additions & 8 deletions Assets/CAF/Entities/EntityManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,19 +116,14 @@ public virtual void SetVisualRotation(Vector3 direction)
visual.transform.rotation = Quaternion.LookRotation(direction);
}

public virtual Vector3 GetCenter()
public virtual void ApplyStatusEffect(StatusEffectDefinition statusEffect)
{
return transform.position;
}

public virtual Vector3 GetSize()
{
return Vector3.zero;
}

public virtual void ApplyStatusEffect(StatusEffectDefinition statusEffect)
public GameObject GetGameObject()
{

return gameObject;
}
}
}

0 comments on commit 30de643

Please sign in to comment.