public DuoLever(Lever lever1, Lever lever2, IInteractableObject LeverUseObject, float useDuration) { this.useDuration = useDuration; timesToPlay = (int)Math.Floor(useDuration / 1.270); this.lever1 = lever1; this.lever2 = lever2; this.OnUseObject = LeverUseObject; base.SetAABB(GameConstants.MapMinBounds, new Vector3(GameConstants.MapMaxBounds.X, GameConstants.InteractablesUseHeight, GameConstants.MapMaxBounds.Z)); Interactables.AddInteractable(this); if (LeverUseObject is Gate) { gate = (Gate)LeverUseObject; } }
protected Gate CreateGate(Vector3 position, Vector3 rotation, float scale, float closeAfter = 0, bool isClosed = true) { Gate gate = new Gate(contentMan, position, rotation, scale, closeAfter, isClosed); environment.Add(gate); environmentCollidables.Add(gate); return gate; }