private void Awake() { BrokenCameraFilter = brokenCameraFilter; CameraComponent = cameraComponent; WheelComponent = wheelComponent; EquippableItems = equippableItems; }
public void EquipItem(EquipableItem equippableItem) { foreach(RoverComponent rc in CachedPlayerStats.roverComponents) { if(rc.currentComponentType == equippableItem.componentType) { //equipment match, swap it out!! rc.equippedItem = equippableItem; return; } } //we dont already have this item. add it. RoverComponent roverComponent = new RoverComponent(); roverComponent.currentComponentType = equippableItem.componentType; roverComponent.equippedItem = equippableItem; Initialize(); }
public void EquipItem(EquipableItem equippableItem) { foreach (RoverComponent rc in CachedPlayerStats.roverComponents) { if (rc.currentComponentType == equippableItem.componentType) { //equipment match, swap it out!! rc.equippedItem = equippableItem; return; } } //we dont already have this item. add it. RoverComponent roverComponent = new RoverComponent(); roverComponent.currentComponentType = equippableItem.componentType; roverComponent.equippedItem = equippableItem; Initialize(); }