public override void HandleInteraction(CoordinateRepresentation rep, PlayerCharacter player) { // heal what is broken player.SetRelevantCoordinate(null); m_Grid.CoordinateRegistration(this, false); GameObject.Destroy(rep.gameObject); }
public void SetRelevantCoordinate(CoordinateRepresentation rep) { if (m_RelevantCoordinate != null && m_RelevantCoordinate != rep) { m_RelevantCoordinate.ToggleReaction(false); } m_RelevantCoordinate = rep; if (m_RelevantCoordinate != null) { Debug.Log("rep reacting"); m_RelevantCoordinate.ToggleReaction(true); } else { Debug.Log("rep reacting finished"); } }
public void Decorate(CoordinateRepresentation rep) { // set to color of shape }
public override void HandleReacting(CoordinateRepresentation rep, bool reacting) { rep.m_Mesh.material.color = reacting ? Color.green : Color.red; }
public override void Decorate(CoordinateRepresentation rep) { rep.m_Mesh.material.color = Color.red; }
public virtual void Decorate(CoordinateRepresentation rep) { }
public virtual void HandleInteraction(CoordinateRepresentation rep, PlayerCharacter player) { }