Skip to content

Commit

Permalink
remove our stuff from VHS namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamReifsneider committed Jul 20, 2020
1 parent 84b8907 commit a41890b
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 24 deletions.
35 changes: 17 additions & 18 deletions BOX-BUX/Assets/Scripts/PickableFace.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,27 @@
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Assertions;
using VHS;

namespace VHS {
public class PickableFace : InteractableBase
{
public ChangeType changeType;

private PickableFaceObj parent;
public class PickableFace : InteractableBase
{
public ChangeType changeType;

public void Awake()
{
parent = GetComponentInParent<PickableFaceObj>();
Assert.IsNotNull(parent);
}
private PickableFaceObj parent;

public override void OnInteract()
public void Awake()
{
parent = GetComponentInParent<PickableFaceObj>();
Assert.IsNotNull(parent);
}

public override void OnInteract()
{
bool inFacesZone = GlobalState.get().facesZone.GetComponent<Collider>().bounds.Intersects(parent.GetComponent<Collider>().bounds);
if (parent.holder.held == null && inFacesZone)
{
bool inFacesZone = GlobalState.get().facesZone.GetComponent<Collider>().bounds.Intersects(parent.GetComponent<Collider>().bounds);
if (parent.holder.held == null && inFacesZone)
{
ModificationSystem.MakeChange(parent, changeType);
}
parent.OnFace();
ModificationSystem.MakeChange(parent, changeType);
}
parent.OnFace();
}
}
9 changes: 3 additions & 6 deletions BOX-BUX/Assets/Scripts/PickableFaceObj.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,10 @@
using System.Collections.Generic;
using UnityEngine;

namespace VHS
public class PickableFaceObj : Pickable
{
public class PickableFaceObj : Pickable
public void OnFace()
{
public void OnFace()
{
base.OnInteract();
}
base.OnInteract();
}
}

0 comments on commit a41890b

Please sign in to comment.