コード例 #1
0
    public virtual void OnCleanedObject(PlayerInteractionController interactionController)
    {
        Set_ObjectStateToClean();
        HouseManager.InvokeOnObjectStatusCallback((int)ownedByTeam);

        ServiceLocator.GetServiceOfType <EffectsManager>().PlayAudioMultiplayer("Cleaned", volume: 0.25f, spatialBlend: 1, audioMixerGroup: "Sfx");
    }
コード例 #2
0
    public override void OnEnable()
    {
        base.OnEnable();

        isStored = false;

        DirtyObject();

        HouseManager.InvokeOnObjectStatusCallback((int)ownedByTeam);
    }
コード例 #3
0
    protected virtual void DirtyObject()
    {
        OnDirtyObject?.Invoke();
        IsCleaned = false;
        IsLocked  = false;

        object_Renderer.material = dirty_Material;
        indicator.Set_IndicatorState(ObjectStateIndicator.IndicatorState.Dirty);
        Debug.Log("Succesfully dirtied object!");

        HouseManager.InvokeOnObjectStatusCallback((int)ownedByTeam);
    }
コード例 #4
0
    private void Update()
    {
        if (PhotonNetwork.IsMasterClient || PhotonNetwork.IsConnected == false)
        {
            Collider[] allPoop = Physics.OverlapBox(transform.position, houseTriggerArea.size / 2, Quaternion.identity, poopMask);

            if (allPoop.Length != previousCount)
            {
                Set_HousePenalty(allPoop.Length * PENALTY_PER_POOP);
                previousCount = allPoop.Length;

                HouseManager.InvokeOnObjectStatusCallback((int)currentTeam);
            }
        }
    }
コード例 #5
0
 public void StoreObject()
 {
     isStored = true;
     HouseManager.InvokeOnObjectStatusCallback(NetworkManager.localPlayerInformation.team);
 }